Changeset 735
- Timestamp:
- 07/02/2014 07:51:16 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/functions.php
r724 r735 53 53 add_theme_support( 'automatic-feed-links' ); 54 54 add_theme_support( 'post-thumbnails' ); 55 56 add_filter( 'the_excerpt', __NAMESPACE__ . '\\lowercase_P_dangit_just_once' ); 55 57 56 58 // Temporarily disable comments … … 414 416 return $status; 415 417 } 418 419 /** 420 * Allows for "Wordpress" just for the excerpt value of the capital_P_dangit function. 421 * 422 * WP.org has a global output buffer that runs capital_P_dangit() over displayed 423 * content. For this one field of this one post, circumvent that function to 424 * to show the lowercase P. 425 * 426 * @param string $excerpt The post excerpt. 427 * @return string 428 */ 429 function lowercase_P_dangit_just_once( $excerpt ) { 430 if ( 'wp-parser-function' == get_post_type() && 'capital_P_dangit' == get_the_title() ) { 431 $excerpt = str_replace( 'Wordpress', 'Wordpress', $excerpt ); 432 } 433 434 return $excerpt; 435 }
Note: See TracChangeset
for help on using the changeset viewer.