wpseek.com
Bazujące na WordPress narzędzie wyszukiwania dla deweloperów i twórców motywów.



wp_protect_special_option › WordPress Function

Od2.2.0
Przestarzałyn/a
wp_protect_special_option ( $option )
Parametry:
  • (string) $option Option name.
    Wymagane: Tak
Zdefiniowane na:
Codex:

Protects WordPress special option from being modified.

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


Źródło

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