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/clone/wp-inclu...
File: load.php
foreach ( $active_plugins as $plugin ) {
[1000] Fix | Delete
if ( ! validate_file( $plugin ) // $plugin must validate as file.
[1001] Fix | Delete
&& str_ends_with( $plugin, '.php' ) // $plugin must end with '.php'.
[1002] Fix | Delete
&& file_exists( WP_PLUGIN_DIR . '/' . $plugin ) // $plugin must exist.
[1003] Fix | Delete
// Not already included as a network plugin.
[1004] Fix | Delete
&& ( ! $network_plugins || ! in_array( WP_PLUGIN_DIR . '/' . $plugin, $network_plugins, true ) )
[1005] Fix | Delete
) {
[1006] Fix | Delete
$plugins[] = WP_PLUGIN_DIR . '/' . $plugin;
[1007] Fix | Delete
}
[1008] Fix | Delete
}
[1009] Fix | Delete
[1010] Fix | Delete
/*
[1011] Fix | Delete
* Remove plugins from the list of active plugins when we're on an endpoint
[1012] Fix | Delete
* that should be protected against WSODs and the plugin is paused.
[1013] Fix | Delete
*/
[1014] Fix | Delete
if ( wp_is_recovery_mode() ) {
[1015] Fix | Delete
$plugins = wp_skip_paused_plugins( $plugins );
[1016] Fix | Delete
}
[1017] Fix | Delete
[1018] Fix | Delete
return $plugins;
[1019] Fix | Delete
}
[1020] Fix | Delete
[1021] Fix | Delete
/**
[1022] Fix | Delete
* Filters a given list of plugins, removing any paused plugins from it.
[1023] Fix | Delete
*
[1024] Fix | Delete
* @since 5.2.0
[1025] Fix | Delete
*
[1026] Fix | Delete
* @global WP_Paused_Extensions_Storage $_paused_plugins
[1027] Fix | Delete
*
[1028] Fix | Delete
* @param string[] $plugins Array of absolute plugin main file paths.
[1029] Fix | Delete
* @return string[] Filtered array of plugins, without any paused plugins.
[1030] Fix | Delete
*/
[1031] Fix | Delete
function wp_skip_paused_plugins( array $plugins ) {
[1032] Fix | Delete
$paused_plugins = wp_paused_plugins()->get_all();
[1033] Fix | Delete
[1034] Fix | Delete
if ( empty( $paused_plugins ) ) {
[1035] Fix | Delete
return $plugins;
[1036] Fix | Delete
}
[1037] Fix | Delete
[1038] Fix | Delete
foreach ( $plugins as $index => $plugin ) {
[1039] Fix | Delete
list( $plugin ) = explode( '/', plugin_basename( $plugin ) );
[1040] Fix | Delete
[1041] Fix | Delete
if ( array_key_exists( $plugin, $paused_plugins ) ) {
[1042] Fix | Delete
unset( $plugins[ $index ] );
[1043] Fix | Delete
[1044] Fix | Delete
// Store list of paused plugins for displaying an admin notice.
[1045] Fix | Delete
$GLOBALS['_paused_plugins'][ $plugin ] = $paused_plugins[ $plugin ];
[1046] Fix | Delete
}
[1047] Fix | Delete
}
[1048] Fix | Delete
[1049] Fix | Delete
return $plugins;
[1050] Fix | Delete
}
[1051] Fix | Delete
[1052] Fix | Delete
/**
[1053] Fix | Delete
* Retrieves an array of active and valid themes.
[1054] Fix | Delete
*
[1055] Fix | Delete
* While upgrading or installing WordPress, no themes are returned.
[1056] Fix | Delete
*
[1057] Fix | Delete
* @since 5.1.0
[1058] Fix | Delete
* @access private
[1059] Fix | Delete
*
[1060] Fix | Delete
* @global string $pagenow The filename of the current screen.
[1061] Fix | Delete
* @global string $wp_stylesheet_path Path to current theme's stylesheet directory.
[1062] Fix | Delete
* @global string $wp_template_path Path to current theme's template directory.
[1063] Fix | Delete
*
[1064] Fix | Delete
* @return string[] Array of absolute paths to theme directories.
[1065] Fix | Delete
*/
[1066] Fix | Delete
function wp_get_active_and_valid_themes() {
[1067] Fix | Delete
global $pagenow, $wp_stylesheet_path, $wp_template_path;
[1068] Fix | Delete
[1069] Fix | Delete
$themes = array();
[1070] Fix | Delete
[1071] Fix | Delete
if ( wp_installing() && 'wp-activate.php' !== $pagenow ) {
[1072] Fix | Delete
return $themes;
[1073] Fix | Delete
}
[1074] Fix | Delete
[1075] Fix | Delete
if ( is_child_theme() ) {
[1076] Fix | Delete
$themes[] = $wp_stylesheet_path;
[1077] Fix | Delete
}
[1078] Fix | Delete
[1079] Fix | Delete
$themes[] = $wp_template_path;
[1080] Fix | Delete
[1081] Fix | Delete
/*
[1082] Fix | Delete
* Remove themes from the list of active themes when we're on an endpoint
[1083] Fix | Delete
* that should be protected against WSODs and the theme is paused.
[1084] Fix | Delete
*/
[1085] Fix | Delete
if ( wp_is_recovery_mode() ) {
[1086] Fix | Delete
$themes = wp_skip_paused_themes( $themes );
[1087] Fix | Delete
[1088] Fix | Delete
// If no active and valid themes exist, skip loading themes.
[1089] Fix | Delete
if ( empty( $themes ) ) {
[1090] Fix | Delete
add_filter( 'wp_using_themes', '__return_false' );
[1091] Fix | Delete
}
[1092] Fix | Delete
}
[1093] Fix | Delete
[1094] Fix | Delete
return $themes;
[1095] Fix | Delete
}
[1096] Fix | Delete
[1097] Fix | Delete
/**
[1098] Fix | Delete
* Filters a given list of themes, removing any paused themes from it.
[1099] Fix | Delete
*
[1100] Fix | Delete
* @since 5.2.0
[1101] Fix | Delete
*
[1102] Fix | Delete
* @global WP_Paused_Extensions_Storage $_paused_themes
[1103] Fix | Delete
*
[1104] Fix | Delete
* @param string[] $themes Array of absolute theme directory paths.
[1105] Fix | Delete
* @return string[] Filtered array of absolute paths to themes, without any paused themes.
[1106] Fix | Delete
*/
[1107] Fix | Delete
function wp_skip_paused_themes( array $themes ) {
[1108] Fix | Delete
$paused_themes = wp_paused_themes()->get_all();
[1109] Fix | Delete
[1110] Fix | Delete
if ( empty( $paused_themes ) ) {
[1111] Fix | Delete
return $themes;
[1112] Fix | Delete
}
[1113] Fix | Delete
[1114] Fix | Delete
foreach ( $themes as $index => $theme ) {
[1115] Fix | Delete
$theme = basename( $theme );
[1116] Fix | Delete
[1117] Fix | Delete
if ( array_key_exists( $theme, $paused_themes ) ) {
[1118] Fix | Delete
unset( $themes[ $index ] );
[1119] Fix | Delete
[1120] Fix | Delete
// Store list of paused themes for displaying an admin notice.
[1121] Fix | Delete
$GLOBALS['_paused_themes'][ $theme ] = $paused_themes[ $theme ];
[1122] Fix | Delete
}
[1123] Fix | Delete
}
[1124] Fix | Delete
[1125] Fix | Delete
return $themes;
[1126] Fix | Delete
}
[1127] Fix | Delete
[1128] Fix | Delete
/**
[1129] Fix | Delete
* Determines whether WordPress is in Recovery Mode.
[1130] Fix | Delete
*
[1131] Fix | Delete
* In this mode, plugins or themes that cause WSODs will be paused.
[1132] Fix | Delete
*
[1133] Fix | Delete
* @since 5.2.0
[1134] Fix | Delete
*
[1135] Fix | Delete
* @return bool
[1136] Fix | Delete
*/
[1137] Fix | Delete
function wp_is_recovery_mode() {
[1138] Fix | Delete
return wp_recovery_mode()->is_active();
[1139] Fix | Delete
}
[1140] Fix | Delete
[1141] Fix | Delete
/**
[1142] Fix | Delete
* Determines whether we are currently on an endpoint that should be protected against WSODs.
[1143] Fix | Delete
*
[1144] Fix | Delete
* @since 5.2.0
[1145] Fix | Delete
*
[1146] Fix | Delete
* @global string $pagenow The filename of the current screen.
[1147] Fix | Delete
*
[1148] Fix | Delete
* @return bool True if the current endpoint should be protected.
[1149] Fix | Delete
*/
[1150] Fix | Delete
function is_protected_endpoint() {
[1151] Fix | Delete
// Protect login pages.
[1152] Fix | Delete
if ( isset( $GLOBALS['pagenow'] ) && 'wp-login.php' === $GLOBALS['pagenow'] ) {
[1153] Fix | Delete
return true;
[1154] Fix | Delete
}
[1155] Fix | Delete
[1156] Fix | Delete
// Protect the admin backend.
[1157] Fix | Delete
if ( is_admin() && ! wp_doing_ajax() ) {
[1158] Fix | Delete
return true;
[1159] Fix | Delete
}
[1160] Fix | Delete
[1161] Fix | Delete
// Protect Ajax actions that could help resolve a fatal error should be available.
[1162] Fix | Delete
if ( is_protected_ajax_action() ) {
[1163] Fix | Delete
return true;
[1164] Fix | Delete
}
[1165] Fix | Delete
[1166] Fix | Delete
/**
[1167] Fix | Delete
* Filters whether the current request is against a protected endpoint.
[1168] Fix | Delete
*
[1169] Fix | Delete
* This filter is only fired when an endpoint is requested which is not already protected by
[1170] Fix | Delete
* WordPress core. As such, it exclusively allows providing further protected endpoints in
[1171] Fix | Delete
* addition to the admin backend, login pages and protected Ajax actions.
[1172] Fix | Delete
*
[1173] Fix | Delete
* @since 5.2.0
[1174] Fix | Delete
*
[1175] Fix | Delete
* @param bool $is_protected_endpoint Whether the currently requested endpoint is protected.
[1176] Fix | Delete
* Default false.
[1177] Fix | Delete
*/
[1178] Fix | Delete
return (bool) apply_filters( 'is_protected_endpoint', false );
[1179] Fix | Delete
}
[1180] Fix | Delete
[1181] Fix | Delete
/**
[1182] Fix | Delete
* Determines whether we are currently handling an Ajax action that should be protected against WSODs.
[1183] Fix | Delete
*
[1184] Fix | Delete
* @since 5.2.0
[1185] Fix | Delete
*
[1186] Fix | Delete
* @return bool True if the current Ajax action should be protected.
[1187] Fix | Delete
*/
[1188] Fix | Delete
function is_protected_ajax_action() {
[1189] Fix | Delete
if ( ! wp_doing_ajax() ) {
[1190] Fix | Delete
return false;
[1191] Fix | Delete
}
[1192] Fix | Delete
[1193] Fix | Delete
if ( ! isset( $_REQUEST['action'] ) ) {
[1194] Fix | Delete
return false;
[1195] Fix | Delete
}
[1196] Fix | Delete
[1197] Fix | Delete
$actions_to_protect = array(
[1198] Fix | Delete
'edit-theme-plugin-file', // Saving changes in the core code editor.
[1199] Fix | Delete
'heartbeat', // Keep the heart beating.
[1200] Fix | Delete
'install-plugin', // Installing a new plugin.
[1201] Fix | Delete
'install-theme', // Installing a new theme.
[1202] Fix | Delete
'search-plugins', // Searching in the list of plugins.
[1203] Fix | Delete
'search-install-plugins', // Searching for a plugin in the plugin install screen.
[1204] Fix | Delete
'update-plugin', // Update an existing plugin.
[1205] Fix | Delete
'update-theme', // Update an existing theme.
[1206] Fix | Delete
'activate-plugin', // Activating an existing plugin.
[1207] Fix | Delete
);
[1208] Fix | Delete
[1209] Fix | Delete
/**
[1210] Fix | Delete
* Filters the array of protected Ajax actions.
[1211] Fix | Delete
*
[1212] Fix | Delete
* This filter is only fired when doing Ajax and the Ajax request has an 'action' property.
[1213] Fix | Delete
*
[1214] Fix | Delete
* @since 5.2.0
[1215] Fix | Delete
*
[1216] Fix | Delete
* @param string[] $actions_to_protect Array of strings with Ajax actions to protect.
[1217] Fix | Delete
*/
[1218] Fix | Delete
$actions_to_protect = (array) apply_filters( 'wp_protected_ajax_actions', $actions_to_protect );
[1219] Fix | Delete
[1220] Fix | Delete
if ( ! in_array( $_REQUEST['action'], $actions_to_protect, true ) ) {
[1221] Fix | Delete
return false;
[1222] Fix | Delete
}
[1223] Fix | Delete
[1224] Fix | Delete
return true;
[1225] Fix | Delete
}
[1226] Fix | Delete
[1227] Fix | Delete
/**
[1228] Fix | Delete
* Sets internal encoding.
[1229] Fix | Delete
*
[1230] Fix | Delete
* In most cases the default internal encoding is latin1, which is
[1231] Fix | Delete
* of no use, since we want to use the `mb_` functions for `utf-8` strings.
[1232] Fix | Delete
*
[1233] Fix | Delete
* @since 3.0.0
[1234] Fix | Delete
* @access private
[1235] Fix | Delete
*/
[1236] Fix | Delete
function wp_set_internal_encoding() {
[1237] Fix | Delete
if ( function_exists( 'mb_internal_encoding' ) ) {
[1238] Fix | Delete
$charset = get_option( 'blog_charset' );
[1239] Fix | Delete
// phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged
[1240] Fix | Delete
if ( ! $charset || ! @mb_internal_encoding( $charset ) ) {
[1241] Fix | Delete
mb_internal_encoding( 'UTF-8' );
[1242] Fix | Delete
}
[1243] Fix | Delete
}
[1244] Fix | Delete
}
[1245] Fix | Delete
[1246] Fix | Delete
/**
[1247] Fix | Delete
* Adds magic quotes to `$_GET`, `$_POST`, `$_COOKIE`, and `$_SERVER`.
[1248] Fix | Delete
*
[1249] Fix | Delete
* Also forces `$_REQUEST` to be `$_GET + $_POST`. If `$_SERVER`,
[1250] Fix | Delete
* `$_COOKIE`, or `$_ENV` are needed, use those superglobals directly.
[1251] Fix | Delete
*
[1252] Fix | Delete
* @since 3.0.0
[1253] Fix | Delete
* @access private
[1254] Fix | Delete
*/
[1255] Fix | Delete
function wp_magic_quotes() {
[1256] Fix | Delete
// Escape with wpdb.
[1257] Fix | Delete
$_GET = add_magic_quotes( $_GET );
[1258] Fix | Delete
$_POST = add_magic_quotes( $_POST );
[1259] Fix | Delete
$_COOKIE = add_magic_quotes( $_COOKIE );
[1260] Fix | Delete
$_SERVER = add_magic_quotes( $_SERVER );
[1261] Fix | Delete
[1262] Fix | Delete
// Force REQUEST to be GET + POST.
[1263] Fix | Delete
$_REQUEST = array_merge( $_GET, $_POST );
[1264] Fix | Delete
}
[1265] Fix | Delete
[1266] Fix | Delete
/**
[1267] Fix | Delete
* Runs just before PHP shuts down execution.
[1268] Fix | Delete
*
[1269] Fix | Delete
* @since 1.2.0
[1270] Fix | Delete
* @access private
[1271] Fix | Delete
*/
[1272] Fix | Delete
function shutdown_action_hook() {
[1273] Fix | Delete
/**
[1274] Fix | Delete
* Fires just before PHP shuts down execution.
[1275] Fix | Delete
*
[1276] Fix | Delete
* @since 1.2.0
[1277] Fix | Delete
*/
[1278] Fix | Delete
do_action( 'shutdown' );
[1279] Fix | Delete
[1280] Fix | Delete
wp_cache_close();
[1281] Fix | Delete
}
[1282] Fix | Delete
[1283] Fix | Delete
/**
[1284] Fix | Delete
* Clones an object.
[1285] Fix | Delete
*
[1286] Fix | Delete
* @since 2.7.0
[1287] Fix | Delete
* @deprecated 3.2.0
[1288] Fix | Delete
*
[1289] Fix | Delete
* @param object $input_object The object to clone.
[1290] Fix | Delete
* @return object The cloned object.
[1291] Fix | Delete
*/
[1292] Fix | Delete
function wp_clone( $input_object ) {
[1293] Fix | Delete
// Use parens for clone to accommodate PHP 4. See #17880.
[1294] Fix | Delete
return clone( $input_object );
[1295] Fix | Delete
}
[1296] Fix | Delete
[1297] Fix | Delete
/**
[1298] Fix | Delete
* Determines whether the current request is for the login screen.
[1299] Fix | Delete
*
[1300] Fix | Delete
* @since 6.1.0
[1301] Fix | Delete
*
[1302] Fix | Delete
* @see wp_login_url()
[1303] Fix | Delete
*
[1304] Fix | Delete
* @return bool True if inside WordPress login screen, false otherwise.
[1305] Fix | Delete
*/
[1306] Fix | Delete
function is_login() {
[1307] Fix | Delete
return false !== stripos( wp_login_url(), $_SERVER['SCRIPT_NAME'] );
[1308] Fix | Delete
}
[1309] Fix | Delete
[1310] Fix | Delete
/**
[1311] Fix | Delete
* Determines whether the current request is for an administrative interface page.
[1312] Fix | Delete
*
[1313] Fix | Delete
* Does not check if the user is an administrator; use current_user_can()
[1314] Fix | Delete
* for checking roles and capabilities.
[1315] Fix | Delete
*
[1316] Fix | Delete
* For more information on this and similar theme functions, check out
[1317] Fix | Delete
* the {@link https://developer.wordpress.org/themes/basics/conditional-tags/
[1318] Fix | Delete
* Conditional Tags} article in the Theme Developer Handbook.
[1319] Fix | Delete
*
[1320] Fix | Delete
* @since 1.5.1
[1321] Fix | Delete
*
[1322] Fix | Delete
* @global WP_Screen $current_screen WordPress current screen object.
[1323] Fix | Delete
*
[1324] Fix | Delete
* @return bool True if inside WordPress administration interface, false otherwise.
[1325] Fix | Delete
*/
[1326] Fix | Delete
function is_admin() {
[1327] Fix | Delete
if ( isset( $GLOBALS['current_screen'] ) ) {
[1328] Fix | Delete
return $GLOBALS['current_screen']->in_admin();
[1329] Fix | Delete
} elseif ( defined( 'WP_ADMIN' ) ) {
[1330] Fix | Delete
return WP_ADMIN;
[1331] Fix | Delete
}
[1332] Fix | Delete
[1333] Fix | Delete
return false;
[1334] Fix | Delete
}
[1335] Fix | Delete
[1336] Fix | Delete
/**
[1337] Fix | Delete
* Determines whether the current request is for a site's administrative interface.
[1338] Fix | Delete
*
[1339] Fix | Delete
* e.g. `/wp-admin/`
[1340] Fix | Delete
*
[1341] Fix | Delete
* Does not check if the user is an administrator; use current_user_can()
[1342] Fix | Delete
* for checking roles and capabilities.
[1343] Fix | Delete
*
[1344] Fix | Delete
* @since 3.1.0
[1345] Fix | Delete
*
[1346] Fix | Delete
* @global WP_Screen $current_screen WordPress current screen object.
[1347] Fix | Delete
*
[1348] Fix | Delete
* @return bool True if inside WordPress site administration pages.
[1349] Fix | Delete
*/
[1350] Fix | Delete
function is_blog_admin() {
[1351] Fix | Delete
if ( isset( $GLOBALS['current_screen'] ) ) {
[1352] Fix | Delete
return $GLOBALS['current_screen']->in_admin( 'site' );
[1353] Fix | Delete
} elseif ( defined( 'WP_BLOG_ADMIN' ) ) {
[1354] Fix | Delete
return WP_BLOG_ADMIN;
[1355] Fix | Delete
}
[1356] Fix | Delete
[1357] Fix | Delete
return false;
[1358] Fix | Delete
}
[1359] Fix | Delete
[1360] Fix | Delete
/**
[1361] Fix | Delete
* Determines whether the current request is for the network administrative interface.
[1362] Fix | Delete
*
[1363] Fix | Delete
* e.g. `/wp-admin/network/`
[1364] Fix | Delete
*
[1365] Fix | Delete
* Does not check if the user is an administrator; use current_user_can()
[1366] Fix | Delete
* for checking roles and capabilities.
[1367] Fix | Delete
*
[1368] Fix | Delete
* Does not check if the site is a Multisite network; use is_multisite()
[1369] Fix | Delete
* for checking if Multisite is enabled.
[1370] Fix | Delete
*
[1371] Fix | Delete
* @since 3.1.0
[1372] Fix | Delete
*
[1373] Fix | Delete
* @global WP_Screen $current_screen WordPress current screen object.
[1374] Fix | Delete
*
[1375] Fix | Delete
* @return bool True if inside WordPress network administration pages.
[1376] Fix | Delete
*/
[1377] Fix | Delete
function is_network_admin() {
[1378] Fix | Delete
if ( isset( $GLOBALS['current_screen'] ) ) {
[1379] Fix | Delete
return $GLOBALS['current_screen']->in_admin( 'network' );
[1380] Fix | Delete
} elseif ( defined( 'WP_NETWORK_ADMIN' ) ) {
[1381] Fix | Delete
return WP_NETWORK_ADMIN;
[1382] Fix | Delete
}
[1383] Fix | Delete
[1384] Fix | Delete
return false;
[1385] Fix | Delete
}
[1386] Fix | Delete
[1387] Fix | Delete
/**
[1388] Fix | Delete
* Determines whether the current request is for a user admin screen.
[1389] Fix | Delete
*
[1390] Fix | Delete
* e.g. `/wp-admin/user/`
[1391] Fix | Delete
*
[1392] Fix | Delete
* Does not check if the user is an administrator; use current_user_can()
[1393] Fix | Delete
* for checking roles and capabilities.
[1394] Fix | Delete
*
[1395] Fix | Delete
* @since 3.1.0
[1396] Fix | Delete
*
[1397] Fix | Delete
* @global WP_Screen $current_screen WordPress current screen object.
[1398] Fix | Delete
*
[1399] Fix | Delete
* @return bool True if inside WordPress user administration pages.
[1400] Fix | Delete
*/
[1401] Fix | Delete
function is_user_admin() {
[1402] Fix | Delete
if ( isset( $GLOBALS['current_screen'] ) ) {
[1403] Fix | Delete
return $GLOBALS['current_screen']->in_admin( 'user' );
[1404] Fix | Delete
} elseif ( defined( 'WP_USER_ADMIN' ) ) {
[1405] Fix | Delete
return WP_USER_ADMIN;
[1406] Fix | Delete
}
[1407] Fix | Delete
[1408] Fix | Delete
return false;
[1409] Fix | Delete
}
[1410] Fix | Delete
[1411] Fix | Delete
/**
[1412] Fix | Delete
* Determines whether Multisite is enabled.
[1413] Fix | Delete
*
[1414] Fix | Delete
* @since 3.0.0
[1415] Fix | Delete
*
[1416] Fix | Delete
* @return bool True if Multisite is enabled, false otherwise.
[1417] Fix | Delete
*/
[1418] Fix | Delete
function is_multisite() {
[1419] Fix | Delete
if ( defined( 'MULTISITE' ) ) {
[1420] Fix | Delete
return MULTISITE;
[1421] Fix | Delete
}
[1422] Fix | Delete
[1423] Fix | Delete
if ( defined( 'SUBDOMAIN_INSTALL' ) || defined( 'VHOST' ) || defined( 'SUNRISE' ) ) {
[1424] Fix | Delete
return true;
[1425] Fix | Delete
}
[1426] Fix | Delete
[1427] Fix | Delete
return false;
[1428] Fix | Delete
}
[1429] Fix | Delete
[1430] Fix | Delete
/**
[1431] Fix | Delete
* Retrieves the current site ID.
[1432] Fix | Delete
*
[1433] Fix | Delete
* @since 3.1.0
[1434] Fix | Delete
*
[1435] Fix | Delete
* @global int $blog_id
[1436] Fix | Delete
*
[1437] Fix | Delete
* @return int Site ID.
[1438] Fix | Delete
*/
[1439] Fix | Delete
function get_current_blog_id() {
[1440] Fix | Delete
global $blog_id;
[1441] Fix | Delete
[1442] Fix | Delete
return absint( $blog_id );
[1443] Fix | Delete
}
[1444] Fix | Delete
[1445] Fix | Delete
/**
[1446] Fix | Delete
* Retrieves the current network ID.
[1447] Fix | Delete
*
[1448] Fix | Delete
* @since 4.6.0
[1449] Fix | Delete
*
[1450] Fix | Delete
* @return int The ID of the current network.
[1451] Fix | Delete
*/
[1452] Fix | Delete
function get_current_network_id() {
[1453] Fix | Delete
if ( ! is_multisite() ) {
[1454] Fix | Delete
return 1;
[1455] Fix | Delete
}
[1456] Fix | Delete
[1457] Fix | Delete
$current_network = get_network();
[1458] Fix | Delete
[1459] Fix | Delete
if ( ! isset( $current_network->id ) ) {
[1460] Fix | Delete
return get_main_network_id();
[1461] Fix | Delete
}
[1462] Fix | Delete
[1463] Fix | Delete
return absint( $current_network->id );
[1464] Fix | Delete
}
[1465] Fix | Delete
[1466] Fix | Delete
/**
[1467] Fix | Delete
* Attempts an early load of translations.
[1468] Fix | Delete
*
[1469] Fix | Delete
* Used for errors encountered during the initial loading process, before
[1470] Fix | Delete
* the locale has been properly detected and loaded.
[1471] Fix | Delete
*
[1472] Fix | Delete
* Designed for unusual load sequences (like setup-config.php) or for when
[1473] Fix | Delete
* the script will then terminate with an error, otherwise there is a risk
[1474] Fix | Delete
* that a file can be double-included.
[1475] Fix | Delete
*
[1476] Fix | Delete
* @since 3.4.0
[1477] Fix | Delete
* @access private
[1478] Fix | Delete
*
[1479] Fix | Delete
* @global WP_Textdomain_Registry $wp_textdomain_registry WordPress Textdomain Registry.
[1480] Fix | Delete
* @global WP_Locale $wp_locale WordPress date and time locale object.
[1481] Fix | Delete
*/
[1482] Fix | Delete
function wp_load_translations_early() {
[1483] Fix | Delete
global $wp_textdomain_registry, $wp_locale;
[1484] Fix | Delete
static $loaded = false;
[1485] Fix | Delete
[1486] Fix | Delete
if ( $loaded ) {
[1487] Fix | Delete
return;
[1488] Fix | Delete
}
[1489] Fix | Delete
[1490] Fix | Delete
$loaded = true;
[1491] Fix | Delete
[1492] Fix | Delete
if ( function_exists( 'did_action' ) && did_action( 'init' ) ) {
[1493] Fix | Delete
return;
[1494] Fix | Delete
}
[1495] Fix | Delete
[1496] Fix | Delete
// We need $wp_local_package.
[1497] Fix | Delete
require ABSPATH . WPINC . '/version.php';
[1498] Fix | Delete
[1499] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function