Make WordPress Core


Ignore:
Timestamp:
07/21/2020 05:06:55 PM (6 years ago)
Author:
SergeyBiryukov
Message:

Site Health: Rename the filters added in [48546] for clarity.

See #50663.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-debug-data.php

    r48546 r48549  
    915915
    916916                foreach ( $plugins as $plugin_path => $plugin ) {
    917                         $auto_updates_enabled_str  = __( 'Auto-updates enabled' );
    918                         $auto_updates_disabled_str = __( 'Auto-updates disabled' );
     917                        $auto_updates_enabled_string  = __( 'Auto-updates enabled' );
     918                        $auto_updates_disabled_string = __( 'Auto-updates disabled' );
    919919
    920920                        $plugin_part = ( is_plugin_active( $plugin_path ) ) ? 'wp-plugins-active' : 'wp-plugins-inactive';
    … …  
    959959                                         * @since 5.5.0
    960960                                         *
    961                                          * @param string $auto_updates_enabled_str The string output for the auto-updates column.
    962                                          * @param array  $plugin                   An array of plugin data.
    963                                          * @param bool   $enabled                  True if auto-updates are enabled for this item,
    964                                          *                                         false otherwise.
     961                                         * @param string $auto_updates_enabled_string The string output for the auto-updates column.
     962                                         * @param array  $plugin                      An array of plugin data.
     963                                         * @param bool   $enabled                     True if auto-updates are enabled for this item,
     964                                         *                                            false otherwise.
    965965                                         */
    966                                         $auto_updates_enabled_str = apply_filters( 'plugin_auto_update_debug_str', $auto_updates_enabled_str, $plugin, $enabled );
    967 
    968                                         $plugin_version_string       .= ' | ' . $auto_updates_enabled_str;
    969                                         $plugin_version_string_debug .= ', ' . $auto_updates_enabled_str;
     966                                        $auto_updates_enabled_string = apply_filters( 'plugin_auto_update_debug_string', $auto_updates_enabled_string, $plugin, $enabled );
     967
     968                                        $plugin_version_string       .= ' | ' . $auto_updates_enabled_string;
     969                                        $plugin_version_string_debug .= ', ' . $auto_updates_enabled_string;
    970970                                } else {
    971971                                        $enabled = false;
    972972
    973973                                        /** This filter is documented in wp-admin/includes/class-wp-debug-data.php */
    974                                         $auto_updates_disabled_str = apply_filters( 'plugin_auto_update_debug_str', $auto_updates_disabled_str, $plugin, $enabled );
    975 
    976                                         $plugin_version_string       .= ' | ' . $auto_updates_disabled_str;
    977                                         $plugin_version_string_debug .= ', ' . $auto_updates_disabled_str;
     974                                        $auto_updates_disabled_string = apply_filters( 'plugin_auto_update_debug_string', $auto_updates_disabled_string, $plugin, $enabled );
     975
     976                                        $plugin_version_string       .= ' | ' . $auto_updates_disabled_string;
     977                                        $plugin_version_string_debug .= ', ' . $auto_updates_disabled_string;
    978978                                }
    979979                        }
    … …  
    10751075                if ( $auto_updates_enabled ) {
    10761076                        if ( in_array( $active_theme->stylesheet, $auto_updates, true ) ) {
    1077                                 $auto_updates_enabled_str = __( 'Enabled' );
    1078                                 $enabled                  = true;
     1077                                $auto_updates_enabled_string = __( 'Enabled' );
     1078                                $enabled                     = true;
    10791079
    10801080                                /**
    … …  
    10831083                                 * @since 5.5.0
    10841084                                 *
    1085                                  * @param string $auto_updates_enabled_str The string output for the auto-updates column.
    1086                                  * @param object $theme                    An object of theme data.
    1087                                  * @param bool   $enabled                  True if auto-updates are enabled for this item,
    1088                                  *                                         false otherwise.
     1085                                 * @param string $auto_updates_enabled_string The string output for the auto-updates column.
     1086                                 * @param object $theme                       An object of theme data.
     1087                                 * @param bool   $enabled                     True if auto-updates are enabled for this item,
     1088                                 *                                            false otherwise.
    10891089                                 */
    1090                                 $auto_updates_enabled_str = apply_filters( 'theme_auto_update_debug_str', $auto_updates_enabled_str, $active_theme, $enabled );
     1090                                $auto_updates_enabled_string = apply_filters( 'theme_auto_update_debug_string', $auto_updates_enabled_string, $active_theme, $enabled );
    10911091
    10921092                        } else {
    1093                                 $auto_updates_disabled_str = __( 'Disabled' );
    1094                                 $enabled                   = false;
     1093                                $auto_updates_disabled_string = __( 'Disabled' );
     1094                                $enabled                      = false;
    10951095
    10961096                                /** This filter is documented in wp-admin/includes/class-wp-debug-data.php */
    1097                                 $auto_updates_disabled_str = apply_filters( 'theme_auto_update_debug_str', $auto_updates_disabled_str, $active_theme, $enabled );
    1098 
    1099                         }
    1100                         $theme_auto_update_string = $enabled ? $auto_updates_enabled_str : $auto_updates_disabled_str;
     1097                                $auto_updates_disabled_string = apply_filters( 'theme_auto_update_debug_string', $auto_updates_disabled_string, $active_theme, $enabled );
     1098
     1099                        }
     1100                        $theme_auto_update_string = $enabled ? $auto_updates_enabled_string : $auto_updates_disabled_string;
    11011101
    11021102                        $info['wp-active-theme']['fields']['auto_update'] = array(
    … …  
    11801180                        }
    11811181
    1182                         $auto_updates_enabled_str  = __( 'Auto-updates enabled' );
    1183                         $auto_updates_disabled_str = __( 'Auto-updates disabled' );
     1182                        $auto_updates_enabled_string  = __( 'Auto-updates enabled' );
     1183                        $auto_updates_disabled_string = __( 'Auto-updates disabled' );
    11841184
    11851185                        $theme_version = $theme->version;
    … …  
    12211221
    12221222                                        /** This filter is documented in wp-admin/includes/class-wp-debug-data.php */
    1223                                         $auto_updates_enabled_str = apply_filters( 'theme_auto_update_debug_str', $auto_updates_enabled_str, $theme, $enabled );
    1224 
    1225                                         $theme_version_string       .= ' | ' . $auto_updates_enabled_str;
    1226                                         $theme_version_string_debug .= ',' . $auto_updates_enabled_str;
     1223                                        $auto_updates_enabled_string = apply_filters( 'theme_auto_update_debug_string', $auto_updates_enabled_string, $theme, $enabled );
     1224
     1225                                        $theme_version_string       .= ' | ' . $auto_updates_enabled_string;
     1226                                        $theme_version_string_debug .= ',' . $auto_updates_enabled_string;
    12271227                                } else {
    12281228                                        $enabled = false;
    12291229
    12301230                                        /** This filter is documented in wp-admin/includes/class-wp-debug-data.php */
    1231                                         $auto_updates_disabled_str = apply_filters( 'theme_auto_update_debug_str', $auto_updates_disabled_str, $theme, $enabled );
    1232 
    1233                                         $theme_version_string       .= ' | ' . $auto_updates_disabled_str;
    1234                                         $theme_version_string_debug .= ', ' . $auto_updates_disabled_str;
     1231                                        $auto_updates_disabled_string = apply_filters( 'theme_auto_update_debug_string', $auto_updates_disabled_string, $theme, $enabled );
     1232
     1233                                        $theme_version_string       .= ' | ' . $auto_updates_disabled_string;
     1234                                        $theme_version_string_debug .= ', ' . $auto_updates_disabled_string;
    12351235                                }
    12361236                        }
Note: See TracChangeset for help on using the changeset viewer.