Edit File by line
/home/barbar84/www/wp-inclu...
File: load.php
);
[1000] Fix | Delete
[1001] Fix | Delete
/**
[1002] Fix | Delete
* Filters the array of protected Ajax actions.
[1003] Fix | Delete
*
[1004] Fix | Delete
* This filter is only fired when doing Ajax and the Ajax request has an 'action' property.
[1005] Fix | Delete
*
[1006] Fix | Delete
* @since 5.2.0
[1007] Fix | Delete
*
[1008] Fix | Delete
* @param string[] $actions_to_protect Array of strings with Ajax actions to protect.
[1009] Fix | Delete
*/
[1010] Fix | Delete
$actions_to_protect = (array) apply_filters( 'wp_protected_ajax_actions', $actions_to_protect );
[1011] Fix | Delete
[1012] Fix | Delete
if ( ! in_array( $_REQUEST['action'], $actions_to_protect, true ) ) {
[1013] Fix | Delete
return false;
[1014] Fix | Delete
}
[1015] Fix | Delete
[1016] Fix | Delete
return true;
[1017] Fix | Delete
}
[1018] Fix | Delete
[1019] Fix | Delete
/**
[1020] Fix | Delete
* Set internal encoding.
[1021] Fix | Delete
*
[1022] Fix | Delete
* In most cases the default internal encoding is latin1, which is
[1023] Fix | Delete
* of no use, since we want to use the `mb_` functions for `utf-8` strings.
[1024] Fix | Delete
*
[1025] Fix | Delete
* @since 3.0.0
[1026] Fix | Delete
* @access private
[1027] Fix | Delete
*/
[1028] Fix | Delete
function wp_set_internal_encoding() {
[1029] Fix | Delete
if ( function_exists( 'mb_internal_encoding' ) ) {
[1030] Fix | Delete
$charset = get_option( 'blog_charset' );
[1031] Fix | Delete
// phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged
[1032] Fix | Delete
if ( ! $charset || ! @mb_internal_encoding( $charset ) ) {
[1033] Fix | Delete
mb_internal_encoding( 'UTF-8' );
[1034] Fix | Delete
}
[1035] Fix | Delete
}
[1036] Fix | Delete
}
[1037] Fix | Delete
[1038] Fix | Delete
/**
[1039] Fix | Delete
* Add magic quotes to `$_GET`, `$_POST`, `$_COOKIE`, and `$_SERVER`.
[1040] Fix | Delete
*
[1041] Fix | Delete
* Also forces `$_REQUEST` to be `$_GET + $_POST`. If `$_SERVER`,
[1042] Fix | Delete
* `$_COOKIE`, or `$_ENV` are needed, use those superglobals directly.
[1043] Fix | Delete
*
[1044] Fix | Delete
* @since 3.0.0
[1045] Fix | Delete
* @access private
[1046] Fix | Delete
*/
[1047] Fix | Delete
function wp_magic_quotes() {
[1048] Fix | Delete
// Escape with wpdb.
[1049] Fix | Delete
$_GET = add_magic_quotes( $_GET );
[1050] Fix | Delete
$_POST = add_magic_quotes( $_POST );
[1051] Fix | Delete
$_COOKIE = add_magic_quotes( $_COOKIE );
[1052] Fix | Delete
$_SERVER = add_magic_quotes( $_SERVER );
[1053] Fix | Delete
[1054] Fix | Delete
// Force REQUEST to be GET + POST.
[1055] Fix | Delete
$_REQUEST = array_merge( $_GET, $_POST );
[1056] Fix | Delete
}
[1057] Fix | Delete
[1058] Fix | Delete
/**
[1059] Fix | Delete
* Runs just before PHP shuts down execution.
[1060] Fix | Delete
*
[1061] Fix | Delete
* @since 1.2.0
[1062] Fix | Delete
* @access private
[1063] Fix | Delete
*/
[1064] Fix | Delete
function shutdown_action_hook() {
[1065] Fix | Delete
/**
[1066] Fix | Delete
* Fires just before PHP shuts down execution.
[1067] Fix | Delete
*
[1068] Fix | Delete
* @since 1.2.0
[1069] Fix | Delete
*/
[1070] Fix | Delete
do_action( 'shutdown' );
[1071] Fix | Delete
[1072] Fix | Delete
wp_cache_close();
[1073] Fix | Delete
}
[1074] Fix | Delete
[1075] Fix | Delete
/**
[1076] Fix | Delete
* Copy an object.
[1077] Fix | Delete
*
[1078] Fix | Delete
* @since 2.7.0
[1079] Fix | Delete
* @deprecated 3.2.0
[1080] Fix | Delete
*
[1081] Fix | Delete
* @param object $object The object to clone.
[1082] Fix | Delete
* @return object The cloned object.
[1083] Fix | Delete
*/
[1084] Fix | Delete
function wp_clone( $object ) {
[1085] Fix | Delete
// Use parens for clone to accommodate PHP 4. See #17880.
[1086] Fix | Delete
return clone( $object );
[1087] Fix | Delete
}
[1088] Fix | Delete
[1089] Fix | Delete
/**
[1090] Fix | Delete
* Determines whether the current request is for an administrative interface page.
[1091] Fix | Delete
*
[1092] Fix | Delete
* Does not check if the user is an administrator; use current_user_can()
[1093] Fix | Delete
* for checking roles and capabilities.
[1094] Fix | Delete
*
[1095] Fix | Delete
* For more information on this and similar theme functions, check out
[1096] Fix | Delete
* the {@link https://developer.wordpress.org/themes/basics/conditional-tags/
[1097] Fix | Delete
* Conditional Tags} article in the Theme Developer Handbook.
[1098] Fix | Delete
*
[1099] Fix | Delete
* @since 1.5.1
[1100] Fix | Delete
*
[1101] Fix | Delete
* @global WP_Screen $current_screen WordPress current screen object.
[1102] Fix | Delete
*
[1103] Fix | Delete
* @return bool True if inside WordPress administration interface, false otherwise.
[1104] Fix | Delete
*/
[1105] Fix | Delete
function is_admin() {
[1106] Fix | Delete
if ( isset( $GLOBALS['current_screen'] ) ) {
[1107] Fix | Delete
return $GLOBALS['current_screen']->in_admin();
[1108] Fix | Delete
} elseif ( defined( 'WP_ADMIN' ) ) {
[1109] Fix | Delete
return WP_ADMIN;
[1110] Fix | Delete
}
[1111] Fix | Delete
[1112] Fix | Delete
return false;
[1113] Fix | Delete
}
[1114] Fix | Delete
[1115] Fix | Delete
/**
[1116] Fix | Delete
* Whether the current request is for a site's administrative interface.
[1117] Fix | Delete
*
[1118] Fix | Delete
* e.g. `/wp-admin/`
[1119] Fix | Delete
*
[1120] Fix | Delete
* Does not check if the user is an administrator; use current_user_can()
[1121] Fix | Delete
* for checking roles and capabilities.
[1122] Fix | Delete
*
[1123] Fix | Delete
* @since 3.1.0
[1124] Fix | Delete
*
[1125] Fix | Delete
* @global WP_Screen $current_screen WordPress current screen object.
[1126] Fix | Delete
*
[1127] Fix | Delete
* @return bool True if inside WordPress blog administration pages.
[1128] Fix | Delete
*/
[1129] Fix | Delete
function is_blog_admin() {
[1130] Fix | Delete
if ( isset( $GLOBALS['current_screen'] ) ) {
[1131] Fix | Delete
return $GLOBALS['current_screen']->in_admin( 'site' );
[1132] Fix | Delete
} elseif ( defined( 'WP_BLOG_ADMIN' ) ) {
[1133] Fix | Delete
return WP_BLOG_ADMIN;
[1134] Fix | Delete
}
[1135] Fix | Delete
[1136] Fix | Delete
return false;
[1137] Fix | Delete
}
[1138] Fix | Delete
[1139] Fix | Delete
/**
[1140] Fix | Delete
* Whether the current request is for the network administrative interface.
[1141] Fix | Delete
*
[1142] Fix | Delete
* e.g. `/wp-admin/network/`
[1143] Fix | Delete
*
[1144] Fix | Delete
* Does not check if the user is an administrator; use current_user_can()
[1145] Fix | Delete
* for checking roles and capabilities.
[1146] Fix | Delete
*
[1147] Fix | Delete
* Does not check if the site is a Multisite network; use is_multisite()
[1148] Fix | Delete
* for checking if Multisite is enabled.
[1149] Fix | Delete
*
[1150] Fix | Delete
* @since 3.1.0
[1151] Fix | Delete
*
[1152] Fix | Delete
* @global WP_Screen $current_screen WordPress current screen object.
[1153] Fix | Delete
*
[1154] Fix | Delete
* @return bool True if inside WordPress network administration pages.
[1155] Fix | Delete
*/
[1156] Fix | Delete
function is_network_admin() {
[1157] Fix | Delete
if ( isset( $GLOBALS['current_screen'] ) ) {
[1158] Fix | Delete
return $GLOBALS['current_screen']->in_admin( 'network' );
[1159] Fix | Delete
} elseif ( defined( 'WP_NETWORK_ADMIN' ) ) {
[1160] Fix | Delete
return WP_NETWORK_ADMIN;
[1161] Fix | Delete
}
[1162] Fix | Delete
[1163] Fix | Delete
return false;
[1164] Fix | Delete
}
[1165] Fix | Delete
[1166] Fix | Delete
/**
[1167] Fix | Delete
* Whether the current request is for a user admin screen.
[1168] Fix | Delete
*
[1169] Fix | Delete
* e.g. `/wp-admin/user/`
[1170] Fix | Delete
*
[1171] Fix | Delete
* Does not check if the user is an administrator; use current_user_can()
[1172] Fix | Delete
* for checking roles and capabilities.
[1173] Fix | Delete
*
[1174] Fix | Delete
* @since 3.1.0
[1175] Fix | Delete
*
[1176] Fix | Delete
* @global WP_Screen $current_screen WordPress current screen object.
[1177] Fix | Delete
*
[1178] Fix | Delete
* @return bool True if inside WordPress user administration pages.
[1179] Fix | Delete
*/
[1180] Fix | Delete
function is_user_admin() {
[1181] Fix | Delete
if ( isset( $GLOBALS['current_screen'] ) ) {
[1182] Fix | Delete
return $GLOBALS['current_screen']->in_admin( 'user' );
[1183] Fix | Delete
} elseif ( defined( 'WP_USER_ADMIN' ) ) {
[1184] Fix | Delete
return WP_USER_ADMIN;
[1185] Fix | Delete
}
[1186] Fix | Delete
[1187] Fix | Delete
return false;
[1188] Fix | Delete
}
[1189] Fix | Delete
[1190] Fix | Delete
/**
[1191] Fix | Delete
* If Multisite is enabled.
[1192] Fix | Delete
*
[1193] Fix | Delete
* @since 3.0.0
[1194] Fix | Delete
*
[1195] Fix | Delete
* @return bool True if Multisite is enabled, false otherwise.
[1196] Fix | Delete
*/
[1197] Fix | Delete
function is_multisite() {
[1198] Fix | Delete
if ( defined( 'MULTISITE' ) ) {
[1199] Fix | Delete
return MULTISITE;
[1200] Fix | Delete
}
[1201] Fix | Delete
[1202] Fix | Delete
if ( defined( 'SUBDOMAIN_INSTALL' ) || defined( 'VHOST' ) || defined( 'SUNRISE' ) ) {
[1203] Fix | Delete
return true;
[1204] Fix | Delete
}
[1205] Fix | Delete
[1206] Fix | Delete
return false;
[1207] Fix | Delete
}
[1208] Fix | Delete
[1209] Fix | Delete
/**
[1210] Fix | Delete
* Retrieve the current site ID.
[1211] Fix | Delete
*
[1212] Fix | Delete
* @since 3.1.0
[1213] Fix | Delete
*
[1214] Fix | Delete
* @global int $blog_id
[1215] Fix | Delete
*
[1216] Fix | Delete
* @return int Site ID.
[1217] Fix | Delete
*/
[1218] Fix | Delete
function get_current_blog_id() {
[1219] Fix | Delete
global $blog_id;
[1220] Fix | Delete
return absint( $blog_id );
[1221] Fix | Delete
}
[1222] Fix | Delete
[1223] Fix | Delete
/**
[1224] Fix | Delete
* Retrieves the current network ID.
[1225] Fix | Delete
*
[1226] Fix | Delete
* @since 4.6.0
[1227] Fix | Delete
*
[1228] Fix | Delete
* @return int The ID of the current network.
[1229] Fix | Delete
*/
[1230] Fix | Delete
function get_current_network_id() {
[1231] Fix | Delete
if ( ! is_multisite() ) {
[1232] Fix | Delete
return 1;
[1233] Fix | Delete
}
[1234] Fix | Delete
[1235] Fix | Delete
$current_network = get_network();
[1236] Fix | Delete
[1237] Fix | Delete
if ( ! isset( $current_network->id ) ) {
[1238] Fix | Delete
return get_main_network_id();
[1239] Fix | Delete
}
[1240] Fix | Delete
[1241] Fix | Delete
return absint( $current_network->id );
[1242] Fix | Delete
}
[1243] Fix | Delete
[1244] Fix | Delete
/**
[1245] Fix | Delete
* Attempt an early load of translations.
[1246] Fix | Delete
*
[1247] Fix | Delete
* Used for errors encountered during the initial loading process, before
[1248] Fix | Delete
* the locale has been properly detected and loaded.
[1249] Fix | Delete
*
[1250] Fix | Delete
* Designed for unusual load sequences (like setup-config.php) or for when
[1251] Fix | Delete
* the script will then terminate with an error, otherwise there is a risk
[1252] Fix | Delete
* that a file can be double-included.
[1253] Fix | Delete
*
[1254] Fix | Delete
* @since 3.4.0
[1255] Fix | Delete
* @access private
[1256] Fix | Delete
*
[1257] Fix | Delete
* @global WP_Locale $wp_locale WordPress date and time locale object.
[1258] Fix | Delete
*/
[1259] Fix | Delete
function wp_load_translations_early() {
[1260] Fix | Delete
global $wp_locale;
[1261] Fix | Delete
[1262] Fix | Delete
static $loaded = false;
[1263] Fix | Delete
if ( $loaded ) {
[1264] Fix | Delete
return;
[1265] Fix | Delete
}
[1266] Fix | Delete
$loaded = true;
[1267] Fix | Delete
[1268] Fix | Delete
if ( function_exists( 'did_action' ) && did_action( 'init' ) ) {
[1269] Fix | Delete
return;
[1270] Fix | Delete
}
[1271] Fix | Delete
[1272] Fix | Delete
// We need $wp_local_package.
[1273] Fix | Delete
require ABSPATH . WPINC . '/version.php';
[1274] Fix | Delete
[1275] Fix | Delete
// Translation and localization.
[1276] Fix | Delete
require_once ABSPATH . WPINC . '/pomo/mo.php';
[1277] Fix | Delete
require_once ABSPATH . WPINC . '/l10n.php';
[1278] Fix | Delete
require_once ABSPATH . WPINC . '/class-wp-locale.php';
[1279] Fix | Delete
require_once ABSPATH . WPINC . '/class-wp-locale-switcher.php';
[1280] Fix | Delete
[1281] Fix | Delete
// General libraries.
[1282] Fix | Delete
require_once ABSPATH . WPINC . '/plugin.php';
[1283] Fix | Delete
[1284] Fix | Delete
$locales = array();
[1285] Fix | Delete
$locations = array();
[1286] Fix | Delete
[1287] Fix | Delete
while ( true ) {
[1288] Fix | Delete
if ( defined( 'WPLANG' ) ) {
[1289] Fix | Delete
if ( '' === WPLANG ) {
[1290] Fix | Delete
break;
[1291] Fix | Delete
}
[1292] Fix | Delete
$locales[] = WPLANG;
[1293] Fix | Delete
}
[1294] Fix | Delete
[1295] Fix | Delete
if ( isset( $wp_local_package ) ) {
[1296] Fix | Delete
$locales[] = $wp_local_package;
[1297] Fix | Delete
}
[1298] Fix | Delete
[1299] Fix | Delete
if ( ! $locales ) {
[1300] Fix | Delete
break;
[1301] Fix | Delete
}
[1302] Fix | Delete
[1303] Fix | Delete
if ( defined( 'WP_LANG_DIR' ) && @is_dir( WP_LANG_DIR ) ) {
[1304] Fix | Delete
$locations[] = WP_LANG_DIR;
[1305] Fix | Delete
}
[1306] Fix | Delete
[1307] Fix | Delete
if ( defined( 'WP_CONTENT_DIR' ) && @is_dir( WP_CONTENT_DIR . '/languages' ) ) {
[1308] Fix | Delete
$locations[] = WP_CONTENT_DIR . '/languages';
[1309] Fix | Delete
}
[1310] Fix | Delete
[1311] Fix | Delete
if ( @is_dir( ABSPATH . 'wp-content/languages' ) ) {
[1312] Fix | Delete
$locations[] = ABSPATH . 'wp-content/languages';
[1313] Fix | Delete
}
[1314] Fix | Delete
[1315] Fix | Delete
if ( @is_dir( ABSPATH . WPINC . '/languages' ) ) {
[1316] Fix | Delete
$locations[] = ABSPATH . WPINC . '/languages';
[1317] Fix | Delete
}
[1318] Fix | Delete
[1319] Fix | Delete
if ( ! $locations ) {
[1320] Fix | Delete
break;
[1321] Fix | Delete
}
[1322] Fix | Delete
[1323] Fix | Delete
$locations = array_unique( $locations );
[1324] Fix | Delete
[1325] Fix | Delete
foreach ( $locales as $locale ) {
[1326] Fix | Delete
foreach ( $locations as $location ) {
[1327] Fix | Delete
if ( file_exists( $location . '/' . $locale . '.mo' ) ) {
[1328] Fix | Delete
load_textdomain( 'default', $location . '/' . $locale . '.mo' );
[1329] Fix | Delete
if ( defined( 'WP_SETUP_CONFIG' ) && file_exists( $location . '/admin-' . $locale . '.mo' ) ) {
[1330] Fix | Delete
load_textdomain( 'default', $location . '/admin-' . $locale . '.mo' );
[1331] Fix | Delete
}
[1332] Fix | Delete
break 2;
[1333] Fix | Delete
}
[1334] Fix | Delete
}
[1335] Fix | Delete
}
[1336] Fix | Delete
[1337] Fix | Delete
break;
[1338] Fix | Delete
}
[1339] Fix | Delete
[1340] Fix | Delete
$wp_locale = new WP_Locale();
[1341] Fix | Delete
}
[1342] Fix | Delete
[1343] Fix | Delete
/**
[1344] Fix | Delete
* Check or set whether WordPress is in "installation" mode.
[1345] Fix | Delete
*
[1346] Fix | Delete
* If the `WP_INSTALLING` constant is defined during the bootstrap, `wp_installing()` will default to `true`.
[1347] Fix | Delete
*
[1348] Fix | Delete
* @since 4.4.0
[1349] Fix | Delete
*
[1350] Fix | Delete
* @param bool $is_installing Optional. True to set WP into Installing mode, false to turn Installing mode off.
[1351] Fix | Delete
* Omit this parameter if you only want to fetch the current status.
[1352] Fix | Delete
* @return bool True if WP is installing, otherwise false. When a `$is_installing` is passed, the function will
[1353] Fix | Delete
* report whether WP was in installing mode prior to the change to `$is_installing`.
[1354] Fix | Delete
*/
[1355] Fix | Delete
function wp_installing( $is_installing = null ) {
[1356] Fix | Delete
static $installing = null;
[1357] Fix | Delete
[1358] Fix | Delete
// Support for the `WP_INSTALLING` constant, defined before WP is loaded.
[1359] Fix | Delete
if ( is_null( $installing ) ) {
[1360] Fix | Delete
$installing = defined( 'WP_INSTALLING' ) && WP_INSTALLING;
[1361] Fix | Delete
}
[1362] Fix | Delete
[1363] Fix | Delete
if ( ! is_null( $is_installing ) ) {
[1364] Fix | Delete
$old_installing = $installing;
[1365] Fix | Delete
$installing = $is_installing;
[1366] Fix | Delete
return (bool) $old_installing;
[1367] Fix | Delete
}
[1368] Fix | Delete
[1369] Fix | Delete
return (bool) $installing;
[1370] Fix | Delete
}
[1371] Fix | Delete
[1372] Fix | Delete
/**
[1373] Fix | Delete
* Determines if SSL is used.
[1374] Fix | Delete
*
[1375] Fix | Delete
* @since 2.6.0
[1376] Fix | Delete
* @since 4.6.0 Moved from functions.php to load.php.
[1377] Fix | Delete
*
[1378] Fix | Delete
* @return bool True if SSL, otherwise false.
[1379] Fix | Delete
*/
[1380] Fix | Delete
function is_ssl() {
[1381] Fix | Delete
if ( isset( $_SERVER['HTTPS'] ) ) {
[1382] Fix | Delete
if ( 'on' === strtolower( $_SERVER['HTTPS'] ) ) {
[1383] Fix | Delete
return true;
[1384] Fix | Delete
}
[1385] Fix | Delete
[1386] Fix | Delete
if ( '1' == $_SERVER['HTTPS'] ) {
[1387] Fix | Delete
return true;
[1388] Fix | Delete
}
[1389] Fix | Delete
} elseif ( isset( $_SERVER['SERVER_PORT'] ) && ( '443' == $_SERVER['SERVER_PORT'] ) ) {
[1390] Fix | Delete
return true;
[1391] Fix | Delete
}
[1392] Fix | Delete
return false;
[1393] Fix | Delete
}
[1394] Fix | Delete
[1395] Fix | Delete
/**
[1396] Fix | Delete
* Converts a shorthand byte value to an integer byte value.
[1397] Fix | Delete
*
[1398] Fix | Delete
* @since 2.3.0
[1399] Fix | Delete
* @since 4.6.0 Moved from media.php to load.php.
[1400] Fix | Delete
*
[1401] Fix | Delete
* @link https://www.php.net/manual/en/function.ini-get.php
[1402] Fix | Delete
* @link https://www.php.net/manual/en/faq.using.php#faq.using.shorthandbytes
[1403] Fix | Delete
*
[1404] Fix | Delete
* @param string $value A (PHP ini) byte value, either shorthand or ordinary.
[1405] Fix | Delete
* @return int An integer byte value.
[1406] Fix | Delete
*/
[1407] Fix | Delete
function wp_convert_hr_to_bytes( $value ) {
[1408] Fix | Delete
$value = strtolower( trim( $value ) );
[1409] Fix | Delete
$bytes = (int) $value;
[1410] Fix | Delete
[1411] Fix | Delete
if ( false !== strpos( $value, 'g' ) ) {
[1412] Fix | Delete
$bytes *= GB_IN_BYTES;
[1413] Fix | Delete
} elseif ( false !== strpos( $value, 'm' ) ) {
[1414] Fix | Delete
$bytes *= MB_IN_BYTES;
[1415] Fix | Delete
} elseif ( false !== strpos( $value, 'k' ) ) {
[1416] Fix | Delete
$bytes *= KB_IN_BYTES;
[1417] Fix | Delete
}
[1418] Fix | Delete
[1419] Fix | Delete
// Deal with large (float) values which run into the maximum integer size.
[1420] Fix | Delete
return min( $bytes, PHP_INT_MAX );
[1421] Fix | Delete
}
[1422] Fix | Delete
[1423] Fix | Delete
/**
[1424] Fix | Delete
* Determines whether a PHP ini value is changeable at runtime.
[1425] Fix | Delete
*
[1426] Fix | Delete
* @since 4.6.0
[1427] Fix | Delete
*
[1428] Fix | Delete
* @link https://www.php.net/manual/en/function.ini-get-all.php
[1429] Fix | Delete
*
[1430] Fix | Delete
* @param string $setting The name of the ini setting to check.
[1431] Fix | Delete
* @return bool True if the value is changeable at runtime. False otherwise.
[1432] Fix | Delete
*/
[1433] Fix | Delete
function wp_is_ini_value_changeable( $setting ) {
[1434] Fix | Delete
static $ini_all;
[1435] Fix | Delete
[1436] Fix | Delete
if ( ! isset( $ini_all ) ) {
[1437] Fix | Delete
$ini_all = false;
[1438] Fix | Delete
// Sometimes `ini_get_all()` is disabled via the `disable_functions` option for "security purposes".
[1439] Fix | Delete
if ( function_exists( 'ini_get_all' ) ) {
[1440] Fix | Delete
$ini_all = ini_get_all();
[1441] Fix | Delete
}
[1442] Fix | Delete
}
[1443] Fix | Delete
[1444] Fix | Delete
// Bit operator to workaround https://bugs.php.net/bug.php?id=44936 which changes access level to 63 in PHP 5.2.6 - 5.2.17.
[1445] Fix | Delete
if ( isset( $ini_all[ $setting ]['access'] ) && ( INI_ALL === ( $ini_all[ $setting ]['access'] & 7 ) || INI_USER === ( $ini_all[ $setting ]['access'] & 7 ) ) ) {
[1446] Fix | Delete
return true;
[1447] Fix | Delete
}
[1448] Fix | Delete
[1449] Fix | Delete
// If we were unable to retrieve the details, fail gracefully to assume it's changeable.
[1450] Fix | Delete
if ( ! is_array( $ini_all ) ) {
[1451] Fix | Delete
return true;
[1452] Fix | Delete
}
[1453] Fix | Delete
[1454] Fix | Delete
return false;
[1455] Fix | Delete
}
[1456] Fix | Delete
[1457] Fix | Delete
/**
[1458] Fix | Delete
* Determines whether the current request is a WordPress Ajax request.
[1459] Fix | Delete
*
[1460] Fix | Delete
* @since 4.7.0
[1461] Fix | Delete
*
[1462] Fix | Delete
* @return bool True if it's a WordPress Ajax request, false otherwise.
[1463] Fix | Delete
*/
[1464] Fix | Delete
function wp_doing_ajax() {
[1465] Fix | Delete
/**
[1466] Fix | Delete
* Filters whether the current request is a WordPress Ajax request.
[1467] Fix | Delete
*
[1468] Fix | Delete
* @since 4.7.0
[1469] Fix | Delete
*
[1470] Fix | Delete
* @param bool $wp_doing_ajax Whether the current request is a WordPress Ajax request.
[1471] Fix | Delete
*/
[1472] Fix | Delete
return apply_filters( 'wp_doing_ajax', defined( 'DOING_AJAX' ) && DOING_AJAX );
[1473] Fix | Delete
}
[1474] Fix | Delete
[1475] Fix | Delete
/**
[1476] Fix | Delete
* Determines whether the current request should use themes.
[1477] Fix | Delete
*
[1478] Fix | Delete
* @since 5.1.0
[1479] Fix | Delete
*
[1480] Fix | Delete
* @return bool True if themes should be used, false otherwise.
[1481] Fix | Delete
*/
[1482] Fix | Delete
function wp_using_themes() {
[1483] Fix | Delete
/**
[1484] Fix | Delete
* Filters whether the current request should use themes.
[1485] Fix | Delete
*
[1486] Fix | Delete
* @since 5.1.0
[1487] Fix | Delete
*
[1488] Fix | Delete
* @param bool $wp_using_themes Whether the current request should use themes.
[1489] Fix | Delete
*/
[1490] Fix | Delete
return apply_filters( 'wp_using_themes', defined( 'WP_USE_THEMES' ) && WP_USE_THEMES );
[1491] Fix | Delete
}
[1492] Fix | Delete
[1493] Fix | Delete
/**
[1494] Fix | Delete
* Determines whether the current request is a WordPress cron request.
[1495] Fix | Delete
*
[1496] Fix | Delete
* @since 4.8.0
[1497] Fix | Delete
*
[1498] Fix | Delete
* @return bool True if it's a WordPress cron request, false otherwise.
[1499] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function