Yoast\WP\SEO\Services\Importing

Conflicting_Plugins_Service::deactivate_conflicting_plugins()publicYoast 1.0

Deactivates the specified plugin(s) if any, or the entire list of known conflicting plugins.

{} Это метод класса: Conflicting_Plugins_Service{}

Хуков нет.

Возвращает

null. Ничего.

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

$Conflicting_Plugins_Service = new Conflicting_Plugins_Service();
$Conflicting_Plugins_Service->deactivate_conflicting_plugins( $plugins );
$plugins(строка|массив|false)
The plugin filename, or array of plugin filenames, to deactivate.
По умолчанию: false

Код Conflicting_Plugins_Service::deactivate_conflicting_plugins() Yoast 19.10

public function deactivate_conflicting_plugins( $plugins = false ) {
	// If no plugins are specified, deactivate any known conflicting plugins that are active.
	if ( ! $plugins ) {
		$plugins = $this->detect_conflicting_plugins();
	}

	// In case of a single plugin, wrap it in an array.
	if ( \is_string( $plugins ) ) {
		$plugins = [ $plugins ];
	}

	if ( ! \is_array( $plugins ) ) {
		return;
	}

	// Deactivate all specified plugins across the network, while retaining their deactivation hook.
	\deactivate_plugins( $plugins );
}