Yoast\WP\SEO\Helpers

Wincher_Helper::is_active()publicYoast 1.0

Checks if the integration should be active for the current user.

Метод класса: Wincher_Helper{}

Хуков нет.

Возвращает

true|false. Whether the integration is active.

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

$Wincher_Helper = new Wincher_Helper();
$Wincher_Helper->is_active();

Код Wincher_Helper::is_active() Yoast 22.4

public function is_active() {
	$conditional = new Non_Multisite_Conditional();

	if ( ! $conditional->is_met() ) {
		return false;
	}

	if ( ! \current_user_can( 'publish_posts' ) && ! \current_user_can( 'publish_pages' ) ) {
		return false;
	}

	return (bool) $this->options->get( 'wincher_integration_active', true );
}