__( 'Primary Navigation', 'blankpress' ), ) ); // This theme allows users to set a custom background add_custom_background(); // Your changeable header business starts here define( 'HEADER_TEXTCOLOR', '' ); // No CSS, just IMG call. The %s is a placeholder for the theme template directory URI. define( 'HEADER_IMAGE', '%s/images/headers/1.jpg' ); // The height and width of your custom header. You can hook into the theme's own filters to change these values. // Add a filter to blankpress_header_image_width and blankpress_header_image_height to change these values. define( 'HEADER_IMAGE_WIDTH', apply_filters( 'blankpress_header_image_width', 940 ) ); define( 'HEADER_IMAGE_HEIGHT', apply_filters( 'blankpress_header_image_height', 220 ) ); // We'll be using post thumbnails for custom header images on posts and pages. // We want them to be 940 pixels wide by 220 pixels tall. // Larger images will be auto-cropped to fit, smaller ones will be ignored. See header.php. set_post_thumbnail_size( HEADER_IMAGE_WIDTH, HEADER_IMAGE_HEIGHT, true ); // Don't support text inside the header image. define( 'NO_HEADER_TEXT', true ); // Add a way for the custom header to be styled in the admin panel that controls // custom headers. See blankpress_admin_header_style(), below. add_custom_image_header( '', 'blankpress_admin_header_style' ); // ... 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( '1' => array( 'url' => '%s/images/headers/1.jpg', 'thumbnail_url' => '%s/images/headers/1-thumbnail.jpg', /* translators: header image description */ 'description' => __( '1', 'blankpress' ) ), '2' => array( 'url' => '%s/images/headers/2.jpg', 'thumbnail_url' => '%s/images/headers/2-thumbnail.jpg', /* translators: header image description */ 'description' => __( '2', 'blankpress' ) ), '3' => array( 'url' => '%s/images/headers/3.jpg', 'thumbnail_url' => '%s/images/headers/3-thumbnail.jpg', /* translators: header image description */ 'description' => __( '3', 'blankpress' ) ) ) ); } endif; if ( ! function_exists( 'blankpress_admin_header_style' ) ) : /** * Styles the header image displayed on the Appearance > Header admin panel. * * Referenced via add_custom_image_header() in blankpress_setup(). * * @since blankpress 1.0 */ function blankpress_admin_header_style() { ?> ' . __( 'Continue Reading ', 'blankpress' ) . ''; } /** * Replaces "[...]" (appended to automatically generated excerpts) with an ellipsis and blankpress_continue_reading_link(). * * @since blankpress 1.0 * @return string An ellipsis */ function blankpress_auto_excerpt_more( $more ) { return ' …' . blankpress_continue_reading_link(); } add_filter( 'excerpt_more', 'blankpress_auto_excerpt_more' ); /** * Adds a pretty "Continue Reading" link to custom post excerpts. * * @since blankpress 1.0 * @return string Excerpt with a pretty "Continue Reading" link */ function blankpress_custom_excerpt_more( $output ) { if ( has_excerpt() && ! is_attachment() ) { $output .= blankpress_continue_reading_link(); } return $output; } add_filter( 'get_the_excerpt', 'blankpress_custom_excerpt_more' ); /** * Remove inline styles printed when the gallery shortcode is used. * * Galleries are styled by the theme in blankpress's style.css. * * @since blankpress 1.0 * @return string The gallery style filter, with the styles themselves removed. */ function blankpress_remove_gallery_css( $css ) { return preg_replace( "##s", '', $css ); } add_filter( 'gallery_style', 'blankpress_remove_gallery_css' ); if ( ! function_exists( 'blankpress_comment' ) ) : /** * Template for comments and pingbacks. * * To override this walker in a child theme without modifying the comments template * simply create your own blankpress_comment(), and that function will be used instead. * * @since blankpress 1.0 */ function blankpress_comment( $comment, $args, $depth ) { $GLOBALS['comment'] = $comment; switch ( $comment->comment_type ) : case '' : ?>
__( 'Primary Sidebar', 'blankpress' ), 'id' => 'primary-sidebar', 'description' => __( 'The primary sidebar', 'blankpress' ), 'before_widget' => '