= 2 || $page >= 2 ) $title = "$title $sep " . sprintf( __( 'Page %s', 'empo' ), max( $paged, $page ) ); return $title; } add_filter( 'wp_title', 'empo_wp_title', 10, 2 ); /** * Tell WordPress to run empo() when the 'after_setup_theme' hook is run. */ add_action( 'after_setup_theme', 'empo' ); if ( ! function_exists( 'empo' ) ): /** * Sets up theme defaults and registers support for WordPress features. */ function empo() { // This theme styles the visual editor with editor-style.css to match the theme style. add_editor_style(); // This theme uses post thumbnails add_theme_support( 'post-thumbnails' ); // Add default posts and comments RSS feed links to head add_theme_support( 'automatic-feed-links' ); // This theme uses wp_nav_menu() in one location. register_nav_menus( array( 'primary' => __( 'Primary Navigation', 'empo' ), ) ); // Add support for Post Formats add_theme_support( 'post-formats', array( 'aside', 'gallery', 'link', 'video', 'image', 'quote' ) ); // This theme allows users to set a custom background add_theme_support( 'custom-background' ); // Responsive Videos add_theme_support( 'jetpack-responsive-videos' ); // Add support for flexible headers $header_args = array( 'flex-height' => true, 'height' => 350, 'flex-width' => true, 'width' => 960, 'default-image' => '%s/images/headers/headerimage.jpg', 'header-text' => false, ); add_theme_support( 'custom-header', $header_args ); // ... and thus ends the changeable header business. // Default custom headers packaged with the theme. %s is a placeholder for the theme template directory URI. register_default_headers( array( 'beach' => array( 'url' => '%s/images/headers/beach.jpg', 'thumbnail_url' => '%s/images/headers/beach-thumbnail.jpg', /* translators: header image description */ 'description' => __( 'Beach', 'empo' ) ), 'urban' => array( 'url' => '%s/images/headers/urban.jpg', 'thumbnail_url' => '%s/images/headers/urban-thumbnail.jpg', /* translators: header image description */ 'description' => __( 'Urban', 'empo' ) ), 'palms' => array( 'url' => '%s/images/headers/palms.jpg', 'thumbnail_url' => '%s/images/headers/palms-thumbnail.jpg', /* translators: header image description */ 'description' => __( 'Palms', 'empo' ) ), 'romantic' => array( 'url' => '%s/images/headers/romantic.jpg', 'thumbnail_url' => '%s/images/headers/romantic-thumbnail.jpg', /* translators: header image description */ 'description' => __( 'Romantic', 'empo' ) ), 'summer' => array( 'url' => '%s/images/headers/summer.jpg', 'thumbnail_url' => '%s/images/headers/summer-thumbnail.jpg', /* translators: header image description */ 'description' => __( 'Summer', 'empo' ) ), 'landscape' => array( 'url' => '%s/images/headers/landscape.jpg', 'thumbnail_url' => '%s/images/headers/landscape-thumbnail.jpg', /* translators: header image description */ 'description' => __( 'Landscape', 'empo' ) ) ) ); } endif; if ( ! function_exists( 'empo_admin_header_style' ) ) : /** * Styles the header image displayed on the Appearance > Header admin panel. * Referenced via add_custom_image_header() in empo_setup(). */ function empo_admin_header_style() { ?> ' . __( 'Continue reading
', 'empo' ) . ''; } /** * Replaces "[...]" (appended to automatically generated excerpts) with an ellipsis and empo_continue_reading_link(). * * To override this in a child theme, remove the filter and add your own * function tied to the excerpt_more filter hook. */ function empo_auto_excerpt_more( $more ) { return ' …' . empo_continue_reading_link(); } add_filter( 'excerpt_more', 'empo_auto_excerpt_more' ); /** * Adds a pretty "Continue Reading" link to custom post excerpts. * * To override this link in a child theme, remove the filter and add your own * function tied to the get_the_excerpt filter hook. */ function empo_custom_excerpt_more( $output ) { if ( has_excerpt() && ! is_attachment() ) { $output .= empo_continue_reading_link(); } return $output; } add_filter( 'get_the_excerpt', 'empo_custom_excerpt_more' ); /** * Remove inline styles printed when the gallery shortcode is used. */ function empo_remove_gallery_css( $css ) { return preg_replace( "##s", '', $css ); } add_filter( 'gallery_style', 'empo_remove_gallery_css' ); if ( ! function_exists( 'empo_comment' ) ) : /** * Template for comments and pingbacks. */ function empo_comment( $comment, $args, $depth ) { $GLOBALS['comment'] = $comment; switch ( $comment->comment_type ) : case '' : ?>__( 'Top Panel', 'empo' ), 'id' => 'sidebar-top', 'before_widget' => '", 'before_title' => '