tag in the document head, and expect WordPress to * provide it for us. */ add_theme_support( 'title-tag' ); /* * Make thePriority available for translation. * * Translations can be added to the /languages/ directory. * If you're building a theme based on thePriority, use a find and * replace to change 'thePriority' to the name of your theme in all * template files. */ load_theme_textdomain( 'thePriority', get_template_directory() . '/languages' ); // This theme styles the visual editor to resemble the theme style. add_editor_style( array( 'css/editor-style.css', thePriority_font_url(), 'genericons/genericons.css' ) ); // Add RSS feed links to
for posts and comments. add_theme_support( 'automatic-feed-links' ); // This theme uses wp_nav_menu() in two locations. register_nav_menus( array( 'primary' => __( 'Top primary menu', 'thePriority' ), 'secondary' => __( 'Secondary menu in right sidebar', 'thePriority' ), ) ); /* * Switch default core markup for search form, comment form, and comments * to output valid HTML5. */ add_theme_support( 'html5', array( 'search-form', 'comment-form', 'comment-list', 'gallery', 'caption' ) ); /* * Enable support for Post Formats. * See http://codex.wordpress.org/Post_Formats */ add_theme_support( 'post-formats', array( 'aside', 'image', 'video', 'audio', 'quote', 'link', 'gallery', ) ); // This theme allows users to set a custom background. add_theme_support( 'custom-background', apply_filters( 'thePriority_custom_background_args', array( //'default-color' => 'f5f5f5', ) ) ); // This theme uses its own gallery styles. add_filter( 'use_default_gallery_style', '__return_false' ); } endif; // thePriority_setup add_action( 'after_setup_theme', 'thePriority_setup' ); /** * Adjust content_width value for image attachment template. * * @since thePriority 1.0 */ function thePriority_content_width() { if ( is_attachment() && wp_attachment_is_image() ) { $GLOBALS['content_width'] = 810; } } add_action( 'template_redirect', 'thePriority_content_width' ); /** * Getter function for Featured Content Plugin. * * @since thePriority 1.0 * * @return array An array of WP_Post objects. */ function thePriority_get_featured_posts() { /** * Filter the featured posts to return in thePriority. * * @since thePriority 1.0 * * @param array|bool $posts Array of featured posts, otherwise false. */ return apply_filters( 'thePriority_get_featured_posts', array() ); } /** * A helper conditional function that returns a boolean value. * * @since thePriority 1.0 * * @return bool Whether there are featured posts. */ function thePriority_has_featured_posts() { return ! is_paged() && (bool) thePriority_get_featured_posts(); } /** * Register three thePriority widget areas. * * @since thePriority 1.0 */ function thePriority_widgets_init() { require get_template_directory() . '/inc/widgets.php'; register_widget( 'thePriority_Ephemera_Widget' ); register_sidebar( array( 'name' => __( 'Content Sidebar', 'thePriority' ), 'id' => 'sidebar-2', 'description' => __( 'Additional sidebar that appears on the right.', 'thePriority' ), 'before_widget' => ' ', 'before_title' => '