Switch language

wpseek.com
A WordPress-centric search engine for devs and theme authors




wp_protect_special_option [ WordPress Function ]

wp_protect_special_option ( $option )
Parameters:
  • (string) $option Option name.
Defined at:



Protect WordPress special option from being modified.

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

Source


<?php
function wp_protect_special_option$option ) {
    
$protected = array( 'alloptions''notoptions' );
    if ( 
in_array$option$protected ) )
        
wp_diesprintf__'%s is a protected WP option and may not be modified' ), esc_html$option ) ) );
}
?>

Examples [ wp-snippets.com ]

Top Google zoekresultaten

Meer ...

Gebruikersdiscussies [ wordpress.org ]

0 User Note(s)

Nog geen één. Wees de eerste!

Nieuw toevoegen ...



HTML5 Powered with CSS3 / Styling, Performance & Integration, and Semantics