Changeset 8254 for sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-support/helphub-update-php-strings.php
- Timestamp:
- 02/15/2019 03:54:03 AM (7 years ago)
- File:
-
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-support/helphub-update-php-strings.php
r8253 r8254 16 16 * @return string Filtered post title. 17 17 */ 18 function hh_filter_update_php_title( $title, $id ) {18 function wporg_support_filter_update_php_title( $title, $id ) { 19 19 if ( is_admin() ) { 20 20 return $title; … … 27 27 return __( 'Get a faster, more secure website: update your PHP today', 'wporg-forums' ); 28 28 } 29 add_filter( 'the_title', ' hh_filter_update_php_title', 5, 2 );29 add_filter( 'the_title', 'wporg_support_filter_update_php_title', 5, 2 ); 30 30 31 31 /** … … 35 35 * @return string Filtered post content. 36 36 */ 37 function hh_filter_update_php_content( $content ) {37 function wporg_support_filter_update_php_content( $content ) { 38 38 if ( is_admin() ) { 39 39 return $content; 40 40 } 41 41 42 if ( ! i s_page_template( 'page-update-php.php') ) {42 if ( ! in_the_loop() || get_the_ID() !== get_queried_object_id() ) { 43 43 return $content; 44 44 } 45 45 46 if ( ! i n_the_loop() || get_the_ID() !== get_queried_object_id() ) {46 if ( ! is_page_template( 'page-update-php.php' ) ) { 47 47 return $content; 48 48 } … … 145 145 return $content; 146 146 } 147 add_filter( 'the_content', ' hh_filter_update_php_content', 5 );147 add_filter( 'the_content', 'wporg_support_filter_update_php_content', 5 );
Note: See TracChangeset
for help on using the changeset viewer.