Advertisement
navjotjsingh

functions.php with removed support for header/featured image

Apr 9th, 2013
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 19.17 KB | None | 0 0
  1. <?php
  2. /**
  3.  * Twenty Eleven functions and definitions
  4.  *
  5.  * Sets up the theme and provides some helper functions. Some helper functions
  6.  * are used in the theme as custom template tags. Others are attached to action and
  7.  * filter hooks in WordPress to change core functionality.
  8.  *
  9.  * The first function, twentyeleven_setup(), sets up the theme by registering support
  10.  * for various features in WordPress, such as post thumbnails, navigation menus, and the like.
  11.  *
  12.  * When using a child theme (see http://codex.wordpress.org/Theme_Development and
  13.  * http://codex.wordpress.org/Child_Themes), you can override certain functions
  14.  * (those wrapped in a function_exists() call) by defining them first in your child theme's
  15.  * functions.php file. The child theme's functions.php file is included before the parent
  16.  * theme's file, so the child theme functions would be used.
  17.  *
  18.  * Functions that are not pluggable (not wrapped in function_exists()) are instead attached
  19.  * to a filter or action hook. The hook can be removed by using remove_action() or
  20.  * remove_filter() and you can attach your own function to the hook.
  21.  *
  22.  * We can remove the parent theme's hook only after it is attached, which means we need to
  23.  * wait until setting up the child theme:
  24.  *
  25.  * <code>
  26.  * add_action( 'after_setup_theme', 'my_child_theme_setup' );
  27.  * function my_child_theme_setup() {
  28.  *     // We are providing our own filter for excerpt_length (or using the unfiltered value)
  29.  *     remove_filter( 'excerpt_length', 'twentyeleven_excerpt_length' );
  30.  *     ...
  31.  * }
  32.  * </code>
  33.  *
  34.  * For more information on hooks, actions, and filters, see http://codex.wordpress.org/Plugin_API.
  35.  *
  36.  * @package WordPress
  37.  * @subpackage Twenty_Eleven
  38.  * @since Twenty Eleven 1.0
  39.  */
  40.  
  41. /**
  42.  * Set the content width based on the theme's design and stylesheet.
  43.  */
  44. if ( ! isset( $content_width ) )
  45.     $content_width = 1920;
  46.  
  47. /**
  48.  * Tell WordPress to run twentyeleven_setup() when the 'after_setup_theme' hook is run.
  49.  */
  50. add_action( 'after_setup_theme', 'twentyeleven_setup' );
  51.  
  52. if ( ! function_exists( 'twentyeleven_setup' ) ):
  53. /**
  54.  * Sets up theme defaults and registers support for various WordPress features.
  55.  *
  56.  * Note that this function is hooked into the after_setup_theme hook, which runs
  57.  * before the init hook. The init hook is too late for some features, such as indicating
  58.  * support post thumbnails.
  59.  *
  60.  * To override twentyeleven_setup() in a child theme, add your own twentyeleven_setup to your child theme's
  61.  * functions.php file.
  62.  *
  63.  * @uses load_theme_textdomain() For translation/localization support.
  64.  * @uses add_editor_style() To style the visual editor.
  65.  * @uses add_theme_support() To add support for post thumbnails, automatic feed links, custom headers
  66.  *  and backgrounds, and post formats.
  67.  * @uses register_nav_menus() To add support for navigation menus.
  68.  * @uses register_default_headers() To register the default custom header images provided with the theme.
  69.  * @uses set_post_thumbnail_size() To set a custom post thumbnail size.
  70.  *
  71.  * @since Twenty Eleven 1.0
  72.  * @andrewsan
  73.  */
  74. function twentyeleven_setup() {
  75.  
  76.     /* Make Twenty Eleven available for translation.
  77.      * Translations can be added to the /languages/ directory.
  78.      * If you're building a theme based on Twenty Eleven, use a find and replace
  79.      * to change 'twentyeleven' to the name of your theme in all the template files.
  80.      */
  81.     load_theme_textdomain( 'andrewsan', get_template_directory() . '/languages' );
  82.     /*  load_default_textdomain(); */
  83.  
  84.     // This theme styles the visual editor with editor-style.css to match the theme style.
  85.     add_editor_style();
  86.  
  87.     // Load up our theme options page and related code.
  88.     require( get_template_directory() . '/inc/theme-options.php' );
  89.  
  90.     // Grab Twenty Eleven's Ephemera widget.
  91.     require( get_template_directory() . '/inc/widgets.php' );
  92.  
  93.     // Add default posts and comments RSS feed links to <head>.
  94.     add_theme_support( 'automatic-feed-links' );
  95.  
  96.     // This theme uses wp_nav_menu() in one location.
  97.     register_nav_menu( 'primary', __( 'Primary Menu', 'twentyeleven' ) );
  98.  
  99.     // Add support for a variety of post formats
  100.     add_theme_support( 'post-formats', array( 'aside', 'link', 'gallery', 'status', 'quote', 'image' ) );
  101.  
  102.  
  103.     // support for custom backgrounds removed by AS
  104.  
  105.  
  106.     // Support for Featured Images Removed
  107.    
  108.  
  109.     // Add support for custom headers.
  110.     $custom_header_support = array(
  111.         // The default header text color.
  112.         'default-text-color' => '000',
  113.         // The height and width of our custom header.
  114.         'width' => apply_filters( 'twentyeleven_header_image_width', 600 ),
  115.         'height' => apply_filters( 'twentyeleven_header_image_height', 450 ),
  116.         // Support flexible heights.
  117.         'flex-height' => true,
  118.         // Random image rotation by default.
  119.         'random-default' => false,
  120.         // Callback for styling the header.
  121.         'wp-head-callback' => 'twentyeleven_header_style',
  122.         // Callback for styling the header preview in the admin.
  123.         'admin-head-callback' => 'twentyeleven_admin_header_style',
  124.         // Callback used to display the header preview in the admin.
  125.         'admin-preview-callback' => 'twentyeleven_admin_header_image',
  126.     );
  127.  
  128.     add_theme_support( 'custom-header', $custom_header_support );
  129.  
  130.     if ( ! function_exists( 'get_custom_header' ) ) {
  131.         // This is all for compatibility with versions of WordPress prior to 3.4.
  132.         define( 'HEADER_TEXTCOLOR', $custom_header_support['default-text-color'] );
  133.         define( 'HEADER_IMAGE', '' );
  134.         define( 'HEADER_IMAGE_WIDTH', $custom_header_support['width'] );
  135.         define( 'HEADER_IMAGE_HEIGHT', $custom_header_support['height'] );
  136.         add_custom_image_header( $custom_header_support['wp-head-callback'], $custom_header_support['admin-head-callback'], $custom_header_support['admin-preview-callback'] );
  137.         add_custom_background();
  138.     }
  139.  
  140.     // Adaptive images: create a new image-size and re-set defaults for standard image sizes ...
  141.     if ( function_exists( 'add_image_size' ) ) {
  142.         add_image_size( 'small', 256, 9999 ); //256 pixels wide (and unlimited height)
  143.     }
  144.  
  145.     // Adaptive images: ... and re-set standard image size defaults
  146.     update_option('thumbnail_size_w', 640);
  147.     update_option('thumbnail_size_h', 9999);
  148.     update_option('medium_size_w', 896);
  149.     update_option('medium_size_h', 9999);
  150.     update_option('large_size_w', 1536);
  151.     update_option('large_size_h', 9999);
  152.     update_option('full_size_w', 2400);
  153.     update_option('full_size_h', 9999);
  154.  
  155.     // remove featured image box from post editor
  156.     add_action( 'admin_head', 'remove_wordpress_cfields' );
  157.     function remove_wordpress_cfields() {
  158.     echo '<style>#postimagediv { display: none; }</style>';
  159.     echo '<style>label[for=postimagediv-hide] { display: none; }</style>';
  160.     }
  161. }
  162. endif; // twentyeleven_setup
  163.  
  164. if ( ! function_exists( 'twentyeleven_header_style' ) ) :
  165. /**
  166.  * Styles the header image and text displayed on the blog
  167.  *
  168.  * @since Twenty Eleven 1.0
  169.  */
  170. function twentyeleven_header_style() {
  171.     $text_color = get_header_textcolor();
  172.  
  173.     // If no custom options for text are set, let's bail.
  174.     if ( $text_color == HEADER_TEXTCOLOR )
  175.         return;
  176.  
  177.     // If we get this far, we have custom styles. Let's do this.
  178.     ?>
  179.     <style type="text/css">
  180.     <?php
  181.         // Has the text been hidden?
  182.         if ( 'blank' == $text_color ) :
  183.     ?>
  184.         #site-title,
  185.         #site-description {
  186.             position: absolute !important;
  187.             clip: rect(1px 1px 1px 1px); /* IE6, IE7 */
  188.             clip: rect(1px, 1px, 1px, 1px);
  189.         }
  190.     <?php
  191.         // If the user has set a custom color for the text use that
  192.         else :
  193.     ?>
  194.         #site-title a,
  195.         #site-description {
  196.             color: #<?php echo $text_color; ?> !important;
  197.         }
  198.     <?php endif; ?>
  199.     </style>
  200.     <?php
  201. }
  202. endif; // twentyeleven_header_style
  203.  
  204. if ( ! function_exists( 'twentyeleven_admin_header_style' ) ) :
  205. /**
  206.  * Styles the header image displayed on the Appearance > Header admin panel.
  207.  *
  208.  * Referenced via add_theme_support('custom-header') in twentyeleven_setup().
  209.  *
  210.  * @since Twenty Eleven 1.0
  211.  */
  212. function twentyeleven_admin_header_style() {
  213. ?>
  214.     <style type="text/css">
  215.     .appearance_page_custom-header #headimg {
  216.         border: none;
  217.     }
  218.     #headimg h1,
  219.     #desc {
  220.         font-family: "Helvetica Neue", Arial, Helvetica, "Nimbus Sans L", sans-serif;
  221.     }
  222.     #headimg h1 {
  223.         margin: 0;
  224.     }
  225.     #headimg h1 a {
  226.         font-size: 30px;
  227.         line-height: 36px;
  228.         text-decoration: none;
  229.     }
  230.     #desc {
  231.         font-size: 14px;
  232.         line-height: 23px;
  233.         padding: 0 0 1.5em;
  234.     }
  235.  
  236.     <?php
  237.         // If the user has set a custom color for the text use that
  238.         if ( get_header_textcolor() != HEADER_TEXTCOLOR ) :
  239.     ?>
  240.         #site-title a,
  241.         #site-description {
  242.             color: #<?php echo get_header_textcolor(); ?>;
  243.         }
  244.     <?php endif; ?>
  245.     #headimg img {
  246.         max-width: 200px;
  247.         height: auto;
  248.         width: 100%;
  249.     }
  250.     </style>
  251. <?php
  252. }
  253. endif; // twentyeleven_admin_header_style
  254.  
  255. if ( ! function_exists( 'twentyeleven_admin_header_image' ) ) :
  256. /**
  257.  * Custom header image markup displayed on the Appearance > Header admin panel.
  258.  *
  259.  * Referenced via add_theme_support('custom-header') in twentyeleven_setup().
  260.  *
  261.  * @since Twenty Eleven 1.0
  262.  */
  263. function twentyeleven_admin_header_image() { ?>
  264.     <div id="headimg">
  265.         <?php
  266.         $color = get_header_textcolor();
  267.         $image = get_header_image();
  268.         if ( $color && $color != 'blank' )
  269.             $style = ' style="color:#' . $color . '"';
  270.         else
  271.             $style = ' style="display:none"';
  272.         ?>
  273.         <?php if ( $image ) : ?>
  274.             <img src="<?php echo esc_url( $image ); ?>" alt="" />
  275.         <?php endif; ?>
  276.         <h1><a id="name"<?php echo $style; ?> onclick="return false;" href="<?php echo esc_url( home_url( /' ) ); ?>"><?php bloginfo( 'name' ); ?></a></h1>
  277.         <div id="desc"<?php echo $style; ?>><?php bloginfo( 'description' ); ?></div>
  278.     </div>
  279. <?php }
  280. endif; // twentyeleven_admin_header_image
  281.  
  282. /**
  283. * Sets the post excerpt length to 55 words.
  284. *
  285. * To override this length in a child theme, remove the filter and add your own
  286. * function tied to the excerpt_length filter hook.
  287. */
  288. function twentyeleven_excerpt_length( $length ) {
  289.     return 55;
  290. }
  291. add_filter( 'excerpt_length', 'twentyeleven_excerpt_length' );
  292.  
  293. if ( ! function_exists( 'twentyeleven_continue_reading_link' ) ) :
  294. /**
  295. * Returns a "Continue Reading" link for excerpts
  296. */
  297. function twentyeleven_continue_reading_link() {
  298.     return ' <a href="'. esc_url( get_permalink() ) . '">' . __( 'Continue reading <span class="meta-nav">&#x25b6;</span>', 'twentyeleven' ) . '</a>';
  299. }
  300. endif; // twentyeleven_continue_reading_link
  301.  
  302. /**
  303.  * Replaces "[...]" (appended to automatically generated excerpts) with an ellipsis and twentyeleven_continue_reading_link().
  304.  *
  305.  * To override this in a child theme, remove the filter and add your own
  306.  * function tied to the excerpt_more filter hook.
  307.  */
  308. function twentyeleven_auto_excerpt_more( $more ) {
  309.     return ' &hellip;' . twentyeleven_continue_reading_link();
  310. }
  311. add_filter( 'excerpt_more', 'twentyeleven_auto_excerpt_more' );
  312.  
  313. /**
  314.  * Adds a pretty "Continue Reading" link to custom post excerpts.
  315.  *
  316.  * To override this link in a child theme, remove the filter and add your own
  317.  * function tied to the get_the_excerpt filter hook.
  318.  */
  319. function twentyeleven_custom_excerpt_more( $output ) {
  320.     if ( has_excerpt() && ! is_attachment() ) {
  321.         $output .= twentyeleven_continue_reading_link();
  322.     }
  323.     return $output;
  324. }
  325. add_filter( 'get_the_excerpt', 'twentyeleven_custom_excerpt_more' );
  326.  
  327. /**
  328.  * Get our wp_nav_menu() fallback, wp_page_menu(), to show a home link.
  329.  */
  330. function twentyeleven_page_menu_args( $args ) {
  331.     if ( ! isset( $args['show_home'] ) )
  332.         $args['show_home'] = true;
  333.     return $args;
  334. }
  335. add_filter( 'wp_page_menu_args', 'twentyeleven_page_menu_args' );
  336.  
  337. /**
  338.  * Register our sidebars and widgetized areas. Also register the default Epherema widget.
  339.  *
  340.  * @since Twenty Eleven 1.0
  341.  */
  342. function twentyeleven_widgets_init() {
  343.  
  344.     register_widget( 'Twenty_Eleven_Ephemera_Widget' );
  345.  
  346.     register_sidebar( array(
  347.         'name' => __( 'Main Sidebar', 'twentyeleven' ),
  348.         'id' => 'sidebar-1',
  349.         'before_widget' => '<aside id="%1$s" class="widget %2$s">',
  350.         'after_widget' => "</aside>",
  351.         'before_title' => '<h3 class="widget-title">',
  352.         'after_title' => '</h3>',
  353.     ) );
  354.  
  355.     register_sidebar( array(
  356.         'name' => __( 'Showcase Sidebar', 'twentyeleven' ),
  357.         'id' => 'sidebar-2',
  358.         'description' => __( 'The sidebar for the optional Showcase Template', 'twentyeleven' ),
  359.         'before_widget' => '<aside id="%1$s" class="widget %2$s">',
  360.         'after_widget' => "</aside>",
  361.         'before_title' => '<h3 class="widget-title">',
  362.         'after_title' => '</h3>',
  363.     ) );
  364.  
  365.     register_sidebar( array(
  366.         'name' => __( 'Footer Area One', 'twentyeleven' ),
  367.         'id' => 'sidebar-3',
  368.         'description' => __( 'An optional widget area for your site footer', 'twentyeleven' ),
  369.         'before_widget' => '<aside id="%1$s" class="widget %2$s">',
  370.         'after_widget' => "</aside>",
  371.         'before_title' => '<h3 class="widget-title">',
  372.         'after_title' => '</h3>',
  373.     ) );
  374.  
  375.     register_sidebar( array(
  376.         'name' => __( 'Footer Area Two', 'twentyeleven' ),
  377.         'id' => 'sidebar-4',
  378.         'description' => __( 'An optional widget area for your site footer', 'twentyeleven' ),
  379.         'before_widget' => '<aside id="%1$s" class="widget %2$s">',
  380.         'after_widget' => "</aside>",
  381.         'before_title' => '<h3 class="widget-title">',
  382.         'after_title' => '</h3>',
  383.     ) );
  384.  
  385.     register_sidebar( array(
  386.         'name' => __( 'Footer Area Three', 'twentyeleven' ),
  387.         'id' => 'sidebar-5',
  388.         'description' => __( 'An optional widget area for your site footer', 'twentyeleven' ),
  389.         'before_widget' => '<aside id="%1$s" class="widget %2$s">',
  390.         'after_widget' => "</aside>",
  391.         'before_title' => '<h3 class="widget-title">',
  392.         'after_title' => '</h3>',
  393.     ) );
  394. }
  395. add_action( 'widgets_init', 'twentyeleven_widgets_init' );
  396.  
  397. if ( ! function_exists( 'twentyeleven_content_nav' ) ) :
  398. /**
  399.  * Display navigation to next/previous pages when applicable
  400.  */
  401. function twentyeleven_content_nav( $html_id ) {
  402.     global $wp_query;
  403.  
  404.     if ( $wp_query->max_num_pages > 1 ) : ?>
  405.         <nav id="<?php echo esc_attr( $html_id ); ?>">
  406.             <h3 class="assistive-text"><?php _e( 'Post navigation', 'twentyeleven' ); ?></h3>
  407.             <div class="nav-previous"><?php next_posts_link( __( '<span class="meta-nav">&#x25c0; /span> Older posts', 'twentyeleven' ) ); ?></div>
  408.             <div class="nav-next"><?php previous_posts_link( __( 'Newer posts <span class="meta-nav">&#x25b6;</span>', 'twentyeleven' ) ); ?></div>
  409.         </nav><!-- #nav-above -->
  410.     <?php endif;
  411. }
  412. endif; // twentyeleven_content_nav
  413.  
  414. /**
  415.  * Return the URL for the first link found in the post content.
  416.  *
  417.  * @since Twenty Eleven 1.0
  418.  * @return string|bool URL or false when no link is present.
  419.  */
  420. function twentyeleven_url_grabber() {
  421.     if ( ! preg_match( '/<a\s[^>]*?href=[\'"](.+?)[\'"]/is', get_the_content(), $matches ) )
  422.         return false;
  423.  
  424.     return esc_url_raw( $matches[1] );
  425. }
  426.  
  427. /**
  428.  * Count the number of footer sidebars to enable dynamic classes for the footer
  429.  */
  430. function twentyeleven_footer_sidebar_class() {
  431.     $count = 0;
  432.  
  433.     if ( is_active_sidebar( 'sidebar-3' ) )
  434.         $count++;
  435.  
  436.     if ( is_active_sidebar( 'sidebar-4' ) )
  437.         $count++;
  438.  
  439.     if ( is_active_sidebar( 'sidebar-5' ) )
  440.         $count++;
  441.  
  442.     $class = '';
  443.  
  444.     switch ( $count ) {
  445.         case '1':
  446.             $class = 'one';
  447.             break;
  448.         case '2':
  449.             $class = 'two';
  450.             break;
  451.         case '3':
  452.             $class = 'three';
  453.             break;
  454.     }
  455.  
  456.     if ( $class )
  457.         echo 'class="' . $class . '"';
  458. }
  459.  
  460. if ( ! function_exists( 'twentyeleven_comment' ) ) :
  461. /**
  462.  * Template for comments and pingbacks.
  463.  *
  464.  * To override this walker in a child theme without modifying the comments template
  465.  * simply create your own twentyeleven_comment(), and that function will be used instead.
  466.  *
  467.  * Used as a callback by wp_list_comments() for displaying the comments.
  468.  *
  469.  * @since Twenty Eleven 1.0
  470.  */
  471. function twentyeleven_comment( $comment, $args, $depth ) {
  472.     $GLOBALS['comment'] = $comment;
  473.     switch ( $comment->comment_type ) :
  474.         case 'pingback' :
  475.         case 'trackback' :
  476.     ?>
  477.     <li class="post pingback">
  478.         <p><?php _e( 'Pingback:', 'twentyeleven' ); ?> <?php comment_author_link(); ?><?php edit_comment_link( __( 'Edit', 'twentyeleven' ), '<span class="edit-link">', '</span>' ); ?></p>
  479.     <?php
  480.             break;
  481.         default :
  482.     ?>
  483.     <li <?php comment_class(); ?> id="li-comment-<?php comment_ID(); ?>">
  484.         <article id="comment-<?php comment_ID(); ?>" class="comment">
  485.             <footer class="comment-meta">
  486.                 <div class="comment-author vcard">
  487.                     <?php
  488.                         $avatar_size = 68;
  489.                         if ( '0' != $comment->comment_parent )
  490.                             $avatar_size = 39;
  491.  
  492.                         echo get_avatar( $comment, $avatar_size );
  493.  
  494.                         /* translators: 1: comment author, 2: date and time */
  495.                         printf( __( '%1$s on %2$s <span class="says">said:</span>',  twentyeleven' ),
  496.                             sprintf( '<span class="fn">%s</span>', get_comment_author_link() ),
  497.                             sprintf( '<a href="%1$s"><time datetime="%2$s">%3$s</time></a>',
  498.                                 esc_url( get_comment_link( $comment->comment_ID ) ),
  499.                                 get_comment_time( 'c' ),
  500.                                 /* translators: 1: date, 2: time */
  501.                                 sprintf( __( '%1$s at %2$s', 'twentyeleven' ), get_comment_date(), get_comment_time() )
  502.                             )
  503.                         );
  504.                     ?>
  505.  
  506.                     <?php edit_comment_link( __( 'Edit', 'twentyeleven' ), '<span class="edit-link">', '</span>' ); ?>
  507.                 </div><!-- .comment-author .vcard -->
  508.  
  509.                 <?php if ( $comment->comment_approved == '0' ) : ?>
  510.                     <em class="comment-awaiting-moderation"><?php _e( 'Your comment is awaiting moderation.', 'twentyeleven' ); ?></em>
  511.                     <br />
  512.                 <?php endif; ?>
  513.  
  514.             </footer>
  515.  
  516.             <div class="comment-content"><?php comment_text(); ?></div>
  517.  
  518.             <div class="reply">
  519.                 <?php comment_reply_link( array_merge( $args, array( 'reply_text' => __( 'Reply <span>&darr;</span>', 'twentyeleven' ), 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>
  520.             </div><!-- .reply -->
  521.         </article><!-- #comment-## -->
  522.  
  523.     <?php
  524.             break;
  525.     endswitch;
  526. }
  527. endif; // ends check for twentyeleven_comment()
  528.  
  529. if ( ! function_exists( 'twentyeleven_posted_on' ) ) :
  530. /**
  531.  * Prints HTML with meta information for the current post-date/time and author.
  532.  * Create your own twentyeleven_posted_on to override in a child theme
  533.  *
  534.  * @since Twenty Eleven 1.0
  535.  */
  536. function twentyeleven_posted_on() {
  537.     printf( __( '<span class="sep">Posted on </span><a href="%1$s" title="%2$s" rel="bookmark"><time class="entry-date" datetime="%3$s">%4$s</time></a><span class="by-author"> <span class="sep"> by </span> <span class="author vcard"><a class="url fn n" href="%5$s" title="%6$s" rel="author">%7$s</a></span></span>', 'twentyeleven' ),
  538.         esc_url( get_permalink() ),
  539.         esc_attr( get_the_time() ),
  540.         esc_attr( get_the_date( 'c' ) ),
  541.         esc_html( get_the_date() ),
  542.         esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
  543.         esc_attr( sprintf( __( 'View all posts by %s', 'twentyeleven' ), get_the_author() ) ),
  544.         get_the_author()
  545.     );
  546. }
  547. endif;
  548.  
  549. /**
  550.  * Adds two classes to the array of body classes.
  551.  * The first is if the site has only had one author with published posts.
  552.  * The second is if a singular post being displayed
  553.  *
  554.  * @since Twenty Eleven 1.0
  555.  */
  556. function twentyeleven_body_classes( $classes ) {
  557.  
  558.     if ( function_exists( 'is_multi_author' ) && ! is_multi_author() )
  559.         $classes[] = 'single-author';
  560.     if ( is_singular() && ! is_home() && ! is_page_template( 'showcase.php' ) && ! is_page_template( 'sidebar-page.php' ) )
  561.         $classes[] = 'singular';
  562.     return $classes;
  563. }
  564. add_filter( 'body_class', 'twentyeleven_body_classes' );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement