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
/home/sportsfe.../httpdocs/wp-conte.../plugins/wordpres.../inc/options
File: class-wpseo-options.php
<?php
[0] Fix | Delete
/**
[1] Fix | Delete
* WPSEO plugin file.
[2] Fix | Delete
*
[3] Fix | Delete
* @package WPSEO\Internals\Options
[4] Fix | Delete
*/
[5] Fix | Delete
[6] Fix | Delete
/**
[7] Fix | Delete
* Overall Option Management class.
[8] Fix | Delete
*
[9] Fix | Delete
* Instantiates all the options and offers a number of utility methods to work with the options.
[10] Fix | Delete
*/
[11] Fix | Delete
class WPSEO_Options {
[12] Fix | Delete
[13] Fix | Delete
/**
[14] Fix | Delete
* The option values.
[15] Fix | Delete
*
[16] Fix | Delete
* @var array|null
[17] Fix | Delete
*/
[18] Fix | Delete
protected static $option_values = null;
[19] Fix | Delete
[20] Fix | Delete
/**
[21] Fix | Delete
* Options this class uses.
[22] Fix | Delete
*
[23] Fix | Delete
* @var array Array format: (string) option_name => (string) name of concrete class for the option.
[24] Fix | Delete
*/
[25] Fix | Delete
public static $options = [
[26] Fix | Delete
'wpseo' => 'WPSEO_Option_Wpseo',
[27] Fix | Delete
'wpseo_titles' => 'WPSEO_Option_Titles',
[28] Fix | Delete
'wpseo_social' => 'WPSEO_Option_Social',
[29] Fix | Delete
'wpseo_ms' => 'WPSEO_Option_MS',
[30] Fix | Delete
'wpseo_taxonomy_meta' => 'WPSEO_Taxonomy_Meta',
[31] Fix | Delete
];
[32] Fix | Delete
[33] Fix | Delete
/**
[34] Fix | Delete
* Array of instantiated option objects.
[35] Fix | Delete
*
[36] Fix | Delete
* @var array
[37] Fix | Delete
*/
[38] Fix | Delete
protected static $option_instances = [];
[39] Fix | Delete
[40] Fix | Delete
/**
[41] Fix | Delete
* Array with the option names.
[42] Fix | Delete
*
[43] Fix | Delete
* @var array
[44] Fix | Delete
*/
[45] Fix | Delete
protected static $option_names = [];
[46] Fix | Delete
[47] Fix | Delete
/**
[48] Fix | Delete
* Instance of this class.
[49] Fix | Delete
*
[50] Fix | Delete
* @var WPSEO_Options
[51] Fix | Delete
*/
[52] Fix | Delete
protected static $instance;
[53] Fix | Delete
[54] Fix | Delete
/**
[55] Fix | Delete
* Instantiate all the WPSEO option management classes.
[56] Fix | Delete
*/
[57] Fix | Delete
protected function __construct() {
[58] Fix | Delete
$this->register_hooks();
[59] Fix | Delete
[60] Fix | Delete
foreach ( static::$options as $option_class ) {
[61] Fix | Delete
static::register_option( call_user_func( [ $option_class, 'get_instance' ] ) );
[62] Fix | Delete
}
[63] Fix | Delete
}
[64] Fix | Delete
[65] Fix | Delete
/**
[66] Fix | Delete
* Register our hooks.
[67] Fix | Delete
*
[68] Fix | Delete
* @return void
[69] Fix | Delete
*/
[70] Fix | Delete
public function register_hooks() {
[71] Fix | Delete
add_action( 'registered_taxonomy', [ $this, 'clear_cache' ] );
[72] Fix | Delete
add_action( 'unregistered_taxonomy', [ $this, 'clear_cache' ] );
[73] Fix | Delete
add_action( 'registered_post_type', [ $this, 'clear_cache' ] );
[74] Fix | Delete
add_action( 'unregistered_post_type', [ $this, 'clear_cache' ] );
[75] Fix | Delete
}
[76] Fix | Delete
[77] Fix | Delete
/**
[78] Fix | Delete
* Get the singleton instance of this class.
[79] Fix | Delete
*
[80] Fix | Delete
* @return object
[81] Fix | Delete
*/
[82] Fix | Delete
public static function get_instance() {
[83] Fix | Delete
if ( ! ( static::$instance instanceof self ) ) {
[84] Fix | Delete
static::$instance = new self();
[85] Fix | Delete
}
[86] Fix | Delete
[87] Fix | Delete
return static::$instance;
[88] Fix | Delete
}
[89] Fix | Delete
[90] Fix | Delete
/**
[91] Fix | Delete
* Registers an option to the options list.
[92] Fix | Delete
*
[93] Fix | Delete
* @param WPSEO_Option $option_instance Instance of the option.
[94] Fix | Delete
*
[95] Fix | Delete
* @return void
[96] Fix | Delete
*/
[97] Fix | Delete
public static function register_option( WPSEO_Option $option_instance ) {
[98] Fix | Delete
$option_name = $option_instance->get_option_name();
[99] Fix | Delete
[100] Fix | Delete
if ( $option_instance->multisite_only && ! static::is_multisite() ) {
[101] Fix | Delete
unset( static::$options[ $option_name ], static::$option_names[ $option_name ] );
[102] Fix | Delete
[103] Fix | Delete
return;
[104] Fix | Delete
}
[105] Fix | Delete
[106] Fix | Delete
$is_already_registered = array_key_exists( $option_name, static::$options );
[107] Fix | Delete
if ( ! $is_already_registered ) {
[108] Fix | Delete
static::$options[ $option_name ] = get_class( $option_instance );
[109] Fix | Delete
}
[110] Fix | Delete
[111] Fix | Delete
if ( $option_instance->include_in_all === true ) {
[112] Fix | Delete
static::$option_names[ $option_name ] = $option_name;
[113] Fix | Delete
}
[114] Fix | Delete
[115] Fix | Delete
static::$option_instances[ $option_name ] = $option_instance;
[116] Fix | Delete
[117] Fix | Delete
if ( ! $is_already_registered ) {
[118] Fix | Delete
static::clear_cache();
[119] Fix | Delete
}
[120] Fix | Delete
}
[121] Fix | Delete
[122] Fix | Delete
/**
[123] Fix | Delete
* Get the group name of an option for use in the settings form.
[124] Fix | Delete
*
[125] Fix | Delete
* @param string $option_name The option for which you want to retrieve the option group name.
[126] Fix | Delete
*
[127] Fix | Delete
* @return string|bool
[128] Fix | Delete
*/
[129] Fix | Delete
public static function get_group_name( $option_name ) {
[130] Fix | Delete
if ( isset( static::$option_instances[ $option_name ] ) ) {
[131] Fix | Delete
return static::$option_instances[ $option_name ]->group_name;
[132] Fix | Delete
}
[133] Fix | Delete
[134] Fix | Delete
return false;
[135] Fix | Delete
}
[136] Fix | Delete
[137] Fix | Delete
/**
[138] Fix | Delete
* Get a specific default value for an option.
[139] Fix | Delete
*
[140] Fix | Delete
* @param string $option_name The option for which you want to retrieve a default.
[141] Fix | Delete
* @param string $key The key within the option who's default you want.
[142] Fix | Delete
*
[143] Fix | Delete
* @return mixed
[144] Fix | Delete
*/
[145] Fix | Delete
public static function get_default( $option_name, $key ) {
[146] Fix | Delete
if ( isset( static::$option_instances[ $option_name ] ) ) {
[147] Fix | Delete
$defaults = static::$option_instances[ $option_name ]->get_defaults();
[148] Fix | Delete
if ( isset( $defaults[ $key ] ) ) {
[149] Fix | Delete
return $defaults[ $key ];
[150] Fix | Delete
}
[151] Fix | Delete
}
[152] Fix | Delete
[153] Fix | Delete
return null;
[154] Fix | Delete
}
[155] Fix | Delete
[156] Fix | Delete
/**
[157] Fix | Delete
* Update a site_option.
[158] Fix | Delete
*
[159] Fix | Delete
* @param string $option_name The option name of the option to save.
[160] Fix | Delete
* @param mixed $value The new value for the option.
[161] Fix | Delete
*
[162] Fix | Delete
* @return bool
[163] Fix | Delete
*/
[164] Fix | Delete
public static function update_site_option( $option_name, $value ) {
[165] Fix | Delete
if ( is_multisite() && isset( static::$option_instances[ $option_name ] ) ) {
[166] Fix | Delete
return static::$option_instances[ $option_name ]->update_site_option( $value );
[167] Fix | Delete
}
[168] Fix | Delete
[169] Fix | Delete
return false;
[170] Fix | Delete
}
[171] Fix | Delete
[172] Fix | Delete
/**
[173] Fix | Delete
* Get the instantiated option instance.
[174] Fix | Delete
*
[175] Fix | Delete
* @param string $option_name The option for which you want to retrieve the instance.
[176] Fix | Delete
*
[177] Fix | Delete
* @return object|bool
[178] Fix | Delete
*/
[179] Fix | Delete
public static function get_option_instance( $option_name ) {
[180] Fix | Delete
if ( isset( static::$option_instances[ $option_name ] ) ) {
[181] Fix | Delete
return static::$option_instances[ $option_name ];
[182] Fix | Delete
}
[183] Fix | Delete
[184] Fix | Delete
return false;
[185] Fix | Delete
}
[186] Fix | Delete
[187] Fix | Delete
/**
[188] Fix | Delete
* Retrieve an array of the options which should be included in get_all() and reset().
[189] Fix | Delete
*
[190] Fix | Delete
* @return array Array of option names.
[191] Fix | Delete
*/
[192] Fix | Delete
public static function get_option_names() {
[193] Fix | Delete
$option_names = array_values( static::$option_names );
[194] Fix | Delete
if ( $option_names === [] ) {
[195] Fix | Delete
foreach ( static::$option_instances as $option_name => $option_object ) {
[196] Fix | Delete
if ( $option_object->include_in_all === true ) {
[197] Fix | Delete
$option_names[] = $option_name;
[198] Fix | Delete
}
[199] Fix | Delete
}
[200] Fix | Delete
}
[201] Fix | Delete
[202] Fix | Delete
/**
[203] Fix | Delete
* Filter: wpseo_options - Allow developers to change the option name to include.
[204] Fix | Delete
*
[205] Fix | Delete
* @param array $option_names The option names to include in get_all and reset().
[206] Fix | Delete
*/
[207] Fix | Delete
return apply_filters( 'wpseo_options', $option_names );
[208] Fix | Delete
}
[209] Fix | Delete
[210] Fix | Delete
/**
[211] Fix | Delete
* Retrieve all the options for the SEO plugin in one go.
[212] Fix | Delete
*
[213] Fix | Delete
* @return array Array combining the values of all the options.
[214] Fix | Delete
*/
[215] Fix | Delete
public static function get_all() {
[216] Fix | Delete
static::$option_values = static::get_options( static::get_option_names() );
[217] Fix | Delete
[218] Fix | Delete
return static::$option_values;
[219] Fix | Delete
}
[220] Fix | Delete
[221] Fix | Delete
/**
[222] Fix | Delete
* Retrieve one or more options for the SEO plugin.
[223] Fix | Delete
*
[224] Fix | Delete
* @param array $option_names An array of option names of the options you want to get.
[225] Fix | Delete
*
[226] Fix | Delete
* @return array Array combining the values of the requested options.
[227] Fix | Delete
*/
[228] Fix | Delete
public static function get_options( array $option_names ) {
[229] Fix | Delete
$options = [];
[230] Fix | Delete
$option_names = array_filter( $option_names, 'is_string' );
[231] Fix | Delete
foreach ( $option_names as $option_name ) {
[232] Fix | Delete
if ( isset( static::$option_instances[ $option_name ] ) ) {
[233] Fix | Delete
$option = static::get_option( $option_name );
[234] Fix | Delete
[235] Fix | Delete
if ( $option !== null ) {
[236] Fix | Delete
$options = array_merge( $options, $option );
[237] Fix | Delete
}
[238] Fix | Delete
}
[239] Fix | Delete
}
[240] Fix | Delete
[241] Fix | Delete
return $options;
[242] Fix | Delete
}
[243] Fix | Delete
[244] Fix | Delete
/**
[245] Fix | Delete
* Retrieve a single option for the SEO plugin.
[246] Fix | Delete
*
[247] Fix | Delete
* @param string $option_name The name of the option you want to get.
[248] Fix | Delete
*
[249] Fix | Delete
* @return array Array containing the requested option.
[250] Fix | Delete
*/
[251] Fix | Delete
public static function get_option( $option_name ) {
[252] Fix | Delete
$option = null;
[253] Fix | Delete
if ( is_string( $option_name ) && ! empty( $option_name ) ) {
[254] Fix | Delete
if ( isset( static::$option_instances[ $option_name ] ) ) {
[255] Fix | Delete
if ( static::$option_instances[ $option_name ]->multisite_only !== true ) {
[256] Fix | Delete
$option = get_option( $option_name );
[257] Fix | Delete
}
[258] Fix | Delete
else {
[259] Fix | Delete
$option = get_site_option( $option_name );
[260] Fix | Delete
}
[261] Fix | Delete
}
[262] Fix | Delete
}
[263] Fix | Delete
[264] Fix | Delete
return $option;
[265] Fix | Delete
}
[266] Fix | Delete
[267] Fix | Delete
/**
[268] Fix | Delete
* Retrieve a single field from any option for the SEO plugin. Keys are always unique.
[269] Fix | Delete
*
[270] Fix | Delete
* @param string $key The key it should return.
[271] Fix | Delete
* @param mixed $default_value The default value that should be returned if the key isn't set.
[272] Fix | Delete
*
[273] Fix | Delete
* @return mixed Returns value if found, $default_value if not.
[274] Fix | Delete
*/
[275] Fix | Delete
public static function get( $key, $default_value = null ) {
[276] Fix | Delete
if ( static::$option_values === null ) {
[277] Fix | Delete
static::prime_cache();
[278] Fix | Delete
}
[279] Fix | Delete
if ( isset( static::$option_values[ $key ] ) ) {
[280] Fix | Delete
return static::$option_values[ $key ];
[281] Fix | Delete
}
[282] Fix | Delete
[283] Fix | Delete
return $default_value;
[284] Fix | Delete
}
[285] Fix | Delete
[286] Fix | Delete
/**
[287] Fix | Delete
* Resets the cache to null.
[288] Fix | Delete
*
[289] Fix | Delete
* @return void
[290] Fix | Delete
*/
[291] Fix | Delete
public static function clear_cache() {
[292] Fix | Delete
static::$option_values = null;
[293] Fix | Delete
}
[294] Fix | Delete
[295] Fix | Delete
/**
[296] Fix | Delete
* Primes our cache.
[297] Fix | Delete
*
[298] Fix | Delete
* @return void
[299] Fix | Delete
*/
[300] Fix | Delete
private static function prime_cache() {
[301] Fix | Delete
static::$option_values = static::get_all();
[302] Fix | Delete
static::$option_values = static::add_ms_option( static::$option_values );
[303] Fix | Delete
}
[304] Fix | Delete
[305] Fix | Delete
/**
[306] Fix | Delete
* Retrieve a single field from an option for the SEO plugin.
[307] Fix | Delete
*
[308] Fix | Delete
* @param string $key The key to set.
[309] Fix | Delete
* @param mixed $value The value to set.
[310] Fix | Delete
*
[311] Fix | Delete
* @return mixed|null Returns value if found, $default if not.
[312] Fix | Delete
*/
[313] Fix | Delete
public static function set( $key, $value ) {
[314] Fix | Delete
$lookup_table = static::get_lookup_table();
[315] Fix | Delete
[316] Fix | Delete
if ( isset( $lookup_table[ $key ] ) ) {
[317] Fix | Delete
return static::save_option( $lookup_table[ $key ], $key, $value );
[318] Fix | Delete
}
[319] Fix | Delete
[320] Fix | Delete
$patterns = static::get_pattern_table();
[321] Fix | Delete
foreach ( $patterns as $pattern => $option ) {
[322] Fix | Delete
if ( strpos( $key, $pattern ) === 0 ) {
[323] Fix | Delete
return static::save_option( $option, $key, $value );
[324] Fix | Delete
}
[325] Fix | Delete
}
[326] Fix | Delete
[327] Fix | Delete
static::$option_values[ $key ] = $value;
[328] Fix | Delete
}
[329] Fix | Delete
[330] Fix | Delete
/**
[331] Fix | Delete
* Get an option only if it's been auto-loaded.
[332] Fix | Delete
*
[333] Fix | Delete
* @param string $option The option to retrieve.
[334] Fix | Delete
* @param mixed $default_value A default value to return.
[335] Fix | Delete
*
[336] Fix | Delete
* @return mixed
[337] Fix | Delete
*/
[338] Fix | Delete
public static function get_autoloaded_option( $option, $default_value = false ) {
[339] Fix | Delete
$value = wp_cache_get( $option, 'options' );
[340] Fix | Delete
if ( $value === false ) {
[341] Fix | Delete
$passed_default = func_num_args() > 1;
[342] Fix | Delete
[343] Fix | Delete
// phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals -- Using WP native filter.
[344] Fix | Delete
return apply_filters( "default_option_{$option}", $default_value, $option, $passed_default );
[345] Fix | Delete
}
[346] Fix | Delete
[347] Fix | Delete
// phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals -- Using WP native filter.
[348] Fix | Delete
return apply_filters( "option_{$option}", maybe_unserialize( $value ), $option );
[349] Fix | Delete
}
[350] Fix | Delete
[351] Fix | Delete
/**
[352] Fix | Delete
* Run the clean up routine for one or all options.
[353] Fix | Delete
*
[354] Fix | Delete
* @param array|string|null $option_name Optional. the option you want to clean or an array of
[355] Fix | Delete
* option names for the options you want to clean.
[356] Fix | Delete
* If not set, all options will be cleaned.
[357] Fix | Delete
* @param string|null $current_version Optional. Version from which to upgrade, if not set,
[358] Fix | Delete
* version specific upgrades will be disregarded.
[359] Fix | Delete
*
[360] Fix | Delete
* @return void
[361] Fix | Delete
*/
[362] Fix | Delete
public static function clean_up( $option_name = null, $current_version = null ) {
[363] Fix | Delete
if ( isset( $option_name ) && is_string( $option_name ) && $option_name !== '' ) {
[364] Fix | Delete
if ( isset( static::$option_instances[ $option_name ] ) ) {
[365] Fix | Delete
static::$option_instances[ $option_name ]->clean( $current_version );
[366] Fix | Delete
}
[367] Fix | Delete
}
[368] Fix | Delete
elseif ( isset( $option_name ) && is_array( $option_name ) && $option_name !== [] ) {
[369] Fix | Delete
foreach ( $option_name as $option ) {
[370] Fix | Delete
if ( isset( static::$option_instances[ $option ] ) ) {
[371] Fix | Delete
static::$option_instances[ $option ]->clean( $current_version );
[372] Fix | Delete
}
[373] Fix | Delete
}
[374] Fix | Delete
unset( $option );
[375] Fix | Delete
}
[376] Fix | Delete
else {
[377] Fix | Delete
foreach ( static::$option_instances as $instance ) {
[378] Fix | Delete
$instance->clean( $current_version );
[379] Fix | Delete
}
[380] Fix | Delete
unset( $instance );
[381] Fix | Delete
[382] Fix | Delete
// If we've done a full clean-up, we can safely remove this really old option.
[383] Fix | Delete
delete_option( 'wpseo_indexation' );
[384] Fix | Delete
}
[385] Fix | Delete
}
[386] Fix | Delete
[387] Fix | Delete
/**
[388] Fix | Delete
* Check that all options exist in the database and add any which don't.
[389] Fix | Delete
*
[390] Fix | Delete
* @return void
[391] Fix | Delete
*/
[392] Fix | Delete
public static function ensure_options_exist() {
[393] Fix | Delete
foreach ( static::$option_instances as $instance ) {
[394] Fix | Delete
$instance->maybe_add_option();
[395] Fix | Delete
}
[396] Fix | Delete
}
[397] Fix | Delete
[398] Fix | Delete
/**
[399] Fix | Delete
* Initialize some options on first install/activate/reset.
[400] Fix | Delete
*
[401] Fix | Delete
* @return void
[402] Fix | Delete
*/
[403] Fix | Delete
public static function initialize() {
[404] Fix | Delete
/* Force WooThemes to use Yoast SEO data. */
[405] Fix | Delete
if ( function_exists( 'woo_version_init' ) ) {
[406] Fix | Delete
update_option( 'seo_woo_use_third_party_data', 'true' );
[407] Fix | Delete
}
[408] Fix | Delete
}
[409] Fix | Delete
[410] Fix | Delete
/**
[411] Fix | Delete
* Reset all options to their default values and rerun some tests.
[412] Fix | Delete
*
[413] Fix | Delete
* @return void
[414] Fix | Delete
*/
[415] Fix | Delete
public static function reset() {
[416] Fix | Delete
if ( ! is_multisite() ) {
[417] Fix | Delete
$option_names = static::get_option_names();
[418] Fix | Delete
if ( is_array( $option_names ) && $option_names !== [] ) {
[419] Fix | Delete
foreach ( $option_names as $option_name ) {
[420] Fix | Delete
delete_option( $option_name );
[421] Fix | Delete
update_option( $option_name, get_option( $option_name ) );
[422] Fix | Delete
}
[423] Fix | Delete
}
[424] Fix | Delete
unset( $option_names );
[425] Fix | Delete
}
[426] Fix | Delete
else {
[427] Fix | Delete
// Reset MS blog based on network default blog setting.
[428] Fix | Delete
static::reset_ms_blog( get_current_blog_id() );
[429] Fix | Delete
}
[430] Fix | Delete
[431] Fix | Delete
static::initialize();
[432] Fix | Delete
}
[433] Fix | Delete
[434] Fix | Delete
/**
[435] Fix | Delete
* Initialize default values for a new multisite blog.
[436] Fix | Delete
*
[437] Fix | Delete
* @param bool $force_init Whether to always do the initialization routine (title/desc test).
[438] Fix | Delete
*
[439] Fix | Delete
* @return void
[440] Fix | Delete
*/
[441] Fix | Delete
public static function maybe_set_multisite_defaults( $force_init = false ) {
[442] Fix | Delete
$option = get_option( 'wpseo' );
[443] Fix | Delete
[444] Fix | Delete
if ( is_multisite() ) {
[445] Fix | Delete
if ( $option['ms_defaults_set'] === false ) {
[446] Fix | Delete
static::reset_ms_blog( get_current_blog_id() );
[447] Fix | Delete
static::initialize();
[448] Fix | Delete
}
[449] Fix | Delete
elseif ( $force_init === true ) {
[450] Fix | Delete
static::initialize();
[451] Fix | Delete
}
[452] Fix | Delete
}
[453] Fix | Delete
}
[454] Fix | Delete
[455] Fix | Delete
/**
[456] Fix | Delete
* Reset all options for a specific multisite blog to their default values based upon a
[457] Fix | Delete
* specified default blog if one was chosen on the network page or the plugin defaults if it was not.
[458] Fix | Delete
*
[459] Fix | Delete
* @param int|string $blog_id Blog id of the blog for which to reset the options.
[460] Fix | Delete
*
[461] Fix | Delete
* @return void
[462] Fix | Delete
*/
[463] Fix | Delete
public static function reset_ms_blog( $blog_id ) {
[464] Fix | Delete
if ( is_multisite() ) {
[465] Fix | Delete
$options = get_site_option( 'wpseo_ms' );
[466] Fix | Delete
$option_names = static::get_option_names();
[467] Fix | Delete
[468] Fix | Delete
if ( is_array( $option_names ) && $option_names !== [] ) {
[469] Fix | Delete
$base_blog_id = $blog_id;
[470] Fix | Delete
if ( $options['defaultblog'] !== '' && $options['defaultblog'] !== 0 ) {
[471] Fix | Delete
$base_blog_id = $options['defaultblog'];
[472] Fix | Delete
}
[473] Fix | Delete
[474] Fix | Delete
foreach ( $option_names as $option_name ) {
[475] Fix | Delete
delete_blog_option( $blog_id, $option_name );
[476] Fix | Delete
[477] Fix | Delete
$new_option = get_blog_option( $base_blog_id, $option_name );
[478] Fix | Delete
[479] Fix | Delete
/* Remove sensitive, theme dependent and site dependent info. */
[480] Fix | Delete
if ( isset( static::$option_instances[ $option_name ] ) && static::$option_instances[ $option_name ]->ms_exclude !== [] ) {
[481] Fix | Delete
foreach ( static::$option_instances[ $option_name ]->ms_exclude as $key ) {
[482] Fix | Delete
unset( $new_option[ $key ] );
[483] Fix | Delete
}
[484] Fix | Delete
}
[485] Fix | Delete
[486] Fix | Delete
if ( $option_name === 'wpseo' ) {
[487] Fix | Delete
$new_option['ms_defaults_set'] = true;
[488] Fix | Delete
}
[489] Fix | Delete
[490] Fix | Delete
update_blog_option( $blog_id, $option_name, $new_option );
[491] Fix | Delete
}
[492] Fix | Delete
}
[493] Fix | Delete
}
[494] Fix | Delete
}
[495] Fix | Delete
[496] Fix | Delete
/**
[497] Fix | Delete
* Saves the option to the database.
[498] Fix | Delete
*
[499] Fix | Delete
12
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function