wpseek.com
Outil de recherche WordPress pour les développeurs et auteurs de thèmes



wp_protect_special_option › WordPress Function

Depuis2.2.0
Dépréciéen/a
wp_protect_special_option ( $option )
Paramètres:
  • (string) $option Option name.
    Requis: Oui
Défini(e) dans:
Codex:

Protects WordPress special option from being modified.

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


Source

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 )
			)
		);
	}
}