__( '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 '' : ?>
  • id="li-comment-">
    comment_approved == '0' ) : ?>
  • __( 'Primary Sidebar', 'blankpress' ), 'id' => 'primary-sidebar', 'description' => __( 'The primary sidebar', 'blankpress' ), 'before_widget' => '
  • ', 'after_widget' => '
  • ', 'before_title' => '

    ', 'after_title' => '

    ', ) ); // Area 2, located below the Primary Widget Area in the sidebar. Empty by default. register_sidebar( array( 'name' => __( 'Secondary Sidebar', 'blankpress' ), 'id' => 'secondary-sidebar', 'description' => __( 'The secondary sidebar appears in 3-column layouts', 'blankpress' ), 'before_widget' => '
  • ', 'after_widget' => '
  • ', 'before_title' => '

    ', 'after_title' => '

    ', ) ); // Area 3, located above footer. Only activated using the one column layout register_sidebar( array( 'name' => __( 'One Column - Left Section', 'blankpress' ), 'id' => 'one-col-widget-sec-a', 'description' => __( 'Located above footer. Only activated using the one column layout.', 'blankpress' ), 'before_widget' => '
  • ', 'after_widget' => '
  • ', 'before_title' => '

    ', 'after_title' => '

    ', ) ); // Area 3, located above footer. Only activated using the one column layout register_sidebar( array( 'name' => __( 'One Column - Right Section', 'blankpress' ), 'id' => 'one-col-widget-sec-b', 'description' => __( 'Located above footer. Only activated using the one column layout', 'blankpress' ), 'before_widget' => '
  • ', 'after_widget' => '
  • ', 'before_title' => '

    ', 'after_title' => '

    ', ) ); } /** Register sidebars by running blankpress_widgets_init() on the widgets_init hook. */ add_action( 'widgets_init', 'blankpress_widgets_init' ); /** * Removes the default styles that are packaged with the Recent Comments widget. * * @since blankpress 1.0 */ function blankpress_remove_recent_comments_style() { global $wp_widget_factory; remove_action( 'wp_head', array( $wp_widget_factory->widgets['WP_Widget_Recent_Comments'], 'recent_comments_style' ) ); } add_action( 'widgets_init', 'blankpress_remove_recent_comments_style' ); if ( ! function_exists( 'blankpress_posted_on' ) ) : /** * Prints HTML with meta information for the current post—date/time and author. * * @since blankpress 1.0 */ function blankpress_posted_on() { // use the "byline" class to hide the author name and link. We should make this appear automatically with a multi-author conditional tag in the future printf( __( 'Posted on %2$s by %3$s', 'blankpress' ), 'meta-prep meta-prep-author', sprintf( '%3$s', get_permalink(), esc_attr( get_the_time() ), get_the_date() ), sprintf( '%3$s', get_author_posts_url( get_the_author_meta( 'ID' ) ), sprintf( esc_attr__( 'View all posts by %s', 'blankpress' ), get_the_author() ), get_the_author() ), 'byline' ); } endif; if ( ! function_exists( 'blankpress_posted_in' ) ) : /** * Prints HTML with meta information for the current post (category, tags and permalink). * * @since blankpress 1.0 */ function blankpress_posted_in() { // Retrieves tag list of current post, separated by commas. $tag_list = get_the_tag_list( '', ', ' ); if ( $tag_list ) { $posted_in = __( 'This entry was posted in %1$s and tagged %2$s. Bookmark the permalink.', 'blankpress' ); } elseif ( is_object_in_taxonomy( get_post_type(), 'category' ) ) { $posted_in = __( 'This entry was posted in %1$s. Bookmark the permalink.', 'blankpress' ); } else { $posted_in = __( 'Bookmark the permalink.', 'blankpress' ); } // Prints the string, replacing the placeholders. printf( $posted_in, get_the_category_list( ', ' ), $tag_list, get_permalink(), the_title_attribute( 'echo=0' ) ); } endif; ?>