Edit File by line
/home/zeestwma/ceyloniy.../wp-inclu...
File: load.php
*
[500] Fix | Delete
* @return bool Always returns true.
[501] Fix | Delete
*/
[502] Fix | Delete
function timer_start() {
[503] Fix | Delete
global $timestart;
[504] Fix | Delete
[505] Fix | Delete
$timestart = microtime( true );
[506] Fix | Delete
[507] Fix | Delete
return true;
[508] Fix | Delete
}
[509] Fix | Delete
[510] Fix | Delete
/**
[511] Fix | Delete
* Retrieves or displays the time from the page start to when function is called.
[512] Fix | Delete
*
[513] Fix | Delete
* @since 0.71
[514] Fix | Delete
*
[515] Fix | Delete
* @global float $timestart Seconds from when timer_start() is called.
[516] Fix | Delete
* @global float $timeend Seconds from when function is called.
[517] Fix | Delete
*
[518] Fix | Delete
* @param int|bool $display Whether to echo or return the results. Accepts 0|false for return,
[519] Fix | Delete
* 1|true for echo. Default 0|false.
[520] Fix | Delete
* @param int $precision The number of digits from the right of the decimal to display.
[521] Fix | Delete
* Default 3.
[522] Fix | Delete
* @return string The "second.microsecond" finished time calculation. The number is formatted
[523] Fix | Delete
* for human consumption, both localized and rounded.
[524] Fix | Delete
*/
[525] Fix | Delete
function timer_stop( $display = 0, $precision = 3 ) {
[526] Fix | Delete
global $timestart, $timeend;
[527] Fix | Delete
[528] Fix | Delete
$timeend = microtime( true );
[529] Fix | Delete
$timetotal = $timeend - $timestart;
[530] Fix | Delete
[531] Fix | Delete
if ( function_exists( 'number_format_i18n' ) ) {
[532] Fix | Delete
$r = number_format_i18n( $timetotal, $precision );
[533] Fix | Delete
} else {
[534] Fix | Delete
$r = number_format( $timetotal, $precision );
[535] Fix | Delete
}
[536] Fix | Delete
[537] Fix | Delete
if ( $display ) {
[538] Fix | Delete
echo $r;
[539] Fix | Delete
}
[540] Fix | Delete
[541] Fix | Delete
return $r;
[542] Fix | Delete
}
[543] Fix | Delete
[544] Fix | Delete
/**
[545] Fix | Delete
* Sets PHP error reporting based on WordPress debug settings.
[546] Fix | Delete
*
[547] Fix | Delete
* Uses three constants: `WP_DEBUG`, `WP_DEBUG_DISPLAY`, and `WP_DEBUG_LOG`.
[548] Fix | Delete
* All three can be defined in wp-config.php. By default, `WP_DEBUG` and
[549] Fix | Delete
* `WP_DEBUG_LOG` are set to false, and `WP_DEBUG_DISPLAY` is set to true.
[550] Fix | Delete
*
[551] Fix | Delete
* When `WP_DEBUG` is true, all PHP notices are reported. WordPress will also
[552] Fix | Delete
* display internal notices: when a deprecated WordPress function, function
[553] Fix | Delete
* argument, or file is used. Deprecated code may be removed from a later
[554] Fix | Delete
* version.
[555] Fix | Delete
*
[556] Fix | Delete
* It is strongly recommended that plugin and theme developers use `WP_DEBUG`
[557] Fix | Delete
* in their development environments.
[558] Fix | Delete
*
[559] Fix | Delete
* `WP_DEBUG_DISPLAY` and `WP_DEBUG_LOG` perform no function unless `WP_DEBUG`
[560] Fix | Delete
* is true.
[561] Fix | Delete
*
[562] Fix | Delete
* When `WP_DEBUG_DISPLAY` is true, WordPress will force errors to be displayed.
[563] Fix | Delete
* `WP_DEBUG_DISPLAY` defaults to true. Defining it as null prevents WordPress
[564] Fix | Delete
* from changing the global configuration setting. Defining `WP_DEBUG_DISPLAY`
[565] Fix | Delete
* as false will force errors to be hidden.
[566] Fix | Delete
*
[567] Fix | Delete
* When `WP_DEBUG_LOG` is true, errors will be logged to `wp-content/debug.log`.
[568] Fix | Delete
* When `WP_DEBUG_LOG` is a valid path, errors will be logged to the specified file.
[569] Fix | Delete
*
[570] Fix | Delete
* Errors are never displayed for XML-RPC, REST, `ms-files.php`, and Ajax requests.
[571] Fix | Delete
*
[572] Fix | Delete
* @since 3.0.0
[573] Fix | Delete
* @since 5.1.0 `WP_DEBUG_LOG` can be a file path.
[574] Fix | Delete
* @access private
[575] Fix | Delete
*/
[576] Fix | Delete
function wp_debug_mode() {
[577] Fix | Delete
/**
[578] Fix | Delete
* Filters whether to allow the debug mode check to occur.
[579] Fix | Delete
*
[580] Fix | Delete
* This filter runs before it can be used by plugins. It is designed for
[581] Fix | Delete
* non-web runtimes. Returning false causes the `WP_DEBUG` and related
[582] Fix | Delete
* constants to not be checked and the default PHP values for errors
[583] Fix | Delete
* will be used unless you take care to update them yourself.
[584] Fix | Delete
*
[585] Fix | Delete
* To use this filter you must define a `$wp_filter` global before
[586] Fix | Delete
* WordPress loads, usually in `wp-config.php`.
[587] Fix | Delete
*
[588] Fix | Delete
* Example:
[589] Fix | Delete
*
[590] Fix | Delete
* $GLOBALS['wp_filter'] = array(
[591] Fix | Delete
* 'enable_wp_debug_mode_checks' => array(
[592] Fix | Delete
* 10 => array(
[593] Fix | Delete
* array(
[594] Fix | Delete
* 'accepted_args' => 0,
[595] Fix | Delete
* 'function' => function() {
[596] Fix | Delete
* return false;
[597] Fix | Delete
* },
[598] Fix | Delete
* ),
[599] Fix | Delete
* ),
[600] Fix | Delete
* ),
[601] Fix | Delete
* );
[602] Fix | Delete
*
[603] Fix | Delete
* @since 4.6.0
[604] Fix | Delete
*
[605] Fix | Delete
* @param bool $enable_debug_mode Whether to enable debug mode checks to occur. Default true.
[606] Fix | Delete
*/
[607] Fix | Delete
if ( ! apply_filters( 'enable_wp_debug_mode_checks', true ) ) {
[608] Fix | Delete
return;
[609] Fix | Delete
}
[610] Fix | Delete
[611] Fix | Delete
if ( WP_DEBUG ) {
[612] Fix | Delete
error_reporting( E_ALL );
[613] Fix | Delete
[614] Fix | Delete
if ( WP_DEBUG_DISPLAY ) {
[615] Fix | Delete
ini_set( 'display_errors', 1 );
[616] Fix | Delete
} elseif ( null !== WP_DEBUG_DISPLAY ) {
[617] Fix | Delete
ini_set( 'display_errors', 0 );
[618] Fix | Delete
}
[619] Fix | Delete
[620] Fix | Delete
if ( in_array( strtolower( (string) WP_DEBUG_LOG ), array( 'true', '1' ), true ) ) {
[621] Fix | Delete
$log_path = WP_CONTENT_DIR . '/debug.log';
[622] Fix | Delete
} elseif ( is_string( WP_DEBUG_LOG ) ) {
[623] Fix | Delete
$log_path = WP_DEBUG_LOG;
[624] Fix | Delete
} else {
[625] Fix | Delete
$log_path = false;
[626] Fix | Delete
}
[627] Fix | Delete
[628] Fix | Delete
if ( $log_path ) {
[629] Fix | Delete
ini_set( 'log_errors', 1 );
[630] Fix | Delete
ini_set( 'error_log', $log_path );
[631] Fix | Delete
}
[632] Fix | Delete
} else {
[633] Fix | Delete
error_reporting( E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_ERROR | E_WARNING | E_PARSE | E_USER_ERROR | E_USER_WARNING | E_RECOVERABLE_ERROR );
[634] Fix | Delete
}
[635] Fix | Delete
[636] Fix | Delete
/*
[637] Fix | Delete
* The 'REST_REQUEST' check here is optimistic as the constant is most
[638] Fix | Delete
* likely not set at this point even if it is in fact a REST request.
[639] Fix | Delete
*/
[640] Fix | Delete
if ( defined( 'XMLRPC_REQUEST' ) || defined( 'REST_REQUEST' ) || defined( 'MS_FILES_REQUEST' )
[641] Fix | Delete
|| ( defined( 'WP_INSTALLING' ) && WP_INSTALLING )
[642] Fix | Delete
|| wp_doing_ajax() || wp_is_json_request()
[643] Fix | Delete
) {
[644] Fix | Delete
ini_set( 'display_errors', 0 );
[645] Fix | Delete
}
[646] Fix | Delete
}
[647] Fix | Delete
[648] Fix | Delete
/**
[649] Fix | Delete
* Sets the location of the language directory.
[650] Fix | Delete
*
[651] Fix | Delete
* To set directory manually, define the `WP_LANG_DIR` constant
[652] Fix | Delete
* in wp-config.php.
[653] Fix | Delete
*
[654] Fix | Delete
* If the language directory exists within `WP_CONTENT_DIR`, it
[655] Fix | Delete
* is used. Otherwise the language directory is assumed to live
[656] Fix | Delete
* in `WPINC`.
[657] Fix | Delete
*
[658] Fix | Delete
* @since 3.0.0
[659] Fix | Delete
* @access private
[660] Fix | Delete
*/
[661] Fix | Delete
function wp_set_lang_dir() {
[662] Fix | Delete
if ( ! defined( 'WP_LANG_DIR' ) ) {
[663] Fix | Delete
if ( file_exists( WP_CONTENT_DIR . '/languages' ) && @is_dir( WP_CONTENT_DIR . '/languages' )
[664] Fix | Delete
|| ! @is_dir( ABSPATH . WPINC . '/languages' )
[665] Fix | Delete
) {
[666] Fix | Delete
/**
[667] Fix | Delete
* Server path of the language directory.
[668] Fix | Delete
*
[669] Fix | Delete
* No leading slash, no trailing slash, full path, not relative to ABSPATH
[670] Fix | Delete
*
[671] Fix | Delete
* @since 2.1.0
[672] Fix | Delete
*/
[673] Fix | Delete
define( 'WP_LANG_DIR', WP_CONTENT_DIR . '/languages' );
[674] Fix | Delete
[675] Fix | Delete
if ( ! defined( 'LANGDIR' ) ) {
[676] Fix | Delete
// Old static relative path maintained for limited backward compatibility - won't work in some cases.
[677] Fix | Delete
define( 'LANGDIR', 'wp-content/languages' );
[678] Fix | Delete
}
[679] Fix | Delete
} else {
[680] Fix | Delete
/**
[681] Fix | Delete
* Server path of the language directory.
[682] Fix | Delete
*
[683] Fix | Delete
* No leading slash, no trailing slash, full path, not relative to `ABSPATH`.
[684] Fix | Delete
*
[685] Fix | Delete
* @since 2.1.0
[686] Fix | Delete
*/
[687] Fix | Delete
define( 'WP_LANG_DIR', ABSPATH . WPINC . '/languages' );
[688] Fix | Delete
[689] Fix | Delete
if ( ! defined( 'LANGDIR' ) ) {
[690] Fix | Delete
// Old relative path maintained for backward compatibility.
[691] Fix | Delete
define( 'LANGDIR', WPINC . '/languages' );
[692] Fix | Delete
}
[693] Fix | Delete
}
[694] Fix | Delete
}
[695] Fix | Delete
}
[696] Fix | Delete
[697] Fix | Delete
/**
[698] Fix | Delete
* Loads the database class file and instantiates the `$wpdb` global.
[699] Fix | Delete
*
[700] Fix | Delete
* @since 2.5.0
[701] Fix | Delete
*
[702] Fix | Delete
* @global wpdb $wpdb WordPress database abstraction object.
[703] Fix | Delete
*/
[704] Fix | Delete
function require_wp_db() {
[705] Fix | Delete
global $wpdb;
[706] Fix | Delete
[707] Fix | Delete
require_once ABSPATH . WPINC . '/class-wpdb.php';
[708] Fix | Delete
[709] Fix | Delete
if ( file_exists( WP_CONTENT_DIR . '/db.php' ) ) {
[710] Fix | Delete
require_once WP_CONTENT_DIR . '/db.php';
[711] Fix | Delete
}
[712] Fix | Delete
[713] Fix | Delete
if ( isset( $wpdb ) ) {
[714] Fix | Delete
return;
[715] Fix | Delete
}
[716] Fix | Delete
[717] Fix | Delete
$dbuser = defined( 'DB_USER' ) ? DB_USER : '';
[718] Fix | Delete
$dbpassword = defined( 'DB_PASSWORD' ) ? DB_PASSWORD : '';
[719] Fix | Delete
$dbname = defined( 'DB_NAME' ) ? DB_NAME : '';
[720] Fix | Delete
$dbhost = defined( 'DB_HOST' ) ? DB_HOST : '';
[721] Fix | Delete
[722] Fix | Delete
$wpdb = new wpdb( $dbuser, $dbpassword, $dbname, $dbhost );
[723] Fix | Delete
}
[724] Fix | Delete
[725] Fix | Delete
/**
[726] Fix | Delete
* Sets the database table prefix and the format specifiers for database
[727] Fix | Delete
* table columns.
[728] Fix | Delete
*
[729] Fix | Delete
* Columns not listed here default to `%s`.
[730] Fix | Delete
*
[731] Fix | Delete
* @since 3.0.0
[732] Fix | Delete
* @access private
[733] Fix | Delete
*
[734] Fix | Delete
* @global wpdb $wpdb WordPress database abstraction object.
[735] Fix | Delete
* @global string $table_prefix The database table prefix.
[736] Fix | Delete
*/
[737] Fix | Delete
function wp_set_wpdb_vars() {
[738] Fix | Delete
global $wpdb, $table_prefix;
[739] Fix | Delete
[740] Fix | Delete
if ( ! empty( $wpdb->error ) ) {
[741] Fix | Delete
dead_db();
[742] Fix | Delete
}
[743] Fix | Delete
[744] Fix | Delete
$wpdb->field_types = array(
[745] Fix | Delete
'post_author' => '%d',
[746] Fix | Delete
'post_parent' => '%d',
[747] Fix | Delete
'menu_order' => '%d',
[748] Fix | Delete
'term_id' => '%d',
[749] Fix | Delete
'term_group' => '%d',
[750] Fix | Delete
'term_taxonomy_id' => '%d',
[751] Fix | Delete
'parent' => '%d',
[752] Fix | Delete
'count' => '%d',
[753] Fix | Delete
'object_id' => '%d',
[754] Fix | Delete
'term_order' => '%d',
[755] Fix | Delete
'ID' => '%d',
[756] Fix | Delete
'comment_ID' => '%d',
[757] Fix | Delete
'comment_post_ID' => '%d',
[758] Fix | Delete
'comment_parent' => '%d',
[759] Fix | Delete
'user_id' => '%d',
[760] Fix | Delete
'link_id' => '%d',
[761] Fix | Delete
'link_owner' => '%d',
[762] Fix | Delete
'link_rating' => '%d',
[763] Fix | Delete
'option_id' => '%d',
[764] Fix | Delete
'blog_id' => '%d',
[765] Fix | Delete
'meta_id' => '%d',
[766] Fix | Delete
'post_id' => '%d',
[767] Fix | Delete
'user_status' => '%d',
[768] Fix | Delete
'umeta_id' => '%d',
[769] Fix | Delete
'comment_karma' => '%d',
[770] Fix | Delete
'comment_count' => '%d',
[771] Fix | Delete
// Multisite:
[772] Fix | Delete
'active' => '%d',
[773] Fix | Delete
'cat_id' => '%d',
[774] Fix | Delete
'deleted' => '%d',
[775] Fix | Delete
'lang_id' => '%d',
[776] Fix | Delete
'mature' => '%d',
[777] Fix | Delete
'public' => '%d',
[778] Fix | Delete
'site_id' => '%d',
[779] Fix | Delete
'spam' => '%d',
[780] Fix | Delete
);
[781] Fix | Delete
[782] Fix | Delete
$prefix = $wpdb->set_prefix( $table_prefix );
[783] Fix | Delete
[784] Fix | Delete
if ( is_wp_error( $prefix ) ) {
[785] Fix | Delete
wp_load_translations_early();
[786] Fix | Delete
wp_die(
[787] Fix | Delete
sprintf(
[788] Fix | Delete
/* translators: 1: $table_prefix, 2: wp-config.php */
[789] Fix | Delete
__( '<strong>Error:</strong> %1$s in %2$s can only contain numbers, letters, and underscores.' ),
[790] Fix | Delete
'<code>$table_prefix</code>',
[791] Fix | Delete
'<code>wp-config.php</code>'
[792] Fix | Delete
)
[793] Fix | Delete
);
[794] Fix | Delete
}
[795] Fix | Delete
}
[796] Fix | Delete
[797] Fix | Delete
/**
[798] Fix | Delete
* Toggles `$_wp_using_ext_object_cache` on and off without directly
[799] Fix | Delete
* touching global.
[800] Fix | Delete
*
[801] Fix | Delete
* @since 3.7.0
[802] Fix | Delete
*
[803] Fix | Delete
* @global bool $_wp_using_ext_object_cache
[804] Fix | Delete
*
[805] Fix | Delete
* @param bool $using Whether external object cache is being used.
[806] Fix | Delete
* @return bool The current 'using' setting.
[807] Fix | Delete
*/
[808] Fix | Delete
function wp_using_ext_object_cache( $using = null ) {
[809] Fix | Delete
global $_wp_using_ext_object_cache;
[810] Fix | Delete
[811] Fix | Delete
$current_using = $_wp_using_ext_object_cache;
[812] Fix | Delete
[813] Fix | Delete
if ( null !== $using ) {
[814] Fix | Delete
$_wp_using_ext_object_cache = $using;
[815] Fix | Delete
}
[816] Fix | Delete
[817] Fix | Delete
return $current_using;
[818] Fix | Delete
}
[819] Fix | Delete
[820] Fix | Delete
/**
[821] Fix | Delete
* Starts the WordPress object cache.
[822] Fix | Delete
*
[823] Fix | Delete
* If an object-cache.php file exists in the wp-content directory,
[824] Fix | Delete
* it uses that drop-in as an external object cache.
[825] Fix | Delete
*
[826] Fix | Delete
* @since 3.0.0
[827] Fix | Delete
* @access private
[828] Fix | Delete
*
[829] Fix | Delete
* @global array $wp_filter Stores all of the filters.
[830] Fix | Delete
*/
[831] Fix | Delete
function wp_start_object_cache() {
[832] Fix | Delete
global $wp_filter;
[833] Fix | Delete
static $first_init = true;
[834] Fix | Delete
[835] Fix | Delete
// Only perform the following checks once.
[836] Fix | Delete
[837] Fix | Delete
/**
[838] Fix | Delete
* Filters whether to enable loading of the object-cache.php drop-in.
[839] Fix | Delete
*
[840] Fix | Delete
* This filter runs before it can be used by plugins. It is designed for non-web
[841] Fix | Delete
* runtimes. If false is returned, object-cache.php will never be loaded.
[842] Fix | Delete
*
[843] Fix | Delete
* @since 5.8.0
[844] Fix | Delete
*
[845] Fix | Delete
* @param bool $enable_object_cache Whether to enable loading object-cache.php (if present).
[846] Fix | Delete
* Default true.
[847] Fix | Delete
*/
[848] Fix | Delete
if ( $first_init && apply_filters( 'enable_loading_object_cache_dropin', true ) ) {
[849] Fix | Delete
if ( ! function_exists( 'wp_cache_init' ) ) {
[850] Fix | Delete
/*
[851] Fix | Delete
* This is the normal situation. First-run of this function. No
[852] Fix | Delete
* caching backend has been loaded.
[853] Fix | Delete
*
[854] Fix | Delete
* We try to load a custom caching backend, and then, if it
[855] Fix | Delete
* results in a wp_cache_init() function existing, we note
[856] Fix | Delete
* that an external object cache is being used.
[857] Fix | Delete
*/
[858] Fix | Delete
if ( file_exists( WP_CONTENT_DIR . '/object-cache.php' ) ) {
[859] Fix | Delete
require_once WP_CONTENT_DIR . '/object-cache.php';
[860] Fix | Delete
[861] Fix | Delete
if ( function_exists( 'wp_cache_init' ) ) {
[862] Fix | Delete
wp_using_ext_object_cache( true );
[863] Fix | Delete
}
[864] Fix | Delete
[865] Fix | Delete
// Re-initialize any hooks added manually by object-cache.php.
[866] Fix | Delete
if ( $wp_filter ) {
[867] Fix | Delete
$wp_filter = WP_Hook::build_preinitialized_hooks( $wp_filter );
[868] Fix | Delete
}
[869] Fix | Delete
}
[870] Fix | Delete
} elseif ( ! wp_using_ext_object_cache() && file_exists( WP_CONTENT_DIR . '/object-cache.php' ) ) {
[871] Fix | Delete
/*
[872] Fix | Delete
* Sometimes advanced-cache.php can load object-cache.php before
[873] Fix | Delete
* this function is run. This breaks the function_exists() check
[874] Fix | Delete
* above and can result in wp_using_ext_object_cache() returning
[875] Fix | Delete
* false when actually an external cache is in use.
[876] Fix | Delete
*/
[877] Fix | Delete
wp_using_ext_object_cache( true );
[878] Fix | Delete
}
[879] Fix | Delete
}
[880] Fix | Delete
[881] Fix | Delete
if ( ! wp_using_ext_object_cache() ) {
[882] Fix | Delete
require_once ABSPATH . WPINC . '/cache.php';
[883] Fix | Delete
}
[884] Fix | Delete
[885] Fix | Delete
require_once ABSPATH . WPINC . '/cache-compat.php';
[886] Fix | Delete
[887] Fix | Delete
/*
[888] Fix | Delete
* If cache supports reset, reset instead of init if already
[889] Fix | Delete
* initialized. Reset signals to the cache that global IDs
[890] Fix | Delete
* have changed and it may need to update keys and cleanup caches.
[891] Fix | Delete
*/
[892] Fix | Delete
if ( ! $first_init && function_exists( 'wp_cache_switch_to_blog' ) ) {
[893] Fix | Delete
wp_cache_switch_to_blog( get_current_blog_id() );
[894] Fix | Delete
} elseif ( function_exists( 'wp_cache_init' ) ) {
[895] Fix | Delete
wp_cache_init();
[896] Fix | Delete
}
[897] Fix | Delete
[898] Fix | Delete
if ( function_exists( 'wp_cache_add_global_groups' ) ) {
[899] Fix | Delete
wp_cache_add_global_groups(
[900] Fix | Delete
array(
[901] Fix | Delete
'blog-details',
[902] Fix | Delete
'blog-id-cache',
[903] Fix | Delete
'blog-lookup',
[904] Fix | Delete
'blog_meta',
[905] Fix | Delete
'global-posts',
[906] Fix | Delete
'image_editor',
[907] Fix | Delete
'networks',
[908] Fix | Delete
'network-queries',
[909] Fix | Delete
'sites',
[910] Fix | Delete
'site-details',
[911] Fix | Delete
'site-options',
[912] Fix | Delete
'site-queries',
[913] Fix | Delete
'site-transient',
[914] Fix | Delete
'theme_files',
[915] Fix | Delete
'translation_files',
[916] Fix | Delete
'rss',
[917] Fix | Delete
'users',
[918] Fix | Delete
'user-queries',
[919] Fix | Delete
'user_meta',
[920] Fix | Delete
'useremail',
[921] Fix | Delete
'userlogins',
[922] Fix | Delete
'userslugs',
[923] Fix | Delete
)
[924] Fix | Delete
);
[925] Fix | Delete
[926] Fix | Delete
wp_cache_add_non_persistent_groups( array( 'counts', 'plugins', 'theme_json' ) );
[927] Fix | Delete
}
[928] Fix | Delete
[929] Fix | Delete
$first_init = false;
[930] Fix | Delete
}
[931] Fix | Delete
[932] Fix | Delete
/**
[933] Fix | Delete
* Redirects to the installer if WordPress is not installed.
[934] Fix | Delete
*
[935] Fix | Delete
* Dies with an error message when Multisite is enabled.
[936] Fix | Delete
*
[937] Fix | Delete
* @since 3.0.0
[938] Fix | Delete
* @access private
[939] Fix | Delete
*/
[940] Fix | Delete
function wp_not_installed() {
[941] Fix | Delete
if ( is_blog_installed() || wp_installing() ) {
[942] Fix | Delete
return;
[943] Fix | Delete
}
[944] Fix | Delete
[945] Fix | Delete
nocache_headers();
[946] Fix | Delete
[947] Fix | Delete
if ( is_multisite() ) {
[948] Fix | Delete
wp_die( __( 'The site you have requested is not installed properly. Please contact the system administrator.' ) );
[949] Fix | Delete
}
[950] Fix | Delete
[951] Fix | Delete
require ABSPATH . WPINC . '/kses.php';
[952] Fix | Delete
require ABSPATH . WPINC . '/pluggable.php';
[953] Fix | Delete
[954] Fix | Delete
$link = wp_guess_url() . '/wp-admin/install.php';
[955] Fix | Delete
[956] Fix | Delete
wp_redirect( $link );
[957] Fix | Delete
die();
[958] Fix | Delete
}
[959] Fix | Delete
[960] Fix | Delete
/**
[961] Fix | Delete
* Retrieves an array of must-use plugin files.
[962] Fix | Delete
*
[963] Fix | Delete
* The default directory is wp-content/mu-plugins. To change the default
[964] Fix | Delete
* directory manually, define `WPMU_PLUGIN_DIR` and `WPMU_PLUGIN_URL`
[965] Fix | Delete
* in wp-config.php.
[966] Fix | Delete
*
[967] Fix | Delete
* @since 3.0.0
[968] Fix | Delete
* @access private
[969] Fix | Delete
*
[970] Fix | Delete
* @return string[] Array of absolute paths of files to include.
[971] Fix | Delete
*/
[972] Fix | Delete
function wp_get_mu_plugins() {
[973] Fix | Delete
$mu_plugins = array();
[974] Fix | Delete
[975] Fix | Delete
if ( ! is_dir( WPMU_PLUGIN_DIR ) ) {
[976] Fix | Delete
return $mu_plugins;
[977] Fix | Delete
}
[978] Fix | Delete
[979] Fix | Delete
$dh = opendir( WPMU_PLUGIN_DIR );
[980] Fix | Delete
if ( ! $dh ) {
[981] Fix | Delete
return $mu_plugins;
[982] Fix | Delete
}
[983] Fix | Delete
[984] Fix | Delete
while ( ( $plugin = readdir( $dh ) ) !== false ) {
[985] Fix | Delete
if ( str_ends_with( $plugin, '.php' ) ) {
[986] Fix | Delete
$mu_plugins[] = WPMU_PLUGIN_DIR . '/' . $plugin;
[987] Fix | Delete
}
[988] Fix | Delete
}
[989] Fix | Delete
[990] Fix | Delete
closedir( $dh );
[991] Fix | Delete
[992] Fix | Delete
sort( $mu_plugins );
[993] Fix | Delete
[994] Fix | Delete
return $mu_plugins;
[995] Fix | Delete
}
[996] Fix | Delete
[997] Fix | Delete
/**
[998] Fix | Delete
* Retrieves an array of active and valid plugin files.
[999] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function