PATH:
var
/
www
/
clients
/
client1
/
web1
/
web
/
wp-content
/
wordpress-seo
/
src
/
conditionals
<?php namespace Yoast\WP\SEO\Conditionals; /** * Conditional that is only met when on the front end or Yoast file editor page. */ class Robots_Txt_Conditional implements Conditional { /** * Holds the Front_End_Conditional instance. * * @var Front_End_Conditional */ protected $front_end_conditional; /** * Constructs the class. * * @param Front_End_Conditional $front_end_conditional The front end conditional. */ public function __construct( Front_End_Conditional $front_end_conditional ) { $this->front_end_conditional = $front_end_conditional; } /** * Returns whether or not this conditional is met. * * @return bool Whether or not the conditional is met. */ public function is_met() { return $this->front_end_conditional->is_met() || $this->is_file_editor_page(); } /** * Returns whether the current page is the file editor page. * * This checks for two locations: * - Multisite network admin file editor page * - Single site file editor page (under tools) * * @return bool */ protected function is_file_editor_page() { global $pagenow; if ( $pagenow !== 'admin.php' ) { return false; } // phpcs:ignore WordPress.Security.NonceVerification -- This is not a form. if ( isset( $_GET['page'] ) && $_GET['page'] === 'wpseo_files' && \is_multisite() && \is_network_admin() ) { return true; } // phpcs:ignore WordPress.Security.NonceVerification -- This is not a form. if ( ! ( isset( $_GET['page'] ) && $_GET['page'] === 'wpseo_tools' ) ) { return false; } // phpcs:ignore WordPress.Security.NonceVerification -- This is not a form. if ( isset( $_GET['tool'] ) && $_GET['tool'] === 'file-editor' ) { return true; } return false; } }
[-] 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]