Changeset 777
- Timestamp:
- 08/01/2014 06:51:13 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/functions.php
r775 r777 69 69 70 70 add_filter( 'breadcrumb_trail_items', __NAMESPACE__ . '\\breadcrumb_trail_items', 10, 2 ); 71 add_filter( 'breadcrumb_trail_items', __NAMESPACE__ . '\\breadcrumb_trail_remove_handbook', 10, 2 );72 71 73 72 treat_comments_as_examples(); … … 101 100 // Unset the last element since it shifted up in trail hierarchy 102 101 unset( $items[4] ); 103 104 return $items;105 }106 107 /**108 * Removes the 'Handbook' segment of the breakcrumb, when present.109 *110 * There is no handbook page or listing at present.111 *112 * @param array $items The breadcrumb trail items113 * @param array $args Original arg114 * @return array115 */116 function breadcrumb_trail_remove_handbook( $items, $args ) {117 if ( false !== strpos( $items[1], '>Handbook</a>' ) ) {118 array_splice( $items, 1, 1 );119 }120 102 121 103 return $items;
Note: See TracChangeset
for help on using the changeset viewer.