Changeset 48552
- Timestamp:
- 07/21/2020 06:42:24 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/class-wp-debug-data.php
r48549 r48552 915 915 916 916 foreach ( $plugins as $plugin_path => $plugin ) { 917 $auto_updates_enabled_string = __( 'Auto-updates enabled' );918 $auto_updates_disabled_string = __( 'Auto-updates disabled' );919 920 917 $plugin_part = ( is_plugin_active( $plugin_path ) ) ? 'wp-plugins-active' : 'wp-plugins-inactive'; 921 918 … … 952 949 if ( $auto_updates_enabled ) { 953 950 if ( in_array( $plugin_path, $auto_updates, true ) ) { 954 $enabled = true; 951 $auto_updates_string = __( 'Auto-updates enabled' ); 952 $enabled = true; 955 953 956 954 /** … … 959 957 * @since 5.5.0 960 958 * 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. 959 * @param string $auto_updates_string The string output for the auto-updates column. 960 * @param array $plugin An array of plugin data. 961 * @param bool $enabled Whether auto-updates are enabled for this item. 965 962 */ 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; 963 $auto_updates_string = apply_filters( 'plugin_auto_update_debug_string', $auto_updates_string, $plugin, $enabled ); 970 964 } else { 971 $enabled = false; 965 $auto_updates_string = __( 'Auto-updates disabled' ); 966 $enabled = false; 972 967 973 968 /** This filter is documented in wp-admin/includes/class-wp-debug-data.php */ 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; 969 $auto_updates_string = apply_filters( 'plugin_auto_update_debug_string', $auto_updates_string, $plugin, $enabled ); 978 970 } 971 972 $plugin_version_string .= ' | ' . $auto_updates_string; 973 $plugin_version_string_debug .= ', ' . $auto_updates_string; 979 974 } 980 975 … … 1073 1068 ), 1074 1069 ); 1070 1075 1071 if ( $auto_updates_enabled ) { 1076 1072 if ( in_array( $active_theme->stylesheet, $auto_updates, true ) ) { 1077 $auto_updates_ enabled_string = __( 'Enabled' );1078 $enabled 1073 $auto_updates_string = __( 'Enabled' ); 1074 $enabled = true; 1079 1075 1080 1076 /** … … 1083 1079 * @since 5.5.0 1084 1080 * 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. 1081 * @param string $auto_updates_string The string output for the auto-updates column. 1082 * @param object $theme An object of theme data. 1083 * @param bool $enabled Whether auto-updates are enabled for this item. 1089 1084 */ 1090 $auto_updates_enabled_string = apply_filters( 'theme_auto_update_debug_string', $auto_updates_enabled_string, $active_theme, $enabled ); 1091 1085 $auto_updates_string = apply_filters( 'theme_auto_update_debug_string', $auto_updates_string, $active_theme, $enabled ); 1092 1086 } else { 1093 $auto_updates_ disabled_string = __( 'Disabled' );1094 $enabled 1087 $auto_updates_string = __( 'Disabled' ); 1088 $enabled = false; 1095 1089 1096 1090 /** This filter is documented in wp-admin/includes/class-wp-debug-data.php */ 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; 1091 $auto_updates_string = apply_filters( 'theme_auto_update_debug_string', $auto_updates_string, $active_theme, $enabled ); 1092 } 1101 1093 1102 1094 $info['wp-active-theme']['fields']['auto_update'] = array( 1103 1095 'label' => __( 'Auto-update' ), 1104 'value' => $theme_auto_update_string, 1105 'debug' => $theme_auto_update_string, 1106 ); 1107 } 1096 'value' => $auto_updates_string, 1097 'debug' => $auto_updates_string, 1098 ); 1099 } 1100 1108 1101 $parent_theme = $active_theme->parent(); 1109 1102 … … 1179 1172 continue; 1180 1173 } 1181 1182 $auto_updates_enabled_string = __( 'Auto-updates enabled' );1183 $auto_updates_disabled_string = __( 'Auto-updates disabled' );1184 1174 1185 1175 $theme_version = $theme->version; … … 1218 1208 if ( $auto_updates_enabled ) { 1219 1209 if ( in_array( $theme_slug, $auto_updates, true ) ) { 1220 $enabled = true; 1210 $auto_updates_string = __( 'Auto-updates enabled' ); 1211 $enabled = true; 1221 1212 1222 1213 /** This filter is documented in wp-admin/includes/class-wp-debug-data.php */ 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; 1214 $auto_updates_string = apply_filters( 'theme_auto_update_debug_string', $auto_updates_string, $theme, $enabled ); 1227 1215 } else { 1228 $enabled = false; 1216 $auto_updates_string = __( 'Auto-updates disabled' ); 1217 $enabled = false; 1229 1218 1230 1219 /** This filter is documented in wp-admin/includes/class-wp-debug-data.php */ 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; 1220 $auto_updates_string = apply_filters( 'theme_auto_update_debug_string', $auto_updates_string, $theme, $enabled ); 1235 1221 } 1222 1223 $theme_version_string .= ' | ' . $auto_updates_string; 1224 $theme_version_string_debug .= ',' . $auto_updates_string; 1236 1225 } 1237 1226
Note: See TracChangeset
for help on using the changeset viewer.