rebase code on oct-10-2023

This commit is contained in:
Rachit Bhargava
2023-10-10 17:51:46 -04:00
parent b16ad94b69
commit 8f1a2c3a66
2197 changed files with 184921 additions and 35568 deletions

View File

@@ -1,41 +0,0 @@
<?php // phpcs:ignore Yoast.Files.FileName.InvalidClassFileName -- Reason: this explicitly concerns the Yoast admin.
namespace Yoast\WP\SEO\Conditionals\Admin;
use Yoast\WP\SEO\Conditionals\Conditional;
use Yoast\WP\SEO\Helpers\Current_Page_Helper;
/**
* Conditional that is only met when on a Yoast SEO admin page.
*/
class Yoast_Admin_Conditional implements Conditional {
/**
* Holds the Current_Page_Helper.
*
* @var Current_Page_Helper
*/
private $current_page_helper;
/**
* Constructs the conditional.
*
* @param \Yoast\WP\SEO\Helpers\Current_Page_Helper $current_page_helper The current page helper.
*/
public function __construct( Current_Page_Helper $current_page_helper ) {
$this->current_page_helper = $current_page_helper;
}
/**
* Returns `true` when on the admin dashboard, update or Yoast SEO pages.
*
* @return bool `true` when on the admin dashboard, update or Yoast SEO pages.
*/
public function is_met() {
if ( ! \is_admin() ) {
return false;
}
return $this->current_page_helper->is_yoast_seo_page();
}
}

View File

@@ -1,24 +0,0 @@
<?php // phpcs:ignore Yoast.Files.FileName.InvalidClassFileName -- Reason: this explicitly concerns the Yoast tools page.
namespace Yoast\WP\SEO\Conditionals;
/**
* Conditional that is only met when current page is the tools page.
*/
class User_Profile_Conditional implements Conditional {
/**
* Returns whether or not this conditional is met.
*
* @return bool Whether or not the conditional is met.
*/
public function is_met() {
global $pagenow;
if ( $pagenow !== 'profile.php' ) {
return false;
}
return true;
}
}