Ticket #21766: post-template.php.diff
| File post-template.php.diff, 1.2 KB (added by , 14 years ago) |
|---|
-
post-template.php
374 374 } 375 375 376 376 /** 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 384 function 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 392 return $items; 393 } 394 395 /** 377 396 * Display the classes for the body element. 378 397 * 379 398 * @since 2.8.0 … … 381 400 * @param string|array $class One or more classes to add to the class list. 382 401 */ 383 402 function 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; 386 409 } 387 410 388 411 /**