Changeset 5720
- Timestamp:
- 07/26/2017 05:27:10 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-breathe/functions.php
r5683 r5720 151 151 } 152 152 add_filter( 'nav_menu_item_args', __NAMESPACE__ . '\add_screen_reader_text_for_icon_menu_items', 10, 2 ); 153 154 /** 155 * Disables Jetpack Mentions on any handbook page or comment. 156 * 157 * More precisely, this prevents the linked mentions from being shown. A more 158 * involved approach (to include clearing meta-cached data) would be needed to 159 * more efficiently prevent mentions from being looked for in the first place. 160 * 161 * @param string $linked The linked mention. 162 * @param string $mention The term being mentioned. 163 * @return string 164 */ 165 function disable_mentions_for_handbook( $linked, $mention ) { 166 if ( function_exists( 'wporg_is_handbook' ) && wporg_is_handbook() && ! is_single( 'credits' ) ) { 167 return '@' . $mention; 168 } 169 170 return $linked; 171 } 172 add_filter( 'jetpack_mentions_linked_mention', __NAMESPACE__ . '\disable_mentions_for_handbook', 10, 2 ); 173
Note: See TracChangeset
for help on using the changeset viewer.