PATH:
var
/
www
/
clients
/
client1
/
web1
/
web
/
wp-content
/
wordpress-seo
/
src
/
conditionals
<?php // phpcs:ignore Yoast.Files.FileName.InvalidClassFileName -- Reason: this explicitly concerns the Yoast admin and dashboard. namespace Yoast\WP\SEO\Conditionals; /** * Conditional that is only met when in the admin dashboard, update or Yoast SEO pages. */ class Yoast_Admin_And_Dashboard_Conditional implements Conditional { /** * 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() { global $pagenow; // Bail out early if we're not on the front-end. if ( ! \is_admin() ) { return false; } // Do not output on plugin / theme upgrade pages or when WordPress is upgrading. if ( ( \defined( 'IFRAME_REQUEST' ) && \IFRAME_REQUEST ) || $this->on_upgrade_page() || \wp_installing() ) { return false; } if ( $pagenow === 'admin.php' && isset( $_GET['page'] ) && \strpos( $_GET['page'], 'wpseo' ) === 0 ) { return true; } $target_pages = [ 'index.php', 'plugins.php', 'update-core.php', 'options-permalink.php', ]; return \in_array( $pagenow, $target_pages, true ); } /** * Checks if we are on a theme or plugin upgrade page. * * @return bool Whether we are on a theme or plugin upgrade page. */ private function on_upgrade_page() { /* * IFRAME_REQUEST is not defined on these pages, * though these action pages do show when upgrading themes or plugins. */ $actions = [ 'do-theme-upgrade', 'do-plugin-upgrade', 'do-core-upgrade', 'do-core-reinstall' ]; return isset( $_GET['action'] ) && \in_array( $_GET['action'], $actions, true ); } }
[-] wincher-token-conditional.php
[edit]
[-] wp-robots-conditional.php
[edit]
[-] conditional-interface.php
[edit]
[-] not-admin-ajax-conditional.php
[edit]
[-] semrush-enabled-conditional.php
[edit]
[-] feature-flag-conditional.php
[edit]
[-] text-formality-conditional.php
[edit]
[-] non-multisite-conditional.php
[edit]
[-] front-end-conditional.php
[edit]
[-] settings-conditional.php
[edit]
[-] user-can-manage-wpseo-options-conditional.php
[edit]
[-] primary-category-conditional.php
[edit]
[-] schema-blocks-conditional.php
[edit]
[-] wincher-conditional.php
[edit]
[-] user-can-publish-posts-and-pages-conditional.php
[edit]
[-] updated-importer-framework-conditional.php
[edit]
[-] premium-active-conditional.php
[edit]
[+]
admin
[-] yoast-admin-and-dashboard-conditional.php
[edit]
[-] get-request-conditional.php
[edit]
[-] import-tool-selected-conditional.php
[edit]
[-] premium-inactive-conditional.php
[edit]
[-] headless-rest-endpoints-enabled-conditional.php
[edit]
[-] development-conditional.php
[edit]
[-] woocommerce-conditional.php
[edit]
[-] web-stories-conditional.php
[edit]
[-] jetpack-conditional.php
[edit]
[+]
third-party
[-] robots-txt-conditional.php
[edit]
[-] no-tool-selected-conditional.php
[edit]
[-] admin-conditional.php
[edit]
[+]
..
[-] indexables-page-conditional.php
[edit]
[-] migrations-conditional.php
[edit]
[-] yoast-tools-page-conditional.php
[edit]
[-] xmlrpc-conditional.php
[edit]
[-] wincher-automatically-track-conditional.php
[edit]
[-] new-settings-ui-conditional.php
[edit]
[-] open-graph-conditional.php
[edit]
[-] should-index-links-conditional.php
[edit]
[-] addon-installation-conditional.php
[edit]
[-] no-conditionals-trait.php
[edit]
[-] news-conditional.php
[edit]
[-] wincher-enabled-conditional.php
[edit]