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-inclu...
File: option.php
* of the transient, and return that value.
[2500] Fix | Delete
* @param string $transient Transient name.
[2501] Fix | Delete
*/
[2502] Fix | Delete
$pre = apply_filters( "pre_site_transient_{$transient}", false, $transient );
[2503] Fix | Delete
[2504] Fix | Delete
if ( false !== $pre ) {
[2505] Fix | Delete
return $pre;
[2506] Fix | Delete
}
[2507] Fix | Delete
[2508] Fix | Delete
if ( wp_using_ext_object_cache() || wp_installing() ) {
[2509] Fix | Delete
$value = wp_cache_get( $transient, 'site-transient' );
[2510] Fix | Delete
} else {
[2511] Fix | Delete
// Core transients that do not have a timeout. Listed here so querying timeouts can be avoided.
[2512] Fix | Delete
$no_timeout = array( 'update_core', 'update_plugins', 'update_themes' );
[2513] Fix | Delete
$transient_option = '_site_transient_' . $transient;
[2514] Fix | Delete
if ( ! in_array( $transient, $no_timeout, true ) ) {
[2515] Fix | Delete
$transient_timeout = '_site_transient_timeout_' . $transient;
[2516] Fix | Delete
wp_prime_site_option_caches( array( $transient_option, $transient_timeout ) );
[2517] Fix | Delete
[2518] Fix | Delete
$timeout = get_site_option( $transient_timeout );
[2519] Fix | Delete
if ( false !== $timeout && $timeout < time() ) {
[2520] Fix | Delete
delete_site_option( $transient_option );
[2521] Fix | Delete
delete_site_option( $transient_timeout );
[2522] Fix | Delete
$value = false;
[2523] Fix | Delete
}
[2524] Fix | Delete
}
[2525] Fix | Delete
[2526] Fix | Delete
if ( ! isset( $value ) ) {
[2527] Fix | Delete
$value = get_site_option( $transient_option );
[2528] Fix | Delete
}
[2529] Fix | Delete
}
[2530] Fix | Delete
[2531] Fix | Delete
/**
[2532] Fix | Delete
* Filters the value of an existing site transient.
[2533] Fix | Delete
*
[2534] Fix | Delete
* The dynamic portion of the hook name, `$transient`, refers to the transient name.
[2535] Fix | Delete
*
[2536] Fix | Delete
* @since 2.9.0
[2537] Fix | Delete
* @since 4.4.0 The `$transient` parameter was added.
[2538] Fix | Delete
*
[2539] Fix | Delete
* @param mixed $value Value of site transient.
[2540] Fix | Delete
* @param string $transient Transient name.
[2541] Fix | Delete
*/
[2542] Fix | Delete
return apply_filters( "site_transient_{$transient}", $value, $transient );
[2543] Fix | Delete
}
[2544] Fix | Delete
[2545] Fix | Delete
/**
[2546] Fix | Delete
* Sets/updates the value of a site transient.
[2547] Fix | Delete
*
[2548] Fix | Delete
* You do not need to serialize values. If the value needs to be serialized,
[2549] Fix | Delete
* then it will be serialized before it is set.
[2550] Fix | Delete
*
[2551] Fix | Delete
* @since 2.9.0
[2552] Fix | Delete
*
[2553] Fix | Delete
* @see set_transient()
[2554] Fix | Delete
*
[2555] Fix | Delete
* @param string $transient Transient name. Expected to not be SQL-escaped. Must be
[2556] Fix | Delete
* 167 characters or fewer in length.
[2557] Fix | Delete
* @param mixed $value Transient value. Expected to not be SQL-escaped.
[2558] Fix | Delete
* @param int $expiration Optional. Time until expiration in seconds. Default 0 (no expiration).
[2559] Fix | Delete
* @return bool True if the value was set, false otherwise.
[2560] Fix | Delete
*/
[2561] Fix | Delete
function set_site_transient( $transient, $value, $expiration = 0 ) {
[2562] Fix | Delete
[2563] Fix | Delete
/**
[2564] Fix | Delete
* Filters the value of a specific site transient before it is set.
[2565] Fix | Delete
*
[2566] Fix | Delete
* The dynamic portion of the hook name, `$transient`, refers to the transient name.
[2567] Fix | Delete
*
[2568] Fix | Delete
* @since 3.0.0
[2569] Fix | Delete
* @since 4.4.0 The `$transient` parameter was added.
[2570] Fix | Delete
*
[2571] Fix | Delete
* @param mixed $value New value of site transient.
[2572] Fix | Delete
* @param string $transient Transient name.
[2573] Fix | Delete
*/
[2574] Fix | Delete
$value = apply_filters( "pre_set_site_transient_{$transient}", $value, $transient );
[2575] Fix | Delete
[2576] Fix | Delete
$expiration = (int) $expiration;
[2577] Fix | Delete
[2578] Fix | Delete
/**
[2579] Fix | Delete
* Filters the expiration for a site transient before its value is set.
[2580] Fix | Delete
*
[2581] Fix | Delete
* The dynamic portion of the hook name, `$transient`, refers to the transient name.
[2582] Fix | Delete
*
[2583] Fix | Delete
* @since 4.4.0
[2584] Fix | Delete
*
[2585] Fix | Delete
* @param int $expiration Time until expiration in seconds. Use 0 for no expiration.
[2586] Fix | Delete
* @param mixed $value New value of site transient.
[2587] Fix | Delete
* @param string $transient Transient name.
[2588] Fix | Delete
*/
[2589] Fix | Delete
$expiration = apply_filters( "expiration_of_site_transient_{$transient}", $expiration, $value, $transient );
[2590] Fix | Delete
[2591] Fix | Delete
if ( wp_using_ext_object_cache() || wp_installing() ) {
[2592] Fix | Delete
$result = wp_cache_set( $transient, $value, 'site-transient', $expiration );
[2593] Fix | Delete
} else {
[2594] Fix | Delete
$transient_timeout = '_site_transient_timeout_' . $transient;
[2595] Fix | Delete
$option = '_site_transient_' . $transient;
[2596] Fix | Delete
wp_prime_site_option_caches( array( $option, $transient_timeout ) );
[2597] Fix | Delete
[2598] Fix | Delete
if ( false === get_site_option( $option ) ) {
[2599] Fix | Delete
if ( $expiration ) {
[2600] Fix | Delete
add_site_option( $transient_timeout, time() + $expiration );
[2601] Fix | Delete
}
[2602] Fix | Delete
$result = add_site_option( $option, $value );
[2603] Fix | Delete
} else {
[2604] Fix | Delete
if ( $expiration ) {
[2605] Fix | Delete
update_site_option( $transient_timeout, time() + $expiration );
[2606] Fix | Delete
}
[2607] Fix | Delete
$result = update_site_option( $option, $value );
[2608] Fix | Delete
}
[2609] Fix | Delete
}
[2610] Fix | Delete
[2611] Fix | Delete
if ( $result ) {
[2612] Fix | Delete
[2613] Fix | Delete
/**
[2614] Fix | Delete
* Fires after the value for a specific site transient has been set.
[2615] Fix | Delete
*
[2616] Fix | Delete
* The dynamic portion of the hook name, `$transient`, refers to the transient name.
[2617] Fix | Delete
*
[2618] Fix | Delete
* @since 3.0.0
[2619] Fix | Delete
* @since 4.4.0 The `$transient` parameter was added
[2620] Fix | Delete
*
[2621] Fix | Delete
* @param mixed $value Site transient value.
[2622] Fix | Delete
* @param int $expiration Time until expiration in seconds.
[2623] Fix | Delete
* @param string $transient Transient name.
[2624] Fix | Delete
*/
[2625] Fix | Delete
do_action( "set_site_transient_{$transient}", $value, $expiration, $transient );
[2626] Fix | Delete
[2627] Fix | Delete
/**
[2628] Fix | Delete
* Fires after the value for a site transient has been set.
[2629] Fix | Delete
*
[2630] Fix | Delete
* @since 3.0.0
[2631] Fix | Delete
*
[2632] Fix | Delete
* @param string $transient The name of the site transient.
[2633] Fix | Delete
* @param mixed $value Site transient value.
[2634] Fix | Delete
* @param int $expiration Time until expiration in seconds.
[2635] Fix | Delete
*/
[2636] Fix | Delete
do_action( 'setted_site_transient', $transient, $value, $expiration );
[2637] Fix | Delete
}
[2638] Fix | Delete
[2639] Fix | Delete
return $result;
[2640] Fix | Delete
}
[2641] Fix | Delete
[2642] Fix | Delete
/**
[2643] Fix | Delete
* Registers default settings available in WordPress.
[2644] Fix | Delete
*
[2645] Fix | Delete
* The settings registered here are primarily useful for the REST API, so this
[2646] Fix | Delete
* does not encompass all settings available in WordPress.
[2647] Fix | Delete
*
[2648] Fix | Delete
* @since 4.7.0
[2649] Fix | Delete
* @since 6.0.1 The `show_on_front`, `page_on_front`, and `page_for_posts` options were added.
[2650] Fix | Delete
*/
[2651] Fix | Delete
function register_initial_settings() {
[2652] Fix | Delete
register_setting(
[2653] Fix | Delete
'general',
[2654] Fix | Delete
'blogname',
[2655] Fix | Delete
array(
[2656] Fix | Delete
'show_in_rest' => array(
[2657] Fix | Delete
'name' => 'title',
[2658] Fix | Delete
),
[2659] Fix | Delete
'type' => 'string',
[2660] Fix | Delete
'label' => __( 'Title' ),
[2661] Fix | Delete
'description' => __( 'Site title.' ),
[2662] Fix | Delete
)
[2663] Fix | Delete
);
[2664] Fix | Delete
[2665] Fix | Delete
register_setting(
[2666] Fix | Delete
'general',
[2667] Fix | Delete
'blogdescription',
[2668] Fix | Delete
array(
[2669] Fix | Delete
'show_in_rest' => array(
[2670] Fix | Delete
'name' => 'description',
[2671] Fix | Delete
),
[2672] Fix | Delete
'type' => 'string',
[2673] Fix | Delete
'label' => __( 'Tagline' ),
[2674] Fix | Delete
'description' => __( 'Site tagline.' ),
[2675] Fix | Delete
)
[2676] Fix | Delete
);
[2677] Fix | Delete
[2678] Fix | Delete
if ( ! is_multisite() ) {
[2679] Fix | Delete
register_setting(
[2680] Fix | Delete
'general',
[2681] Fix | Delete
'siteurl',
[2682] Fix | Delete
array(
[2683] Fix | Delete
'show_in_rest' => array(
[2684] Fix | Delete
'name' => 'url',
[2685] Fix | Delete
'schema' => array(
[2686] Fix | Delete
'format' => 'uri',
[2687] Fix | Delete
),
[2688] Fix | Delete
),
[2689] Fix | Delete
'type' => 'string',
[2690] Fix | Delete
'description' => __( 'Site URL.' ),
[2691] Fix | Delete
)
[2692] Fix | Delete
);
[2693] Fix | Delete
}
[2694] Fix | Delete
[2695] Fix | Delete
if ( ! is_multisite() ) {
[2696] Fix | Delete
register_setting(
[2697] Fix | Delete
'general',
[2698] Fix | Delete
'admin_email',
[2699] Fix | Delete
array(
[2700] Fix | Delete
'show_in_rest' => array(
[2701] Fix | Delete
'name' => 'email',
[2702] Fix | Delete
'schema' => array(
[2703] Fix | Delete
'format' => 'email',
[2704] Fix | Delete
),
[2705] Fix | Delete
),
[2706] Fix | Delete
'type' => 'string',
[2707] Fix | Delete
'description' => __( 'This address is used for admin purposes, like new user notification.' ),
[2708] Fix | Delete
)
[2709] Fix | Delete
);
[2710] Fix | Delete
}
[2711] Fix | Delete
[2712] Fix | Delete
register_setting(
[2713] Fix | Delete
'general',
[2714] Fix | Delete
'timezone_string',
[2715] Fix | Delete
array(
[2716] Fix | Delete
'show_in_rest' => array(
[2717] Fix | Delete
'name' => 'timezone',
[2718] Fix | Delete
),
[2719] Fix | Delete
'type' => 'string',
[2720] Fix | Delete
'description' => __( 'A city in the same timezone as you.' ),
[2721] Fix | Delete
)
[2722] Fix | Delete
);
[2723] Fix | Delete
[2724] Fix | Delete
register_setting(
[2725] Fix | Delete
'general',
[2726] Fix | Delete
'date_format',
[2727] Fix | Delete
array(
[2728] Fix | Delete
'show_in_rest' => true,
[2729] Fix | Delete
'type' => 'string',
[2730] Fix | Delete
'description' => __( 'A date format for all date strings.' ),
[2731] Fix | Delete
)
[2732] Fix | Delete
);
[2733] Fix | Delete
[2734] Fix | Delete
register_setting(
[2735] Fix | Delete
'general',
[2736] Fix | Delete
'time_format',
[2737] Fix | Delete
array(
[2738] Fix | Delete
'show_in_rest' => true,
[2739] Fix | Delete
'type' => 'string',
[2740] Fix | Delete
'description' => __( 'A time format for all time strings.' ),
[2741] Fix | Delete
)
[2742] Fix | Delete
);
[2743] Fix | Delete
[2744] Fix | Delete
register_setting(
[2745] Fix | Delete
'general',
[2746] Fix | Delete
'start_of_week',
[2747] Fix | Delete
array(
[2748] Fix | Delete
'show_in_rest' => true,
[2749] Fix | Delete
'type' => 'integer',
[2750] Fix | Delete
'description' => __( 'A day number of the week that the week should start on.' ),
[2751] Fix | Delete
)
[2752] Fix | Delete
);
[2753] Fix | Delete
[2754] Fix | Delete
register_setting(
[2755] Fix | Delete
'general',
[2756] Fix | Delete
'WPLANG',
[2757] Fix | Delete
array(
[2758] Fix | Delete
'show_in_rest' => array(
[2759] Fix | Delete
'name' => 'language',
[2760] Fix | Delete
),
[2761] Fix | Delete
'type' => 'string',
[2762] Fix | Delete
'description' => __( 'WordPress locale code.' ),
[2763] Fix | Delete
'default' => 'en_US',
[2764] Fix | Delete
)
[2765] Fix | Delete
);
[2766] Fix | Delete
[2767] Fix | Delete
register_setting(
[2768] Fix | Delete
'writing',
[2769] Fix | Delete
'use_smilies',
[2770] Fix | Delete
array(
[2771] Fix | Delete
'show_in_rest' => true,
[2772] Fix | Delete
'type' => 'boolean',
[2773] Fix | Delete
'description' => __( 'Convert emoticons like :-) and :-P to graphics on display.' ),
[2774] Fix | Delete
'default' => true,
[2775] Fix | Delete
)
[2776] Fix | Delete
);
[2777] Fix | Delete
[2778] Fix | Delete
register_setting(
[2779] Fix | Delete
'writing',
[2780] Fix | Delete
'default_category',
[2781] Fix | Delete
array(
[2782] Fix | Delete
'show_in_rest' => true,
[2783] Fix | Delete
'type' => 'integer',
[2784] Fix | Delete
'description' => __( 'Default post category.' ),
[2785] Fix | Delete
)
[2786] Fix | Delete
);
[2787] Fix | Delete
[2788] Fix | Delete
register_setting(
[2789] Fix | Delete
'writing',
[2790] Fix | Delete
'default_post_format',
[2791] Fix | Delete
array(
[2792] Fix | Delete
'show_in_rest' => true,
[2793] Fix | Delete
'type' => 'string',
[2794] Fix | Delete
'description' => __( 'Default post format.' ),
[2795] Fix | Delete
)
[2796] Fix | Delete
);
[2797] Fix | Delete
[2798] Fix | Delete
register_setting(
[2799] Fix | Delete
'reading',
[2800] Fix | Delete
'posts_per_page',
[2801] Fix | Delete
array(
[2802] Fix | Delete
'show_in_rest' => true,
[2803] Fix | Delete
'type' => 'integer',
[2804] Fix | Delete
'label' => __( 'Maximum posts per page' ),
[2805] Fix | Delete
'description' => __( 'Blog pages show at most.' ),
[2806] Fix | Delete
'default' => 10,
[2807] Fix | Delete
)
[2808] Fix | Delete
);
[2809] Fix | Delete
[2810] Fix | Delete
register_setting(
[2811] Fix | Delete
'reading',
[2812] Fix | Delete
'show_on_front',
[2813] Fix | Delete
array(
[2814] Fix | Delete
'show_in_rest' => true,
[2815] Fix | Delete
'type' => 'string',
[2816] Fix | Delete
'label' => __( 'Show on front' ),
[2817] Fix | Delete
'description' => __( 'What to show on the front page' ),
[2818] Fix | Delete
)
[2819] Fix | Delete
);
[2820] Fix | Delete
[2821] Fix | Delete
register_setting(
[2822] Fix | Delete
'reading',
[2823] Fix | Delete
'page_on_front',
[2824] Fix | Delete
array(
[2825] Fix | Delete
'show_in_rest' => true,
[2826] Fix | Delete
'type' => 'integer',
[2827] Fix | Delete
'label' => __( 'Page on front' ),
[2828] Fix | Delete
'description' => __( 'The ID of the page that should be displayed on the front page' ),
[2829] Fix | Delete
)
[2830] Fix | Delete
);
[2831] Fix | Delete
[2832] Fix | Delete
register_setting(
[2833] Fix | Delete
'reading',
[2834] Fix | Delete
'page_for_posts',
[2835] Fix | Delete
array(
[2836] Fix | Delete
'show_in_rest' => true,
[2837] Fix | Delete
'type' => 'integer',
[2838] Fix | Delete
'description' => __( 'The ID of the page that should display the latest posts' ),
[2839] Fix | Delete
)
[2840] Fix | Delete
);
[2841] Fix | Delete
[2842] Fix | Delete
register_setting(
[2843] Fix | Delete
'discussion',
[2844] Fix | Delete
'default_ping_status',
[2845] Fix | Delete
array(
[2846] Fix | Delete
'show_in_rest' => array(
[2847] Fix | Delete
'schema' => array(
[2848] Fix | Delete
'enum' => array( 'open', 'closed' ),
[2849] Fix | Delete
),
[2850] Fix | Delete
),
[2851] Fix | Delete
'type' => 'string',
[2852] Fix | Delete
'description' => __( 'Allow link notifications from other blogs (pingbacks and trackbacks) on new articles.' ),
[2853] Fix | Delete
)
[2854] Fix | Delete
);
[2855] Fix | Delete
[2856] Fix | Delete
register_setting(
[2857] Fix | Delete
'discussion',
[2858] Fix | Delete
'default_comment_status',
[2859] Fix | Delete
array(
[2860] Fix | Delete
'show_in_rest' => array(
[2861] Fix | Delete
'schema' => array(
[2862] Fix | Delete
'enum' => array( 'open', 'closed' ),
[2863] Fix | Delete
),
[2864] Fix | Delete
),
[2865] Fix | Delete
'type' => 'string',
[2866] Fix | Delete
'label' => __( 'Allow comments on new posts' ),
[2867] Fix | Delete
'description' => __( 'Allow people to submit comments on new posts.' ),
[2868] Fix | Delete
)
[2869] Fix | Delete
);
[2870] Fix | Delete
}
[2871] Fix | Delete
[2872] Fix | Delete
/**
[2873] Fix | Delete
* Registers a setting and its data.
[2874] Fix | Delete
*
[2875] Fix | Delete
* @since 2.7.0
[2876] Fix | Delete
* @since 3.0.0 The `misc` option group was deprecated.
[2877] Fix | Delete
* @since 3.5.0 The `privacy` option group was deprecated.
[2878] Fix | Delete
* @since 4.7.0 `$args` can be passed to set flags on the setting, similar to `register_meta()`.
[2879] Fix | Delete
* @since 5.5.0 `$new_whitelist_options` was renamed to `$new_allowed_options`.
[2880] Fix | Delete
* Please consider writing more inclusive code.
[2881] Fix | Delete
* @since 6.6.0 Added the `label` argument.
[2882] Fix | Delete
*
[2883] Fix | Delete
* @global array $new_allowed_options
[2884] Fix | Delete
* @global array $wp_registered_settings
[2885] Fix | Delete
*
[2886] Fix | Delete
* @param string $option_group A settings group name. Should correspond to an allowed option key name.
[2887] Fix | Delete
* Default allowed option key names include 'general', 'discussion', 'media',
[2888] Fix | Delete
* 'reading', 'writing', and 'options'.
[2889] Fix | Delete
* @param string $option_name The name of an option to sanitize and save.
[2890] Fix | Delete
* @param array $args {
[2891] Fix | Delete
* Data used to describe the setting when registered.
[2892] Fix | Delete
*
[2893] Fix | Delete
* @type string $type The type of data associated with this setting.
[2894] Fix | Delete
* Valid values are 'string', 'boolean', 'integer', 'number', 'array', and 'object'.
[2895] Fix | Delete
* @type string $label A label of the data attached to this setting.
[2896] Fix | Delete
* @type string $description A description of the data attached to this setting.
[2897] Fix | Delete
* @type callable $sanitize_callback A callback function that sanitizes the option's value.
[2898] Fix | Delete
* @type bool|array $show_in_rest Whether data associated with this setting should be included in the REST API.
[2899] Fix | Delete
* When registering complex settings, this argument may optionally be an
[2900] Fix | Delete
* array with a 'schema' key.
[2901] Fix | Delete
* @type mixed $default Default value when calling `get_option()`.
[2902] Fix | Delete
* }
[2903] Fix | Delete
*/
[2904] Fix | Delete
function register_setting( $option_group, $option_name, $args = array() ) {
[2905] Fix | Delete
global $new_allowed_options, $wp_registered_settings;
[2906] Fix | Delete
[2907] Fix | Delete
/*
[2908] Fix | Delete
* In 5.5.0, the `$new_whitelist_options` global variable was renamed to `$new_allowed_options`.
[2909] Fix | Delete
* Please consider writing more inclusive code.
[2910] Fix | Delete
*/
[2911] Fix | Delete
$GLOBALS['new_whitelist_options'] = &$new_allowed_options;
[2912] Fix | Delete
[2913] Fix | Delete
$defaults = array(
[2914] Fix | Delete
'type' => 'string',
[2915] Fix | Delete
'group' => $option_group,
[2916] Fix | Delete
'label' => '',
[2917] Fix | Delete
'description' => '',
[2918] Fix | Delete
'sanitize_callback' => null,
[2919] Fix | Delete
'show_in_rest' => false,
[2920] Fix | Delete
);
[2921] Fix | Delete
[2922] Fix | Delete
// Back-compat: old sanitize callback is added.
[2923] Fix | Delete
if ( is_callable( $args ) ) {
[2924] Fix | Delete
$args = array(
[2925] Fix | Delete
'sanitize_callback' => $args,
[2926] Fix | Delete
);
[2927] Fix | Delete
}
[2928] Fix | Delete
[2929] Fix | Delete
/**
[2930] Fix | Delete
* Filters the registration arguments when registering a setting.
[2931] Fix | Delete
*
[2932] Fix | Delete
* @since 4.7.0
[2933] Fix | Delete
*
[2934] Fix | Delete
* @param array $args Array of setting registration arguments.
[2935] Fix | Delete
* @param array $defaults Array of default arguments.
[2936] Fix | Delete
* @param string $option_group Setting group.
[2937] Fix | Delete
* @param string $option_name Setting name.
[2938] Fix | Delete
*/
[2939] Fix | Delete
$args = apply_filters( 'register_setting_args', $args, $defaults, $option_group, $option_name );
[2940] Fix | Delete
[2941] Fix | Delete
$args = wp_parse_args( $args, $defaults );
[2942] Fix | Delete
[2943] Fix | Delete
// Require an item schema when registering settings with an array type.
[2944] Fix | Delete
if ( false !== $args['show_in_rest'] && 'array' === $args['type'] && ( ! is_array( $args['show_in_rest'] ) || ! isset( $args['show_in_rest']['schema']['items'] ) ) ) {
[2945] Fix | Delete
_doing_it_wrong( __FUNCTION__, __( 'When registering an "array" setting to show in the REST API, you must specify the schema for each array item in "show_in_rest.schema.items".' ), '5.4.0' );
[2946] Fix | Delete
}
[2947] Fix | Delete
[2948] Fix | Delete
if ( ! is_array( $wp_registered_settings ) ) {
[2949] Fix | Delete
$wp_registered_settings = array();
[2950] Fix | Delete
}
[2951] Fix | Delete
[2952] Fix | Delete
if ( 'misc' === $option_group ) {
[2953] Fix | Delete
_deprecated_argument(
[2954] Fix | Delete
__FUNCTION__,
[2955] Fix | Delete
'3.0.0',
[2956] Fix | Delete
sprintf(
[2957] Fix | Delete
/* translators: %s: misc */
[2958] Fix | Delete
__( 'The "%s" options group has been removed. Use another settings group.' ),
[2959] Fix | Delete
'misc'
[2960] Fix | Delete
)
[2961] Fix | Delete
);
[2962] Fix | Delete
$option_group = 'general';
[2963] Fix | Delete
}
[2964] Fix | Delete
[2965] Fix | Delete
if ( 'privacy' === $option_group ) {
[2966] Fix | Delete
_deprecated_argument(
[2967] Fix | Delete
__FUNCTION__,
[2968] Fix | Delete
'3.5.0',
[2969] Fix | Delete
sprintf(
[2970] Fix | Delete
/* translators: %s: privacy */
[2971] Fix | Delete
__( 'The "%s" options group has been removed. Use another settings group.' ),
[2972] Fix | Delete
'privacy'
[2973] Fix | Delete
)
[2974] Fix | Delete
);
[2975] Fix | Delete
$option_group = 'reading';
[2976] Fix | Delete
}
[2977] Fix | Delete
[2978] Fix | Delete
$new_allowed_options[ $option_group ][] = $option_name;
[2979] Fix | Delete
[2980] Fix | Delete
if ( ! empty( $args['sanitize_callback'] ) ) {
[2981] Fix | Delete
add_filter( "sanitize_option_{$option_name}", $args['sanitize_callback'] );
[2982] Fix | Delete
}
[2983] Fix | Delete
if ( array_key_exists( 'default', $args ) ) {
[2984] Fix | Delete
add_filter( "default_option_{$option_name}", 'filter_default_option', 10, 3 );
[2985] Fix | Delete
}
[2986] Fix | Delete
[2987] Fix | Delete
/**
[2988] Fix | Delete
* Fires immediately before the setting is registered but after its filters are in place.
[2989] Fix | Delete
*
[2990] Fix | Delete
* @since 5.5.0
[2991] Fix | Delete
*
[2992] Fix | Delete
* @param string $option_group Setting group.
[2993] Fix | Delete
* @param string $option_name Setting name.
[2994] Fix | Delete
* @param array $args Array of setting registration arguments.
[2995] Fix | Delete
*/
[2996] Fix | Delete
do_action( 'register_setting', $option_group, $option_name, $args );
[2997] Fix | Delete
[2998] Fix | Delete
$wp_registered_settings[ $option_name ] = $args;
[2999] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function