wp_protect_special_option() – Protect WordPress special option from being modified.

You appear to be a bot. Output may be restricted

Description

Protects WordPress special option from being modified.

Will die if $option is in protected list. Protected options are 'alloptions' and 'notoptions' options.

Usage

wp_protect_special_option( $option );

Parameters

$option
( string ) required – Option name.

Returns

void

Source

File name: wordpress/wp-includes/option.php
Lines:

1 to 11 of 11
function wp_protect_special_option( $option ) {
  if ( 'alloptions' === $option || 'notoptions' === $option ) {
    wp_die(
      sprintf(
        /* translators: %s: Option name. */
        __( '%s is a protected WP option and may not be modified' ),
        esc_html( $option )
      )
    );
  }
}
 

 View on GitHub View on Trac