Changeset 48546
- Timestamp:
- 07/21/2020 04:52:47 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/class-wp-debug-data.php
r48544 r48546 908 908 $auto_updates = array(); 909 909 910 $auto_updates_enabled = wp_is_auto_update_enabled_for_type( 'plugin' ); 911 $auto_updates_enabled_str = __( 'Auto-updates enabled' ); 912 $auto_updates_disabled_str = __( 'Auto-updates disabled' ); 910 $auto_updates_enabled = wp_is_auto_update_enabled_for_type( 'plugin' ); 913 911 914 912 if ( $auto_updates_enabled ) { … … 917 915 918 916 foreach ( $plugins as $plugin_path => $plugin ) { 917 $auto_updates_enabled_str = __( 'Auto-updates enabled' ); 918 $auto_updates_disabled_str = __( 'Auto-updates disabled' ); 919 919 920 $plugin_part = ( is_plugin_active( $plugin_path ) ) ? 'wp-plugins-active' : 'wp-plugins-inactive'; 920 921 … … 951 952 if ( $auto_updates_enabled ) { 952 953 if ( in_array( $plugin_path, $auto_updates, true ) ) { 954 $enabled = true; 955 956 /** 957 * Filters the text string of the auto-updates setting for each plugin in the Site Health debug data. 958 * 959 * @since 5.5.0 960 * 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. 965 */ 966 $auto_updates_enabled_str = apply_filters( 'plugin_auto_update_debug_str', $auto_updates_enabled_str, $plugin, $enabled ); 967 953 968 $plugin_version_string .= ' | ' . $auto_updates_enabled_str; 954 969 $plugin_version_string_debug .= ', ' . $auto_updates_enabled_str; 955 970 } else { 971 $enabled = false; 972 973 /** 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 956 976 $plugin_version_string .= ' | ' . $auto_updates_disabled_str; 957 977 $plugin_version_string_debug .= ', ' . $auto_updates_disabled_str; … … 1055 1075 if ( $auto_updates_enabled ) { 1056 1076 if ( in_array( $active_theme->stylesheet, $auto_updates, true ) ) { 1057 $theme_auto_update_string = __( 'Enabled' ); 1077 $auto_updates_enabled_str = __( 'Enabled' ); 1078 $enabled = true; 1079 1080 /** 1081 * Filters the text string of the auto-updates setting for each theme in the Site Health debug data. 1082 * 1083 * @since 5.5.0 1084 * 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. 1089 */ 1090 $auto_updates_enabled_str = apply_filters( 'theme_auto_update_debug_str', $auto_updates_enabled_str, $active_theme, $enabled ); 1091 1058 1092 } else { 1059 $theme_auto_update_string = __( 'Disabled' ); 1060 } 1093 $auto_updates_disabled_str = __( 'Disabled' ); 1094 $enabled = false; 1095 1096 /** 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; 1061 1101 1062 1102 $info['wp-active-theme']['fields']['auto_update'] = array( … … 1139 1179 continue; 1140 1180 } 1181 1182 $auto_updates_enabled_str = __( 'Auto-updates enabled' ); 1183 $auto_updates_disabled_str = __( 'Auto-updates disabled' ); 1141 1184 1142 1185 $theme_version = $theme->version; … … 1175 1218 if ( $auto_updates_enabled ) { 1176 1219 if ( in_array( $theme_slug, $auto_updates, true ) ) { 1220 $enabled = true; 1221 1222 /** 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 1177 1225 $theme_version_string .= ' | ' . $auto_updates_enabled_str; 1178 1226 $theme_version_string_debug .= ',' . $auto_updates_enabled_str; 1179 1227 } else { 1228 $enabled = false; 1229 1230 /** 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 1180 1233 $theme_version_string .= ' | ' . $auto_updates_disabled_str; 1181 1234 $theme_version_string_debug .= ', ' . $auto_updates_disabled_str;
Note: See TracChangeset
for help on using the changeset viewer.