Make WordPress Core

Ticket #21766: post-template.php.diff

File post-template.php.diff, 1.2 KB (added by norcross, 14 years ago)

removing commented out items

  • post-template.php

     
    374374}
    375375
    376376/**
     377 * Retrieve the non-class items for the body element as an array.
     378 *
     379 * @since 3.4
     380 *
     381 * @param string|array $item One or more items to add to the item list.
     382 */
     383
     384function get_body_items($item = '') {
     385
     386        $item = array();
     387
     388        $item_array = apply_filters( 'body_items', $item);
     389
     390        $items = empty($item_array) ? '' : ' '.join( ' ', $item_array );       
     391
     392return $items;
     393}
     394
     395/**
    377396 * Display the classes for the body element.
    378397 *
    379398 * @since 2.8.0
     
    381400 * @param string|array $class One or more classes to add to the class list.
    382401 */
    383402function body_class( $class = '' ) {
    384         // Separates classes with a single space, collates classes for body element
    385         echo 'class="' . join( ' ', get_body_class( $class ) ) . '"';
     403
     404        // get array of body element items
     405        $items = get_body_items();
     406
     407        // Separates classes with a single space, collates classes for body element, and appends other items
     408        echo 'class="' . join( ' ', get_body_class( $class ) ) . '"'. $items;
    386409}
    387410
    388411/**