diff --git a/wp-admin/includes/screen.php b/wp-admin/includes/screen.php index 8e02a9306c..0009a68435 100644 --- a/wp-admin/includes/screen.php +++ b/wp-admin/includes/screen.php @@ -651,22 +651,22 @@ final class WP_Screen { // Call old contextual_help_list filter. self::$_old_compat_help = apply_filters( 'contextual_help_list', self::$_old_compat_help, $this ); - if ( isset( self::$_old_compat_help[ $this->id ] ) || empty($this->_help_tabs ) ) { - // Call old contextual_help filter. - if ( isset( self::$_old_compat_help[ $this->id ] ) ) - $contextual_help = apply_filters( 'contextual_help', self::$_old_compat_help[ $this->id ], $this->id, $this ); + $old_help = isset( self::$_old_compat_help[ $this->id ] ) ? self::$_old_compat_help[ $this->id ] : ''; + $old_help = apply_filters( 'contextual_help', $old_help, $this->id, $this ); - if ( empty( $contextual_help ) ) { - $default_help = __( 'Documentation' ); - $default_help .= '
'; - $default_help .= __( 'Support Forums' ); - $contextual_help = '

' . apply_filters( 'default_contextual_help', $default_help ) . '

'; - } + // Default help only if there is no old-style block of text and no new-style help tabs. + if ( empty( $old_help ) && empty( $this->_help_tabs ) ) { + $default_help = __( 'Documentation' ); + $default_help .= '
'; + $default_help .= __( 'Support Forums' ); + $old_help = '

' . apply_filters( 'default_contextual_help', $default_help ) . '

'; + } + if ( $old_help ) { $this->add_help_tab( array( 'id' => 'contextual-help', 'title' => __('Screen Info'), - 'content' => $contextual_help, + 'content' => $old_help, ) ); }