'000000', 'default-image' => get_template_directory_uri() . '/images/swirlybackground.png', ); add_theme_support( 'custom-background', $args ); /** * This theme uses wp_nav_menu() in one location. */ register_nav_menus( array( 'primary' => __( 'Primary Menu', 'monster' ), ) ); /** * Add support for the Aside Post Formats */ add_theme_support( 'post-formats', array( 'aside', ) ); } endif; // monster_setup add_action( 'after_setup_theme', 'monster_setup' ); /** * Register widgetized area and update sidebar with default widgets * * @since Monster 1.0 */ function monster_widgets_init() { register_sidebar( array( 'name' => __( 'Sidebar', 'monster' ), 'id' => 'sidebar-1', 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); } add_action( 'widgets_init', 'monster_widgets_init' ); /** * Enqueue scripts and styles */ function monster_scripts() { wp_enqueue_style( 'style', get_stylesheet_uri() ); wp_enqueue_style( 'monster-griffy', "https://fonts.googleapis.com/css?family=Griffy" ); wp_enqueue_style( 'monster-puritan', "https://fonts.googleapis.com/css?family=Puritan:400,700,400italic,700italic" ); wp_enqueue_style( 'monster-ranchers', "https://fonts.googleapis.com/css?family=Spicy+Rice" ); wp_enqueue_script( 'small-menu', get_template_directory_uri() . '/js/small-menu.js', array( 'jquery' ), '20120206', true ); if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) wp_enqueue_script( 'comment-reply' ); if ( is_singular() && wp_attachment_is_image() ) wp_enqueue_script( 'keyboard-image-navigation', get_template_directory_uri() . '/js/keyboard-image-navigation.js', array( 'jquery' ), '20120202' ); } add_action( 'wp_enqueue_scripts', 'monster_scripts' ); /** * Enqueue fonts for custom header admin */ function monster_admin_scripts( $hook_suffix ) { if ( 'appearance_page_custom-header' != $hook_suffix ) return; wp_enqueue_style( 'monster-griffy', "https://fonts.googleapis.com/css?family=Griffy" ); wp_enqueue_style( 'monster-puritan', "https://fonts.googleapis.com/css?family=Puritan:400,700,400italic,700italic" ); } add_action( 'admin_enqueue_scripts', 'monster_admin_scripts' ); /** * Enqueue styles for theme options */ function monster_theme_options_styles( $hook_suffix ) { if ( 'appearance_page_theme_options' != $hook_suffix ) return; ?> prepare( "SELECT COUNT( DISTINCT ( SUBSTRING( post_date, 1, 10 ) ) ) FROM $wpdb->posts WHERE post_date > %s AND post_type = 'post'", date( 'Y-m-d h:i:s', strtotime( '-1 weeks' ) ) ); return (int) $wpdb->get_var( $querystr ); } /** * Return true if user has made a post on Oct. 31 (any year) */ function monster_halloween_post_date() { $query = new WP_Query( array( 'posts_per_page' => 1, 'monthnum' => '10', //October 'day' => '31', //31st ) ); return ( $query->post_count > 0 ); } /** * Implement the Custom Header feature */ require get_template_directory() . '/inc/custom-header.php'; /** * Custom template tags for this theme. */ require get_template_directory() . '/inc/template-tags.php'; /** * Custom functions that act independently of the theme templates */ require get_template_directory() . '/inc/tweaks.php'; /** * Custom Theme Options */ require get_template_directory() . '/inc/theme-options/theme-options.php';