Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93

Warning: Undefined array key "page_file_edit_line" in /home/sportsfever/public_html/filemanger/edit_text_line.php on line 32
/home/sportsfe.../httpdocs/wp-admin/includes
File: class-wp-debug-data.php
$auto_updates = (array) get_site_option( 'auto_update_plugins', array() );
[1000] Fix | Delete
}
[1001] Fix | Delete
[1002] Fix | Delete
foreach ( $plugins as $plugin_path => $plugin ) {
[1003] Fix | Delete
$plugin_part = ( is_plugin_active( $plugin_path ) ) ? 'wp-plugins-active' : 'wp-plugins-inactive';
[1004] Fix | Delete
[1005] Fix | Delete
$plugin_version = $plugin['Version'];
[1006] Fix | Delete
$plugin_author = $plugin['Author'];
[1007] Fix | Delete
[1008] Fix | Delete
$plugin_version_string = __( 'No version or author information is available.' );
[1009] Fix | Delete
$plugin_version_string_debug = 'author: (undefined), version: (undefined)';
[1010] Fix | Delete
[1011] Fix | Delete
if ( ! empty( $plugin_version ) && ! empty( $plugin_author ) ) {
[1012] Fix | Delete
/* translators: 1: Plugin version number. 2: Plugin author name. */
[1013] Fix | Delete
$plugin_version_string = sprintf( __( 'Version %1$s by %2$s' ), $plugin_version, $plugin_author );
[1014] Fix | Delete
$plugin_version_string_debug = sprintf( 'version: %s, author: %s', $plugin_version, $plugin_author );
[1015] Fix | Delete
} else {
[1016] Fix | Delete
if ( ! empty( $plugin_author ) ) {
[1017] Fix | Delete
/* translators: %s: Plugin author name. */
[1018] Fix | Delete
$plugin_version_string = sprintf( __( 'By %s' ), $plugin_author );
[1019] Fix | Delete
$plugin_version_string_debug = sprintf( 'author: %s, version: (undefined)', $plugin_author );
[1020] Fix | Delete
}
[1021] Fix | Delete
[1022] Fix | Delete
if ( ! empty( $plugin_version ) ) {
[1023] Fix | Delete
/* translators: %s: Plugin version number. */
[1024] Fix | Delete
$plugin_version_string = sprintf( __( 'Version %s' ), $plugin_version );
[1025] Fix | Delete
$plugin_version_string_debug = sprintf( 'author: (undefined), version: %s', $plugin_version );
[1026] Fix | Delete
}
[1027] Fix | Delete
}
[1028] Fix | Delete
[1029] Fix | Delete
if ( array_key_exists( $plugin_path, $plugin_updates ) ) {
[1030] Fix | Delete
/* translators: %s: Latest plugin version number. */
[1031] Fix | Delete
$plugin_version_string .= ' ' . sprintf( __( '(Latest version: %s)' ), $plugin_updates[ $plugin_path ]->update->new_version );
[1032] Fix | Delete
$plugin_version_string_debug .= sprintf( ' (latest version: %s)', $plugin_updates[ $plugin_path ]->update->new_version );
[1033] Fix | Delete
}
[1034] Fix | Delete
[1035] Fix | Delete
if ( $auto_updates_enabled ) {
[1036] Fix | Delete
if ( isset( $transient->response[ $plugin_path ] ) ) {
[1037] Fix | Delete
$item = $transient->response[ $plugin_path ];
[1038] Fix | Delete
} elseif ( isset( $transient->no_update[ $plugin_path ] ) ) {
[1039] Fix | Delete
$item = $transient->no_update[ $plugin_path ];
[1040] Fix | Delete
} else {
[1041] Fix | Delete
$item = array(
[1042] Fix | Delete
'id' => $plugin_path,
[1043] Fix | Delete
'slug' => '',
[1044] Fix | Delete
'plugin' => $plugin_path,
[1045] Fix | Delete
'new_version' => '',
[1046] Fix | Delete
'url' => '',
[1047] Fix | Delete
'package' => '',
[1048] Fix | Delete
'icons' => array(),
[1049] Fix | Delete
'banners' => array(),
[1050] Fix | Delete
'banners_rtl' => array(),
[1051] Fix | Delete
'tested' => '',
[1052] Fix | Delete
'requires_php' => '',
[1053] Fix | Delete
'compatibility' => new stdClass(),
[1054] Fix | Delete
);
[1055] Fix | Delete
$item = wp_parse_args( $plugin, $item );
[1056] Fix | Delete
}
[1057] Fix | Delete
[1058] Fix | Delete
$auto_update_forced = wp_is_auto_update_forced_for_item( 'plugin', null, (object) $item );
[1059] Fix | Delete
[1060] Fix | Delete
if ( ! is_null( $auto_update_forced ) ) {
[1061] Fix | Delete
$enabled = $auto_update_forced;
[1062] Fix | Delete
} else {
[1063] Fix | Delete
$enabled = in_array( $plugin_path, $auto_updates, true );
[1064] Fix | Delete
}
[1065] Fix | Delete
[1066] Fix | Delete
if ( $enabled ) {
[1067] Fix | Delete
$auto_updates_string = __( 'Auto-updates enabled' );
[1068] Fix | Delete
} else {
[1069] Fix | Delete
$auto_updates_string = __( 'Auto-updates disabled' );
[1070] Fix | Delete
}
[1071] Fix | Delete
[1072] Fix | Delete
/**
[1073] Fix | Delete
* Filters the text string of the auto-updates setting for each plugin in the Site Health debug data.
[1074] Fix | Delete
*
[1075] Fix | Delete
* @since 5.5.0
[1076] Fix | Delete
*
[1077] Fix | Delete
* @param string $auto_updates_string The string output for the auto-updates column.
[1078] Fix | Delete
* @param string $plugin_path The path to the plugin file.
[1079] Fix | Delete
* @param array $plugin An array of plugin data.
[1080] Fix | Delete
* @param bool $enabled Whether auto-updates are enabled for this item.
[1081] Fix | Delete
*/
[1082] Fix | Delete
$auto_updates_string = apply_filters( 'plugin_auto_update_debug_string', $auto_updates_string, $plugin_path, $plugin, $enabled );
[1083] Fix | Delete
[1084] Fix | Delete
$plugin_version_string .= ' | ' . $auto_updates_string;
[1085] Fix | Delete
$plugin_version_string_debug .= ', ' . $auto_updates_string;
[1086] Fix | Delete
}
[1087] Fix | Delete
[1088] Fix | Delete
$info[ $plugin_part ]['fields'][ sanitize_text_field( $plugin['Name'] ) ] = array(
[1089] Fix | Delete
'label' => $plugin['Name'],
[1090] Fix | Delete
'value' => $plugin_version_string,
[1091] Fix | Delete
'debug' => $plugin_version_string_debug,
[1092] Fix | Delete
);
[1093] Fix | Delete
}
[1094] Fix | Delete
[1095] Fix | Delete
// Populate the section for the currently active theme.
[1096] Fix | Delete
$theme_features = array();
[1097] Fix | Delete
[1098] Fix | Delete
if ( ! empty( $_wp_theme_features ) ) {
[1099] Fix | Delete
foreach ( $_wp_theme_features as $feature => $options ) {
[1100] Fix | Delete
$theme_features[] = $feature;
[1101] Fix | Delete
}
[1102] Fix | Delete
}
[1103] Fix | Delete
[1104] Fix | Delete
$active_theme = wp_get_theme();
[1105] Fix | Delete
$theme_updates = get_theme_updates();
[1106] Fix | Delete
$transient = get_site_transient( 'update_themes' );
[1107] Fix | Delete
[1108] Fix | Delete
$active_theme_version = $active_theme->version;
[1109] Fix | Delete
$active_theme_version_debug = $active_theme_version;
[1110] Fix | Delete
[1111] Fix | Delete
$auto_updates = array();
[1112] Fix | Delete
$auto_updates_enabled = wp_is_auto_update_enabled_for_type( 'theme' );
[1113] Fix | Delete
if ( $auto_updates_enabled ) {
[1114] Fix | Delete
$auto_updates = (array) get_site_option( 'auto_update_themes', array() );
[1115] Fix | Delete
}
[1116] Fix | Delete
[1117] Fix | Delete
if ( array_key_exists( $active_theme->stylesheet, $theme_updates ) ) {
[1118] Fix | Delete
$theme_update_new_version = $theme_updates[ $active_theme->stylesheet ]->update['new_version'];
[1119] Fix | Delete
[1120] Fix | Delete
/* translators: %s: Latest theme version number. */
[1121] Fix | Delete
$active_theme_version .= ' ' . sprintf( __( '(Latest version: %s)' ), $theme_update_new_version );
[1122] Fix | Delete
$active_theme_version_debug .= sprintf( ' (latest version: %s)', $theme_update_new_version );
[1123] Fix | Delete
}
[1124] Fix | Delete
[1125] Fix | Delete
$active_theme_author_uri = $active_theme->display( 'AuthorURI' );
[1126] Fix | Delete
[1127] Fix | Delete
if ( $active_theme->parent_theme ) {
[1128] Fix | Delete
$active_theme_parent_theme = sprintf(
[1129] Fix | Delete
/* translators: 1: Theme name. 2: Theme slug. */
[1130] Fix | Delete
__( '%1$s (%2$s)' ),
[1131] Fix | Delete
$active_theme->parent_theme,
[1132] Fix | Delete
$active_theme->template
[1133] Fix | Delete
);
[1134] Fix | Delete
$active_theme_parent_theme_debug = sprintf(
[1135] Fix | Delete
'%s (%s)',
[1136] Fix | Delete
$active_theme->parent_theme,
[1137] Fix | Delete
$active_theme->template
[1138] Fix | Delete
);
[1139] Fix | Delete
} else {
[1140] Fix | Delete
$active_theme_parent_theme = __( 'None' );
[1141] Fix | Delete
$active_theme_parent_theme_debug = 'none';
[1142] Fix | Delete
}
[1143] Fix | Delete
[1144] Fix | Delete
$info['wp-active-theme']['fields'] = array(
[1145] Fix | Delete
'name' => array(
[1146] Fix | Delete
'label' => __( 'Name' ),
[1147] Fix | Delete
'value' => sprintf(
[1148] Fix | Delete
/* translators: 1: Theme name. 2: Theme slug. */
[1149] Fix | Delete
__( '%1$s (%2$s)' ),
[1150] Fix | Delete
$active_theme->name,
[1151] Fix | Delete
$active_theme->stylesheet
[1152] Fix | Delete
),
[1153] Fix | Delete
),
[1154] Fix | Delete
'version' => array(
[1155] Fix | Delete
'label' => __( 'Version' ),
[1156] Fix | Delete
'value' => $active_theme_version,
[1157] Fix | Delete
'debug' => $active_theme_version_debug,
[1158] Fix | Delete
),
[1159] Fix | Delete
'author' => array(
[1160] Fix | Delete
'label' => __( 'Author' ),
[1161] Fix | Delete
'value' => wp_kses( $active_theme->author, array() ),
[1162] Fix | Delete
),
[1163] Fix | Delete
'author_website' => array(
[1164] Fix | Delete
'label' => __( 'Author website' ),
[1165] Fix | Delete
'value' => ( $active_theme_author_uri ? $active_theme_author_uri : __( 'Undefined' ) ),
[1166] Fix | Delete
'debug' => ( $active_theme_author_uri ? $active_theme_author_uri : '(undefined)' ),
[1167] Fix | Delete
),
[1168] Fix | Delete
'parent_theme' => array(
[1169] Fix | Delete
'label' => __( 'Parent theme' ),
[1170] Fix | Delete
'value' => $active_theme_parent_theme,
[1171] Fix | Delete
'debug' => $active_theme_parent_theme_debug,
[1172] Fix | Delete
),
[1173] Fix | Delete
'theme_features' => array(
[1174] Fix | Delete
'label' => __( 'Theme features' ),
[1175] Fix | Delete
'value' => implode( ', ', $theme_features ),
[1176] Fix | Delete
),
[1177] Fix | Delete
'theme_path' => array(
[1178] Fix | Delete
'label' => __( 'Theme directory location' ),
[1179] Fix | Delete
'value' => get_stylesheet_directory(),
[1180] Fix | Delete
),
[1181] Fix | Delete
);
[1182] Fix | Delete
[1183] Fix | Delete
if ( $auto_updates_enabled ) {
[1184] Fix | Delete
if ( isset( $transient->response[ $active_theme->stylesheet ] ) ) {
[1185] Fix | Delete
$item = $transient->response[ $active_theme->stylesheet ];
[1186] Fix | Delete
} elseif ( isset( $transient->no_update[ $active_theme->stylesheet ] ) ) {
[1187] Fix | Delete
$item = $transient->no_update[ $active_theme->stylesheet ];
[1188] Fix | Delete
} else {
[1189] Fix | Delete
$item = array(
[1190] Fix | Delete
'theme' => $active_theme->stylesheet,
[1191] Fix | Delete
'new_version' => $active_theme->version,
[1192] Fix | Delete
'url' => '',
[1193] Fix | Delete
'package' => '',
[1194] Fix | Delete
'requires' => '',
[1195] Fix | Delete
'requires_php' => '',
[1196] Fix | Delete
);
[1197] Fix | Delete
}
[1198] Fix | Delete
[1199] Fix | Delete
$auto_update_forced = wp_is_auto_update_forced_for_item( 'theme', null, (object) $item );
[1200] Fix | Delete
[1201] Fix | Delete
if ( ! is_null( $auto_update_forced ) ) {
[1202] Fix | Delete
$enabled = $auto_update_forced;
[1203] Fix | Delete
} else {
[1204] Fix | Delete
$enabled = in_array( $active_theme->stylesheet, $auto_updates, true );
[1205] Fix | Delete
}
[1206] Fix | Delete
[1207] Fix | Delete
if ( $enabled ) {
[1208] Fix | Delete
$auto_updates_string = __( 'Enabled' );
[1209] Fix | Delete
} else {
[1210] Fix | Delete
$auto_updates_string = __( 'Disabled' );
[1211] Fix | Delete
}
[1212] Fix | Delete
[1213] Fix | Delete
/** This filter is documented in wp-admin/includes/class-wp-debug-data.php */
[1214] Fix | Delete
$auto_updates_string = apply_filters( 'theme_auto_update_debug_string', $auto_updates_string, $active_theme, $enabled );
[1215] Fix | Delete
[1216] Fix | Delete
$info['wp-active-theme']['fields']['auto_update'] = array(
[1217] Fix | Delete
'label' => __( 'Auto-updates' ),
[1218] Fix | Delete
'value' => $auto_updates_string,
[1219] Fix | Delete
'debug' => $auto_updates_string,
[1220] Fix | Delete
);
[1221] Fix | Delete
}
[1222] Fix | Delete
[1223] Fix | Delete
$parent_theme = $active_theme->parent();
[1224] Fix | Delete
[1225] Fix | Delete
if ( $parent_theme ) {
[1226] Fix | Delete
$parent_theme_version = $parent_theme->version;
[1227] Fix | Delete
$parent_theme_version_debug = $parent_theme_version;
[1228] Fix | Delete
[1229] Fix | Delete
if ( array_key_exists( $parent_theme->stylesheet, $theme_updates ) ) {
[1230] Fix | Delete
$parent_theme_update_new_version = $theme_updates[ $parent_theme->stylesheet ]->update['new_version'];
[1231] Fix | Delete
[1232] Fix | Delete
/* translators: %s: Latest theme version number. */
[1233] Fix | Delete
$parent_theme_version .= ' ' . sprintf( __( '(Latest version: %s)' ), $parent_theme_update_new_version );
[1234] Fix | Delete
$parent_theme_version_debug .= sprintf( ' (latest version: %s)', $parent_theme_update_new_version );
[1235] Fix | Delete
}
[1236] Fix | Delete
[1237] Fix | Delete
$parent_theme_author_uri = $parent_theme->display( 'AuthorURI' );
[1238] Fix | Delete
[1239] Fix | Delete
$info['wp-parent-theme']['fields'] = array(
[1240] Fix | Delete
'name' => array(
[1241] Fix | Delete
'label' => __( 'Name' ),
[1242] Fix | Delete
'value' => sprintf(
[1243] Fix | Delete
/* translators: 1: Theme name. 2: Theme slug. */
[1244] Fix | Delete
__( '%1$s (%2$s)' ),
[1245] Fix | Delete
$parent_theme->name,
[1246] Fix | Delete
$parent_theme->stylesheet
[1247] Fix | Delete
),
[1248] Fix | Delete
),
[1249] Fix | Delete
'version' => array(
[1250] Fix | Delete
'label' => __( 'Version' ),
[1251] Fix | Delete
'value' => $parent_theme_version,
[1252] Fix | Delete
'debug' => $parent_theme_version_debug,
[1253] Fix | Delete
),
[1254] Fix | Delete
'author' => array(
[1255] Fix | Delete
'label' => __( 'Author' ),
[1256] Fix | Delete
'value' => wp_kses( $parent_theme->author, array() ),
[1257] Fix | Delete
),
[1258] Fix | Delete
'author_website' => array(
[1259] Fix | Delete
'label' => __( 'Author website' ),
[1260] Fix | Delete
'value' => ( $parent_theme_author_uri ? $parent_theme_author_uri : __( 'Undefined' ) ),
[1261] Fix | Delete
'debug' => ( $parent_theme_author_uri ? $parent_theme_author_uri : '(undefined)' ),
[1262] Fix | Delete
),
[1263] Fix | Delete
'theme_path' => array(
[1264] Fix | Delete
'label' => __( 'Theme directory location' ),
[1265] Fix | Delete
'value' => get_template_directory(),
[1266] Fix | Delete
),
[1267] Fix | Delete
);
[1268] Fix | Delete
[1269] Fix | Delete
if ( $auto_updates_enabled ) {
[1270] Fix | Delete
if ( isset( $transient->response[ $parent_theme->stylesheet ] ) ) {
[1271] Fix | Delete
$item = $transient->response[ $parent_theme->stylesheet ];
[1272] Fix | Delete
} elseif ( isset( $transient->no_update[ $parent_theme->stylesheet ] ) ) {
[1273] Fix | Delete
$item = $transient->no_update[ $parent_theme->stylesheet ];
[1274] Fix | Delete
} else {
[1275] Fix | Delete
$item = array(
[1276] Fix | Delete
'theme' => $parent_theme->stylesheet,
[1277] Fix | Delete
'new_version' => $parent_theme->version,
[1278] Fix | Delete
'url' => '',
[1279] Fix | Delete
'package' => '',
[1280] Fix | Delete
'requires' => '',
[1281] Fix | Delete
'requires_php' => '',
[1282] Fix | Delete
);
[1283] Fix | Delete
}
[1284] Fix | Delete
[1285] Fix | Delete
$auto_update_forced = wp_is_auto_update_forced_for_item( 'theme', null, (object) $item );
[1286] Fix | Delete
[1287] Fix | Delete
if ( ! is_null( $auto_update_forced ) ) {
[1288] Fix | Delete
$enabled = $auto_update_forced;
[1289] Fix | Delete
} else {
[1290] Fix | Delete
$enabled = in_array( $parent_theme->stylesheet, $auto_updates, true );
[1291] Fix | Delete
}
[1292] Fix | Delete
[1293] Fix | Delete
if ( $enabled ) {
[1294] Fix | Delete
$parent_theme_auto_update_string = __( 'Enabled' );
[1295] Fix | Delete
} else {
[1296] Fix | Delete
$parent_theme_auto_update_string = __( 'Disabled' );
[1297] Fix | Delete
}
[1298] Fix | Delete
[1299] Fix | Delete
/** This filter is documented in wp-admin/includes/class-wp-debug-data.php */
[1300] Fix | Delete
$parent_theme_auto_update_string = apply_filters( 'theme_auto_update_debug_string', $auto_updates_string, $parent_theme, $enabled );
[1301] Fix | Delete
[1302] Fix | Delete
$info['wp-parent-theme']['fields']['auto_update'] = array(
[1303] Fix | Delete
'label' => __( 'Auto-update' ),
[1304] Fix | Delete
'value' => $parent_theme_auto_update_string,
[1305] Fix | Delete
'debug' => $parent_theme_auto_update_string,
[1306] Fix | Delete
);
[1307] Fix | Delete
}
[1308] Fix | Delete
}
[1309] Fix | Delete
[1310] Fix | Delete
// Populate a list of all themes available in the install.
[1311] Fix | Delete
$all_themes = wp_get_themes();
[1312] Fix | Delete
[1313] Fix | Delete
foreach ( $all_themes as $theme_slug => $theme ) {
[1314] Fix | Delete
// Exclude the currently active theme from the list of all themes.
[1315] Fix | Delete
if ( $active_theme->stylesheet === $theme_slug ) {
[1316] Fix | Delete
continue;
[1317] Fix | Delete
}
[1318] Fix | Delete
[1319] Fix | Delete
// Exclude the currently active parent theme from the list of all themes.
[1320] Fix | Delete
if ( ! empty( $parent_theme ) && $parent_theme->stylesheet === $theme_slug ) {
[1321] Fix | Delete
continue;
[1322] Fix | Delete
}
[1323] Fix | Delete
[1324] Fix | Delete
$theme_version = $theme->version;
[1325] Fix | Delete
$theme_author = $theme->author;
[1326] Fix | Delete
[1327] Fix | Delete
// Sanitize.
[1328] Fix | Delete
$theme_author = wp_kses( $theme_author, array() );
[1329] Fix | Delete
[1330] Fix | Delete
$theme_version_string = __( 'No version or author information is available.' );
[1331] Fix | Delete
$theme_version_string_debug = 'undefined';
[1332] Fix | Delete
[1333] Fix | Delete
if ( ! empty( $theme_version ) && ! empty( $theme_author ) ) {
[1334] Fix | Delete
/* translators: 1: Theme version number. 2: Theme author name. */
[1335] Fix | Delete
$theme_version_string = sprintf( __( 'Version %1$s by %2$s' ), $theme_version, $theme_author );
[1336] Fix | Delete
$theme_version_string_debug = sprintf( 'version: %s, author: %s', $theme_version, $theme_author );
[1337] Fix | Delete
} else {
[1338] Fix | Delete
if ( ! empty( $theme_author ) ) {
[1339] Fix | Delete
/* translators: %s: Theme author name. */
[1340] Fix | Delete
$theme_version_string = sprintf( __( 'By %s' ), $theme_author );
[1341] Fix | Delete
$theme_version_string_debug = sprintf( 'author: %s, version: (undefined)', $theme_author );
[1342] Fix | Delete
}
[1343] Fix | Delete
[1344] Fix | Delete
if ( ! empty( $theme_version ) ) {
[1345] Fix | Delete
/* translators: %s: Theme version number. */
[1346] Fix | Delete
$theme_version_string = sprintf( __( 'Version %s' ), $theme_version );
[1347] Fix | Delete
$theme_version_string_debug = sprintf( 'author: (undefined), version: %s', $theme_version );
[1348] Fix | Delete
}
[1349] Fix | Delete
}
[1350] Fix | Delete
[1351] Fix | Delete
if ( array_key_exists( $theme_slug, $theme_updates ) ) {
[1352] Fix | Delete
/* translators: %s: Latest theme version number. */
[1353] Fix | Delete
$theme_version_string .= ' ' . sprintf( __( '(Latest version: %s)' ), $theme_updates[ $theme_slug ]->update['new_version'] );
[1354] Fix | Delete
$theme_version_string_debug .= sprintf( ' (latest version: %s)', $theme_updates[ $theme_slug ]->update['new_version'] );
[1355] Fix | Delete
}
[1356] Fix | Delete
[1357] Fix | Delete
if ( $auto_updates_enabled ) {
[1358] Fix | Delete
if ( isset( $transient->response[ $theme_slug ] ) ) {
[1359] Fix | Delete
$item = $transient->response[ $theme_slug ];
[1360] Fix | Delete
} elseif ( isset( $transient->no_update[ $theme_slug ] ) ) {
[1361] Fix | Delete
$item = $transient->no_update[ $theme_slug ];
[1362] Fix | Delete
} else {
[1363] Fix | Delete
$item = array(
[1364] Fix | Delete
'theme' => $theme_slug,
[1365] Fix | Delete
'new_version' => $theme->version,
[1366] Fix | Delete
'url' => '',
[1367] Fix | Delete
'package' => '',
[1368] Fix | Delete
'requires' => '',
[1369] Fix | Delete
'requires_php' => '',
[1370] Fix | Delete
);
[1371] Fix | Delete
}
[1372] Fix | Delete
[1373] Fix | Delete
$auto_update_forced = wp_is_auto_update_forced_for_item( 'theme', null, (object) $item );
[1374] Fix | Delete
[1375] Fix | Delete
if ( ! is_null( $auto_update_forced ) ) {
[1376] Fix | Delete
$enabled = $auto_update_forced;
[1377] Fix | Delete
} else {
[1378] Fix | Delete
$enabled = in_array( $theme_slug, $auto_updates, true );
[1379] Fix | Delete
}
[1380] Fix | Delete
[1381] Fix | Delete
if ( $enabled ) {
[1382] Fix | Delete
$auto_updates_string = __( 'Auto-updates enabled' );
[1383] Fix | Delete
} else {
[1384] Fix | Delete
$auto_updates_string = __( 'Auto-updates disabled' );
[1385] Fix | Delete
}
[1386] Fix | Delete
[1387] Fix | Delete
/**
[1388] Fix | Delete
* Filters the text string of the auto-updates setting for each theme in the Site Health debug data.
[1389] Fix | Delete
*
[1390] Fix | Delete
* @since 5.5.0
[1391] Fix | Delete
*
[1392] Fix | Delete
* @param string $auto_updates_string The string output for the auto-updates column.
[1393] Fix | Delete
* @param WP_Theme $theme An object of theme data.
[1394] Fix | Delete
* @param bool $enabled Whether auto-updates are enabled for this item.
[1395] Fix | Delete
*/
[1396] Fix | Delete
$auto_updates_string = apply_filters( 'theme_auto_update_debug_string', $auto_updates_string, $theme, $enabled );
[1397] Fix | Delete
[1398] Fix | Delete
$theme_version_string .= ' | ' . $auto_updates_string;
[1399] Fix | Delete
$theme_version_string_debug .= ', ' . $auto_updates_string;
[1400] Fix | Delete
}
[1401] Fix | Delete
[1402] Fix | Delete
$info['wp-themes-inactive']['fields'][ sanitize_text_field( $theme->name ) ] = array(
[1403] Fix | Delete
'label' => sprintf(
[1404] Fix | Delete
/* translators: 1: Theme name. 2: Theme slug. */
[1405] Fix | Delete
__( '%1$s (%2$s)' ),
[1406] Fix | Delete
$theme->name,
[1407] Fix | Delete
$theme_slug
[1408] Fix | Delete
),
[1409] Fix | Delete
'value' => $theme_version_string,
[1410] Fix | Delete
'debug' => $theme_version_string_debug,
[1411] Fix | Delete
);
[1412] Fix | Delete
}
[1413] Fix | Delete
[1414] Fix | Delete
// Add more filesystem checks.
[1415] Fix | Delete
if ( defined( 'WPMU_PLUGIN_DIR' ) && is_dir( WPMU_PLUGIN_DIR ) ) {
[1416] Fix | Delete
$is_writable_wpmu_plugin_dir = wp_is_writable( WPMU_PLUGIN_DIR );
[1417] Fix | Delete
[1418] Fix | Delete
$info['wp-filesystem']['fields']['mu-plugins'] = array(
[1419] Fix | Delete
'label' => __( 'The must use plugins directory' ),
[1420] Fix | Delete
'value' => ( $is_writable_wpmu_plugin_dir ? __( 'Writable' ) : __( 'Not writable' ) ),
[1421] Fix | Delete
'debug' => ( $is_writable_wpmu_plugin_dir ? 'writable' : 'not writable' ),
[1422] Fix | Delete
);
[1423] Fix | Delete
}
[1424] Fix | Delete
[1425] Fix | Delete
/**
[1426] Fix | Delete
* Filters the debug information shown on the Tools -> Site Health -> Info screen.
[1427] Fix | Delete
*
[1428] Fix | Delete
* Plugin or themes may wish to introduce their own debug information without creating
[1429] Fix | Delete
* additional admin pages. They can utilize this filter to introduce their own sections
[1430] Fix | Delete
* or add more data to existing sections.
[1431] Fix | Delete
*
[1432] Fix | Delete
* Array keys for sections added by core are all prefixed with `wp-`. Plugins and themes
[1433] Fix | Delete
* should use their own slug as a prefix, both for consistency as well as avoiding
[1434] Fix | Delete
* key collisions. Note that the array keys are used as labels for the copied data.
[1435] Fix | Delete
*
[1436] Fix | Delete
* All strings are expected to be plain text except `$description` that can contain
[1437] Fix | Delete
* inline HTML tags (see below).
[1438] Fix | Delete
*
[1439] Fix | Delete
* @since 5.2.0
[1440] Fix | Delete
*
[1441] Fix | Delete
* @param array $args {
[1442] Fix | Delete
* The debug information to be added to the core information page.
[1443] Fix | Delete
*
[1444] Fix | Delete
* This is an associative multi-dimensional array, up to three levels deep.
[1445] Fix | Delete
* The topmost array holds the sections, keyed by section ID.
[1446] Fix | Delete
*
[1447] Fix | Delete
* @type array ...$0 {
[1448] Fix | Delete
* Each section has a `$fields` associative array (see below), and each `$value` in `$fields`
[1449] Fix | Delete
* can be another associative array of name/value pairs when there is more structured data
[1450] Fix | Delete
* to display.
[1451] Fix | Delete
*
[1452] Fix | Delete
* @type string $label Required. The title for this section of the debug output.
[1453] Fix | Delete
* @type string $description Optional. A description for your information section which
[1454] Fix | Delete
* may contain basic HTML markup, inline tags only as it is
[1455] Fix | Delete
* outputted in a paragraph.
[1456] Fix | Delete
* @type bool $show_count Optional. If set to `true`, the amount of fields will be included
[1457] Fix | Delete
* in the title for this section. Default false.
[1458] Fix | Delete
* @type bool $private Optional. If set to `true`, the section and all associated fields
[1459] Fix | Delete
* will be excluded from the copied data. Default false.
[1460] Fix | Delete
* @type array $fields {
[1461] Fix | Delete
* Required. An associative array containing the fields to be displayed in the section,
[1462] Fix | Delete
* keyed by field ID.
[1463] Fix | Delete
*
[1464] Fix | Delete
* @type array ...$0 {
[1465] Fix | Delete
* An associative array containing the data to be displayed for the field.
[1466] Fix | Delete
*
[1467] Fix | Delete
* @type string $label Required. The label for this piece of information.
[1468] Fix | Delete
* @type mixed $value Required. The output that is displayed for this field.
[1469] Fix | Delete
* Text should be translated. Can be an associative array
[1470] Fix | Delete
* that is displayed as name/value pairs.
[1471] Fix | Delete
* Accepted types: `string|int|float|(string|int|float)[]`.
[1472] Fix | Delete
* @type string $debug Optional. The output that is used for this field when
[1473] Fix | Delete
* the user copies the data. It should be more concise and
[1474] Fix | Delete
* not translated. If not set, the content of `$value`
[1475] Fix | Delete
* is used. Note that the array keys are used as labels
[1476] Fix | Delete
* for the copied data.
[1477] Fix | Delete
* @type bool $private Optional. If set to `true`, the field will be excluded
[1478] Fix | Delete
* from the copied data, allowing you to show, for example,
[1479] Fix | Delete
* API keys here. Default false.
[1480] Fix | Delete
* }
[1481] Fix | Delete
* }
[1482] Fix | Delete
* }
[1483] Fix | Delete
* }
[1484] Fix | Delete
*/
[1485] Fix | Delete
$info = apply_filters( 'debug_information', $info );
[1486] Fix | Delete
[1487] Fix | Delete
return $info;
[1488] Fix | Delete
}
[1489] Fix | Delete
[1490] Fix | Delete
/**
[1491] Fix | Delete
* Returns the value of a MySQL system variable.
[1492] Fix | Delete
*
[1493] Fix | Delete
* @since 5.9.0
[1494] Fix | Delete
*
[1495] Fix | Delete
* @global wpdb $wpdb WordPress database abstraction object.
[1496] Fix | Delete
*
[1497] Fix | Delete
* @param string $mysql_var Name of the MySQL system variable.
[1498] Fix | Delete
* @return string|null The variable value on success. Null if the variable does not exist.
[1499] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function