Changeset 6577
- Timestamp:
- 02/09/2018 05:42:07 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-main/functions.php
r6507 r6577 66 66 67 67 /** 68 * Extend the default WordPress body classes. 69 * 70 * Adds classes to make it easier to target specific pages. 71 * 72 * @param array $classes Body classes. 73 * @return array 74 */ 75 function body_class( $classes ) { 76 if ( is_page() ) { 77 $classes[] = 'page-' . get_query_var( 'pagename' ); 78 } 79 80 return array_unique( $classes ); 81 } 82 add_filter( 'body_class', __NAMESPACE__ . '\body_class' ); 83 84 /** 68 85 * Custom template tags. 69 86 */
Note: See TracChangeset
for help on using the changeset viewer.