function wp_protect_special_option( $option ) {}

Protect WordPress special option from being modified.
Will die if $option is in protected list. Protected options are ‘alloptions’ and ‘notoptions’ options.


  • string $option: Option name.

Source code

function wp_protect_special_option( $option ) {

	$protected = array( 'alloptions', 'notoptions' );

	if ( in_array( $option, $protected ) )

		wp_die( sprintf( __( '%s is a protected WP option and may not be modified' ), esc_html( $option ) ) );



No comments yet... Be the first to leave a reply!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: