first commit

This commit is contained in:
Rachit Bhargava
2023-07-21 17:12:10 -04:00
parent d0fe47dde4
commit 5d0f0734d8
14003 changed files with 2829464 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
<?php
namespace Yoast\WP\SEO\Premium\Conditionals;
use WPSEO_Options;
use Yoast\WP\SEO\Conditionals\Feature_Flag_Conditional;
/**
* Checks if the YOAST_SEO_SOCIAL_TEMPLATES constant is set.
*/
class Social_Templates_Conditional extends Feature_Flag_Conditional {
/**
* Returns whether or not this conditional is met.
*
* @return bool Whether or not the conditional is met.
*/
public function is_met() {
return parent::is_met() && WPSEO_Options::get( 'opengraph', true ) === true;
}
/**
* Returns the name of the feature flag.
* 'YOAST_SEO_' is automatically prepended to it and it will be uppercased.
*
* @return string the name of the feature flag.
*/
protected function get_feature_flag() {
return 'SOCIAL_TEMPLATES';
}
}

View File

@@ -0,0 +1,36 @@
<?php
namespace Yoast\WP\SEO\Conditionals;
use Yoast\WP\SEO\Helpers\Zapier_Helper;
/**
* Conditional that is only met when the Zapier integration is enabled.
*/
class Zapier_Enabled_Conditional implements Conditional {
/**
* The Zapier helper.
*
* @var Zapier_Helper
*/
private $zapier;
/**
* Zapier_Enabled_Conditional constructor.
*
* @param Zapier_Helper $zapier The Zapier helper.
*/
public function __construct( Zapier_Helper $zapier ) {
$this->zapier = $zapier;
}
/**
* Returns whether or not this conditional is met.
*
* @return bool Whether or not the conditional is met.
*/
public function is_met() {
return $this->zapier->is_enabled();
}
}