Server IP : 104.21.14.48 / Your IP : 18.119.29.70 [ Web Server : Apache System : Linux b70eb322-3aee-0c53-7c82-0db91281f2c6.secureserver.net 6.1.90-1.el9.elrepo.x86_64 #1 SMP PREEMPT_DYNAMIC Thu May 2 12:09:22 EDT 2024 x86_64 User : root ( 0) PHP Version : 8.0.30.2 Disable Function : NONE Domains : 0 Domains MySQL : ON | cURL : ON | WGET : ON | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /var/www/wp-content/plugins/wordpress-seo/src/conditionals/admin/ |
Upload File : |
<?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 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(); } }