Yoast\WP\SEO\Helpers

Wordproof_Helper::integration_is_disabled()publicYoast 1.0

Returns if conditionals are met. If not, the integration should be disabled.

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

Хуков нет.

Возвращает

true|false|Строку. Returns if the integration should be disabled.

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

$Wordproof_Helper = new Wordproof_Helper();
$Wordproof_Helper->integration_is_disabled( $return_conditional );
$return_conditional(true|false)
If the conditional class name that was unmet should be returned.
По умолчанию: false

Код Wordproof_Helper::integration_is_disabled() Yoast 19.7.1

public function integration_is_disabled( $return_conditional = false ) {
	$conditionals = [ new Non_Multisite_Conditional(), new Wordproof_Plugin_Inactive_Conditional() ];

	foreach ( $conditionals as $conditional ) {
		if ( ! $conditional->is_met() ) {

			if ( $return_conditional === true ) {
				return ( new ReflectionClass( $conditional ) )->getShortName();
			}

			return true;
		}
	}

	return false;
}