__( 'Primary Navigation', 'artblog' ), ) ); // This theme allows users to set a custom background //add_custom_background(); // Your changeable header business starts here if ( ! defined( 'HEADER_TEXTCOLOR' ) ) define( 'HEADER_TEXTCOLOR', '' ); // No CSS, just IMG call. The %s is a placeholder for the theme template directory URI. if ( ! defined( 'HEADER_IMAGE' ) ) define( 'HEADER_IMAGE', '%s/images/headers/ugle.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 artblog_header_image_width and artblog_header_image_height to change these values. define( 'HEADER_IMAGE_WIDTH', apply_filters( 'artblog_header_image_width', 200 ) ); define( 'HEADER_IMAGE_HEIGHT', apply_filters( 'artblog_header_image_height', 200) ); // We'll be using post thumbnails for custom header images on posts and pages. // We want them to be 940 pixels wide by 198 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. if ( ! defined( 'NO_HEADER_TEXT' ) ) define( 'NO_HEADER_TEXT', true ); // Add a way for the custom header to be styled in the admin panel that controls // custom headers. See artblog_admin_header_style(), below. $defaults = array( 'default-image' => '', 'random-default' => false, 'width' => 0, 'height' => 0, 'flex-height' => false, 'flex-width' => false, 'default-text-color' => '', 'header-text' => true, 'uploads' => true, 'wp-head-callback' => '', 'admin-head-callback' => '', 'admin-preview-callback' => '', ); // support for older version of wordpress global $wp_version; if ( version_compare( $wp_version, '3.4', '>=' ) ) add_theme_support( 'custom-header',$defaults ); else add_custom_image_header( '','artblog_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( 'berries' => array( 'url' => '%s/images/headers/ugle.jpg', 'thumbnail_url' => '%s/images/headers/ugle-thumbnail.jpg', /* translators: header image description */ 'description' => __( 'Berries', 'artblog' ) ) ) ); } endif; if ( ! function_exists( 'artblog_admin_header_style' ) ) : /** * Styles the header image displayed on the Appearance > Header admin panel. * * Referenced via add_custom_image_header() in artblog_setup(). * */ function artblog_admin_header_style() { ?> ' . __( 'Continue reading ', 'artblog' ) . ''; } /** * Replaces "[...]" (appended to automatically generated excerpts) with an ellipsis and artblog_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. * * @return string An ellipsis */ function artblog_auto_excerpt_more( $more ) { return ' …' . artblog_continue_reading_link(); } add_filter( 'excerpt_more', 'artblog_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. * * @return string Excerpt with a pretty "Continue Reading" link */ function artblog_custom_excerpt_more( $output ) { if ( has_excerpt() && ! is_attachment() ) { $output .= artblog_continue_reading_link(); } return $output; } add_filter( 'get_the_excerpt', 'artblog_custom_excerpt_more' ); /** * Remove inline styles printed when the gallery shortcode is used. * * Galleries are styled by the theme in Artblog's style.css. This is just * a simple filter call that tells WordPress to not use the default styles. * */ add_filter( 'use_default_gallery_style', '__return_false' ); /** * Deprecated way to remove inline styles printed when the gallery shortcode is used. * * This function is no longer needed or used. Use the use_default_gallery_style * filter instead, as seen above. * * * @return string The gallery style filter, with the styles themselves removed. */ function artblog_remove_gallery_css( $css ) { return preg_replace( "##s", '', $css ); } // Backwards compatibility with WordPress 3.0. if ( version_compare( $GLOBALS['wp_version'], '3.1', '<' ) ) add_filter( 'gallery_style', 'artblog_remove_gallery_css' ); if ( ! function_exists( 'artblog_comment' ) ) : /** * Template for comments and pingbacks. * * To override this walker in a child theme without modifying the comments template * simply create your own artblog_comment(), and that function will be used instead. * * Used as a callback by wp_list_comments() for displaying the comments. * */ function artblog_comment( $comment, $args, $depth ) { $GLOBALS['comment'] = $comment; switch ( $comment->comment_type ) : case '' : ?>
__( 'Primary Widget Area', 'artblog' ), 'id' => 'primary-widget-area', 'description' => __( 'The primary widget area', 'artblog' ), 'before_widget' => '