plugin updates
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
namespace Yoast\WP\SEO\Conditionals;
|
||||
|
||||
/**
|
||||
* Feature flag conditional for the new dashboard UI.
|
||||
*/
|
||||
class New_Dashboard_Ui_Conditional extends Feature_Flag_Conditional {
|
||||
|
||||
/**
|
||||
* Returns the name of the feature flag.
|
||||
*
|
||||
* @return string The name of the feature flag.
|
||||
*/
|
||||
protected function get_feature_flag() {
|
||||
return 'NEW_DASHBOARD_UI';
|
||||
}
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Yoast\WP\SEO\Conditionals\Third_Party;
|
||||
|
||||
use Yoast\WP\SEO\Conditionals\Conditional;
|
||||
|
||||
/**
|
||||
* Conditional that is only met when Jetpack_Boost exists.
|
||||
*/
|
||||
class Jetpack_Boost_Active_Conditional implements Conditional {
|
||||
|
||||
/**
|
||||
* Returns `true` when the Jetpack_Boost class exists within this WordPress installation.
|
||||
*
|
||||
* @return bool `true` when the Jetpack_Boost class exists within this WordPress installation.
|
||||
*/
|
||||
public function is_met() {
|
||||
return \class_exists( '\Automattic\Jetpack_Boost\Jetpack_Boost', false );
|
||||
}
|
||||
}
|
||||
@@ -1,36 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Yoast\WP\SEO\Conditionals\Third_Party;
|
||||
|
||||
use Automattic\Jetpack_Boost\Lib\Premium_Features;
|
||||
use Yoast\WP\SEO\Conditionals\Conditional;
|
||||
|
||||
/**
|
||||
* Conditional that is met when Jetpack Boost is not installed, activated or premium.
|
||||
*/
|
||||
class Jetpack_Boost_Not_Premium_Conditional implements Conditional {
|
||||
|
||||
/**
|
||||
* Whether Jetpack Boost is not premium.
|
||||
*
|
||||
* @return bool Whether Jetpack Boost is not premium.
|
||||
*/
|
||||
public function is_met() {
|
||||
return ! $this->is_premium();
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves, if available, if Jetpack Boost has priority feature available.
|
||||
*
|
||||
* @return bool Whether Jetpack Boost is premium.
|
||||
*/
|
||||
private function is_premium() {
|
||||
if ( \class_exists( '\Automattic\Jetpack_Boost\Lib\Premium_Features', false ) ) {
|
||||
return Premium_Features::has_feature(
|
||||
Premium_Features::PRIORITY_SUPPORT
|
||||
);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user