Changeset 8254
- Timestamp:
- 02/15/2019 03:54:03 AM (7 years ago)
- Location:
- sites/trunk/wordpress.org/public_html/wp-content
- Files:
-
- 1 deleted
- 3 edited
- 1 copied
-
plugins/support-helphub/inc/helphub-update-php (deleted)
-
plugins/support-helphub/support-helphub.php (modified) (1 diff)
-
themes/pub/wporg-support/functions.php (modified) (1 diff)
-
themes/pub/wporg-support/helphub-update-php-strings.php (copied) (copied from sites/trunk/wordpress.org/public_html/wp-content/plugins/support-helphub/inc/helphub-update-php/helphub-update-php.php ) (4 diffs)
-
themes/pub/wporg-support/page-update-php.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/support-helphub/support-helphub.php
r8071 r8254 24 24 require_once( dirname( __FILE__ ) . '/inc/helphub-customroles/class-helphub-custom-roles.php' ); 25 25 require_once( dirname( __FILE__ ) . '/inc/helphub-manager/class-helphub-manager.php' ); 26 require_once( dirname( __FILE__ ) . '/inc/helphub-update-php/helphub-update-php.php' ); -
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-support/functions.php
r8208 r8254 811 811 } 812 812 813 /** 814 * Include the Strings for the supporg/update-php page. 815 */ 816 include_once __DIR__ . '/helphub-update-php-strings.php'; -
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 ); -
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-support/page-update-php.php
r8071 r8254 9 9 /* 10 10 Use the default template for pages. This specific template is only used to indicate that the content needs to be 11 manually injected, which happens in the HelpHub plugin.11 manually injected, which happens in `helphub-update-php-strings.php` 12 12 */ 13 require get_stylesheet_directory() . '/page.php'; 13 if ( 'en_US' == get_locale() ) { 14 // Helphub will be active, so we need it's sidebar 15 require get_stylesheet_directory() . '/page.php'; 16 } else { 17 // Helphub may be active, but we're loading in a non-en_US locale so shouldn't display the EN sidebar 18 require get_stylesheet_directory() . '/page-full-width.php'; 19 }
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)