yoast_wpseo_self_deactivate()Yoast 1.0

The method will deactivate the plugin, but only once, done by the static $is_deactivated.

Хуков нет.

Возвращает

null. Ничего.

Использование

yoast_wpseo_self_deactivate();

Код yoast_wpseo_self_deactivate() Yoast 19.4

function yoast_wpseo_self_deactivate() {
	static $is_deactivated;

	if ( $is_deactivated === null ) {
		$is_deactivated = true;
		deactivate_plugins( WPSEO_BASENAME );
		if ( isset( $_GET['activate'] ) ) {
			unset( $_GET['activate'] );
		}
	}
}