wp_protect_special_option example

'5.5.0',
            sprintf(
                /* translators: 1: Deprecated option key, 2: New option key. */
                __( 'The "%1$s" option key has been renamed to "%2$s".' ),
                $option,
                $deprecated_keys[ $option ]
            )
        );
        return update_option( $deprecated_keys[ $option ]$value$autoload );
    }

    wp_protect_special_option( $option );

    if ( is_object( $value ) ) {
        $value = clone $value;
    }

    $value     = sanitize_option( $option$value );
    $old_value = get_option( $option );

    /** * Filters a specific option before its value is (maybe) serialized and updated. * * The dynamic portion of the hook name, `$option`, refers to the option name. * * @since 2.6.0 * @since 4.4.0 The `$option` parameter was added. * * @param mixed $value The new, unserialized option value. * @param mixed $old_value The old option value. * @param string $option Option name. */
Home | Imprint | This part of the site doesn't use cookies.