Файловый менеджер - Редактировать - /home/kunzqhe/photostocker/2/conditionals.tar
Назад
admin/licenses-page-conditional.php 0000644 00000001212 15152522766 0013374 0 ustar 00 <?php namespace Yoast\WP\SEO\Conditionals\Admin; use Yoast\WP\SEO\Conditionals\Conditional; /** * Conditional that is only met when current page is the tools page. */ class Licenses_Page_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 !== 'admin.php' ) { return false; } // phpcs:ignore WordPress.Security.NonceVerification -- This is not a form. if ( isset( $_GET['page'] ) && $_GET['page'] === 'wpseo_licenses' ) { return true; } return false; } } admin/posts-overview-or-ajax-conditional.php 0000644 00000000746 15152522766 0015243 0 ustar 00 <?php namespace Yoast\WP\SEO\Conditionals\Admin; use Yoast\WP\SEO\Conditionals\Conditional; /** * Conditional that is only met when on a post overview page or during an ajax request. */ class Posts_Overview_Or_Ajax_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; return $pagenow === 'edit.php' || \wp_doing_ajax(); } } admin/estimated-reading-time-conditional.php 0000644 00000003112 15152522766 0015200 0 ustar 00 <?php namespace Yoast\WP\SEO\Conditionals\Admin; use Yoast\WP\SEO\Conditionals\Conditional; use Yoast\WP\SEO\Helpers\Input_Helper; /** * Conditional that is only when we want the Estimated Reading Time. */ class Estimated_Reading_Time_Conditional implements Conditional { /** * The Post Conditional. * * @var Post_Conditional */ protected $post_conditional; /** * The Input Helper. * * @var Input_Helper */ protected $input_helper; /** * Constructs the Estimated Reading Time Conditional. * * @param Post_Conditional $post_conditional The post conditional. * @param Input_Helper $input_helper The input helper. */ public function __construct( Post_Conditional $post_conditional, Input_Helper $input_helper ) { $this->post_conditional = $post_conditional; $this->input_helper = $input_helper; } /** * Returns whether or not this conditional is met. * * @return bool Whether or not the conditional is met. */ public function is_met() { // Check if we are in our Elementor ajax request (for saving). if ( \wp_doing_ajax() ) { $post_action = $this->input_helper->filter( \INPUT_POST, 'action', \FILTER_SANITIZE_STRING ); if ( $post_action === 'wpseo_elementor_save' ) { return true; } } if ( ! $this->post_conditional->is_met() ) { return false; } // We don't support Estimated Reading Time on the attachment post type. $post_id = (int) $this->input_helper->filter( \INPUT_GET, 'post', \FILTER_SANITIZE_NUMBER_INT ); if ( \get_post_type( $post_id ) === 'attachment' ) { return false; } return true; } } admin/post-conditional.php 0000644 00000001340 15152522766 0011644 0 ustar 00 <?php namespace Yoast\WP\SEO\Conditionals\Admin; use Yoast\WP\SEO\Conditionals\Conditional; /** * Conditional that is only met when on a post edit or new post page. */ class Post_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; // Current page is the creation of a new post (type, i.e. post, page, custom post or attachment). if ( $pagenow === 'post-new.php' ) { return true; } // Current page is the edit page of an existing post (type, i.e. post, page, custom post or attachment). if ( $pagenow === 'post.php' ) { return true; } return false; } } admin/doing-post-quick-edit-save-conditional.php 0000644 00000002167 15152522766 0015743 0 ustar 00 <?php namespace Yoast\WP\SEO\Conditionals\Admin; use Yoast\WP\SEO\Conditionals\Conditional; // phpcs:disable Yoast.NamingConventions.ObjectNameDepth.MaxExceeded -- Base class can't be written shorter without abbreviating. /** * Checks if the post is saved by inline-save. This is the case when doing quick edit. */ class Doing_Post_Quick_Edit_Save_Conditional implements Conditional { /** * Checks if the current request is ajax and the action is inline-save. * * @return bool True when the quick edit action is executed. */ public function is_met() { if ( ! \wp_doing_ajax() ) { return false; } // Do the same nonce check as is done in wp_ajax_inline_save because we hook into that request. if ( ! \check_ajax_referer( 'inlineeditnonce', '_inline_edit', false ) ) { return false; } if ( ! isset( $_POST['action'] ) ) { return false; } $sanitized_action = \sanitize_text_field( \wp_unslash( $_POST['action'] ) ); return ( $sanitized_action === 'inline-save' ); } } // phpcs:enable Yoast.NamingConventions.ObjectNameDepth.MaxExceeded -- Base class can't be written shorter without abbreviating. the-events-calendar-conditional.php 0000644 00000000573 15152522766 0013427 0 ustar 00 <?php namespace Yoast\WP\SEO\Conditionals; /** * Conditional that is only met when The Events Calendar exists. */ class The_Events_Calendar_Conditional implements Conditional { /** * Returns whether or not this conditional is met. * * @return bool Whether or not the conditional is met. */ public function is_met() { return \defined( 'TRIBE_EVENTS_FILE' ); } } web-stories-conditional.php 0000644 00000000670 15152522766 0012037 0 ustar 00 <?php namespace Yoast\WP\SEO\Conditionals; /** * Conditional that is only met when Web Stories are active. */ class Web_Stories_Conditional implements Conditional { /** * Returns `true` when the Web Stories plugins is installed and active. * * @return bool `true` when the Web Stories plugins is installed and active. */ public function is_met() { return \function_exists( '\Google\Web_Stories\get_plugin_instance' ); } } jetpack-conditional.php 0000644 00000000637 15152522766 0011220 0 ustar 00 <?php namespace Yoast\WP\SEO\Conditionals; /** * Conditional that is only met when Jetpack exists. */ class Jetpack_Conditional implements Conditional { /** * Returns `true` when the Jetpack plugin exists on this * WordPress installation. * * @return bool `true` when the Jetpack plugin exists on this WordPress installation. */ public function is_met() { return \class_exists( 'Jetpack' ); } } get-request-conditional.php 0000644 00000000722 15152522766 0012037 0 ustar 00 <?php namespace Yoast\WP\SEO\Conditionals; /** * Conditional that is only met when the current request uses the GET method. */ class Get_Request_Conditional implements Conditional { /** * Returns whether or not this conditional is met. * * @return bool Whether or not the conditional is met. */ public function is_met() { if ( isset( $_SERVER['REQUEST_METHOD'] ) && $_SERVER['REQUEST_METHOD'] === 'GET' ) { return true; } return false; } } wp-robots-conditional.php 0000644 00000000525 15152522766 0011527 0 ustar 00 <?php namespace Yoast\WP\SEO\Conditionals; /** * Class that checks if wp_robots exists. */ class WP_Robots_Conditional implements Conditional { /** * Checks if the wp_robots function exists. * * @return bool True when the wp_robots function exists. */ public function is_met() { return \function_exists( 'wp_robots' ); } } conditional-interface.php 0000644 00000000452 15152522766 0011532 0 ustar 00 <?php namespace Yoast\WP\SEO\Conditionals; /** * Conditional interface, used to prevent integrations from loading. */ interface Conditional { /** * Returns whether or not this conditional is met. * * @return bool Whether or not the conditional is met. */ public function is_met(); } premium-inactive-conditional.php 0000644 00000000611 15152522766 0013045 0 ustar 00 <?php namespace Yoast\WP\SEO\Conditionals; /** * Abstract class for creating conditionals based on feature flags. */ class Premium_Inactive_Conditional implements Conditional { /** * Returns whether or not this conditional is met. * * @return bool Whether or not the conditional is met. */ public function is_met() { return ! \YoastSEO()->helpers->product->is_premium(); } } woocommerce-conditional.php 0000644 00000000634 15152522766 0012113 0 ustar 00 <?php namespace Yoast\WP\SEO\Conditionals; /** * Conditional that is only met when WooCommerce is active. */ class WooCommerce_Conditional implements Conditional { /** * Returns `true` when the WooCommerce plugin is installed and activated. * * @return bool `true` when the WooCommerce plugin is installed and activated. */ public function is_met() { return \class_exists( 'WooCommerce' ); } } no-conditionals-trait.php 0000644 00000000575 15152522766 0011520 0 ustar 00 <?php namespace Yoast\WP\SEO\Conditionals; /** * Trait for integrations that do not have any conditionals. */ trait No_Conditionals { /** * Returns an empty array, meaning no conditionals are required to load whatever uses this trait. * * @return array The conditionals that must be met to load this. */ public static function get_conditionals() { return []; } } xmlrpc-conditional.php 0000644 00000000670 15152522766 0011101 0 ustar 00 <?php namespace Yoast\WP\SEO\Conditionals; /** * Conditional that is met when the current request is an XML-RPC request. */ class XMLRPC_Conditional implements Conditional { /** * Returns whether the current request is an XML-RPC request. * * @return bool `true` when the current request is an XML-RPC request, `false` if not. */ public function is_met() { return ( \defined( 'XMLRPC_REQUEST' ) && \XMLRPC_REQUEST ); } } japanese-support-conditional.php 0000644 00000000667 15152522766 0013102 0 ustar 00 <?php namespace Yoast\WP\SEO\Conditionals; /** * Checks if the YOAST_SEO_JAPANESE_SUPPORT constant is set. */ class Japanese_Support_Conditional extends Feature_Flag_Conditional { /** * 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. */ public function get_feature_flag() { return 'JAPANESE_SUPPORT'; } } third-party/wpml-wpseo-conditional.php 0000644 00000001301 15152522766 0014145 0 ustar 00 <?php namespace Yoast\WP\SEO\Conditionals\Third_Party; use Yoast\WP\SEO\Conditionals\Conditional; /** * Conditional that is met when the Yoast SEO Multilingual plugin, * a glue plugin developed by and for WPML, is active. */ class WPML_WPSEO_Conditional implements Conditional { /** * Path to the Yoast SEO Multilingual plugin file. * * @internal */ const PATH_TO_WPML_WPSEO_PLUGIN_FILE = 'wp-seo-multilingual/plugin.php'; /** * Returns whether or not the Yoast SEO Multilingual plugin is active. * * @return bool Whether or not the Yoast SEO Multilingual plugin is active. */ public function is_met() { return \is_plugin_active( self::PATH_TO_WPML_WPSEO_PLUGIN_FILE ); } } third-party/elementor-activated-conditional.php 0000644 00000000745 15152522766 0016002 0 ustar 00 <?php namespace Yoast\WP\SEO\Conditionals\Third_Party; use Yoast\WP\SEO\Conditionals\Conditional; /** * Conditional that is met when the Elementor plugin is installed and activated. */ class Elementor_Activated_Conditional implements Conditional { /** * Checks if the Elementor plugins is installed and activated. * * @return bool `true` when the Elementor plugin is installed and activated. */ public function is_met() { return \defined( 'ELEMENTOR__FILE__' ); } } third-party/wpml-conditional.php 0000644 00000000627 15152522766 0013024 0 ustar 00 <?php namespace Yoast\WP\SEO\Conditionals\Third_Party; use Yoast\WP\SEO\Conditionals\Conditional; /** * Conditional that is only met when WPML is active. */ class WPML_Conditional implements Conditional { /** * Returns whether or not this conditional is met. * * @return bool Whether or not the conditional is met. */ public function is_met() { return \defined( 'WPML_PLUGIN_FILE' ); } } third-party/w3-total-cache-conditional.php 0000644 00000000747 15152522766 0014563 0 ustar 00 <?php namespace Yoast\WP\SEO\Conditionals\Third_Party; use Yoast\WP\SEO\Conditionals\Conditional; /** * Conditional that is only met when in the admin. */ class W3_Total_Cache_Conditional implements Conditional { /** * Returns whether or not this conditional is met. * * @return bool Whether or not the conditional is met. */ public function is_met() { if ( ! \defined( 'W3TC_DIR' ) ) { return false; } return \function_exists( 'w3tc_objectcache_flush' ); } } third-party/elementor-edit-conditional.php 0000644 00000001612 15152522766 0014755 0 ustar 00 <?php namespace Yoast\WP\SEO\Conditionals\Third_Party; use Yoast\WP\SEO\Conditionals\Conditional; /** * Conditional that is only met when on an Elementor edit page or when the current * request is an ajax request for saving our post meta data. */ class Elementor_Edit_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; // Check if we are on an Elementor edit page. $get_action = \filter_input( \INPUT_GET, 'action', \FILTER_SANITIZE_STRING ); if ( $pagenow === 'post.php' && $get_action === 'elementor' ) { return true; } // Check if we are in our Elementor ajax request. $post_action = \filter_input( \INPUT_POST, 'action', \FILTER_SANITIZE_STRING ); return \wp_doing_ajax() && $post_action === 'wpseo_elementor_save'; } } front-end-conditional.php 0000644 00000000512 15152522766 0011463 0 ustar 00 <?php namespace Yoast\WP\SEO\Conditionals; /** * Conditional that is only met when NOT in the admin. */ class Front_End_Conditional implements Conditional { /** * Returns `true` when NOT on an admin page. * * @return bool `true` when NOT on an admin page. */ public function is_met() { return ! \is_admin(); } } news-conditional.php 0000644 00000000550 15152522766 0010545 0 ustar 00 <?php namespace Yoast\WP\SEO\Conditionals; /** * Conditional that is only met when news SEO is activated. */ class News_Conditional implements Conditional { /** * Returns whether or not this conditional is met. * * @return bool Whether or not the conditional is met. */ public function is_met() { return \defined( 'WPSEO_NEWS_VERSION' ); } } should-index-links-conditional.php 0000644 00000002014 15152522766 0013307 0 ustar 00 <?php namespace Yoast\WP\SEO\Conditionals; use Yoast\WP\SEO\Helpers\Options_Helper; /** * Should_Index_Links_Conditional class. */ class Should_Index_Links_Conditional implements Conditional { /** * The options helper. * * @var Options_Helper */ protected $options_helper; /** * Should_Index_Links_Conditional constructor. * * @param Options_Helper $options_helper The options helper. */ public function __construct( Options_Helper $options_helper ) { $this->options_helper = $options_helper; } /** * Returns `true` when the links on this website should be indexed. * * @return bool `true` when the links on this website should be indexed. */ public function is_met() { $should_index_links = $this->options_helper->get( 'enable_text_link_counter' ); /** * Filter: 'wpseo_should_index_links' - Allows disabling of Yoast's links indexation. * * @api bool To disable the indexation, return false. */ return \apply_filters( 'wpseo_should_index_links', $should_index_links ); } } admin-conditional.php 0000644 00000000513 15152522766 0010660 0 ustar 00 <?php namespace Yoast\WP\SEO\Conditionals; /** * Conditional that is only met when in the admin. */ class Admin_Conditional implements Conditional { /** * Returns whether or not this conditional is met. * * @return bool Whether or not the conditional is met. */ public function is_met() { return \is_admin(); } } migrations-conditional.php 0000644 00000001457 15152522766 0011754 0 ustar 00 <?php namespace Yoast\WP\SEO\Conditionals; use Yoast\WP\SEO\Config\Migration_Status; /** * Class for integrations that depend on having all migrations run. */ class Migrations_Conditional implements Conditional { /** * The migration status. * * @var Migration_Status */ protected $migration_status; /** * Migrations_Conditional constructor. * * @param Migration_Status $migration_status The migration status object. */ public function __construct( Migration_Status $migration_status ) { $this->migration_status = $migration_status; } /** * Returns `true` when all database migrations have been run. * * @return bool `true` when all database migrations have been run. */ public function is_met() { return $this->migration_status->is_version( 'free', \WPSEO_VERSION ); } } feature-flag-conditional.php 0000644 00000001617 15152522766 0012140 0 ustar 00 <?php namespace Yoast\WP\SEO\Conditionals; /** * Abstract class for creating conditionals based on feature flags. */ abstract class Feature_Flag_Conditional implements Conditional { /** * Returns whether or not this conditional is met. * * @return bool Whether or not the conditional is met. */ public function is_met() { $feature_flag = \strtoupper( $this->get_feature_flag() ); return \defined( 'YOAST_SEO_' . $feature_flag ) && \constant( 'YOAST_SEO_' . $feature_flag ) === 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. */ abstract protected function get_feature_flag(); /** * Returns the feature name. * * @return string the name of the feature flag. */ public function get_feature_name() { return $this->get_feature_flag(); } } yoast-tools-page-conditional.php 0000644 00000001012 15152522766 0012772 0 ustar 00 <?php namespace Yoast\WP\SEO\Conditionals; /** * Conditional that is only met when current page is the tools page. */ class Yoast_Tools_Page_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 !== 'admin.php' ) { return false; } if ( isset( $_GET['page'] ) && $_GET['page'] === 'wpseo_tools' ) { return true; } return false; } } schema-blocks-conditional.php 0000644 00000000661 15152522766 0012307 0 ustar 00 <?php namespace Yoast\WP\SEO\Conditionals; /** * Checks if the YOAST_SEO_SCHEMA_BLOCKS constant is set. */ class Schema_Blocks_Conditional extends Feature_Flag_Conditional { /** * 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 'SCHEMA_BLOCKS'; } } primary-category-conditional.php 0000644 00000002022 15152522766 0013063 0 ustar 00 <?php namespace Yoast\WP\SEO\Conditionals; use Yoast\WP\SEO\Helpers\Current_Page_Helper; /** * Conditional that is only met when in frontend or page is a post overview or post add/edit form. */ class Primary_Category_Conditional implements Conditional { /** * The current page helper. * * @var Current_Page_Helper */ private $current_page; /** * Primary_Category_Conditional constructor. * * @param Current_Page_Helper $current_page The current page helper. */ public function __construct( Current_Page_Helper $current_page ) { $this->current_page = $current_page; } /** * Returns `true` when on the frontend, * or when on the post overview, post edit or new post admin page. * * @return bool `true` when on the frontend, or when on the post overview, * post edit or new post admin page. */ public function is_met() { if ( ! \is_admin() ) { return true; } return \in_array( $this->current_page->get_current_admin_page(), [ 'edit.php', 'post.php', 'post-new.php' ], true ); } } headless-rest-endpoints-enabled-conditional.php 0000644 00000001457 15152522766 0015734 0 ustar 00 <?php namespace Yoast\WP\SEO\Conditionals; use Yoast\WP\SEO\Helpers\Options_Helper; /** * Conditional that is only met when the headless rest endpoints are enabled. */ class Headless_Rest_Endpoints_Enabled_Conditional implements Conditional { /** * The options helper. * * @var Options_Helper */ private $options; /** * Headless_Rest_Endpoints_Enabled_Conditional constructor. * * @param Options_Helper $options The options helper. */ public function __construct( Options_Helper $options ) { $this->options = $options; } /** * Returns `true` whether the headless REST endpoints have been enabled. * * @return bool `true` when the headless REST endpoints have been enabled. */ public function is_met() { return $this->options->get( 'enable_headless_rest_endpoints' ); } } development-conditional.php 0000644 00000000601 15152522766 0012110 0 ustar 00 <?php namespace Yoast\WP\SEO\Conditionals; use WPSEO_Utils; /** * Conditional that is only met when in development mode. */ class Development_Conditional implements Conditional { /** * Returns whether or not this conditional is met. * * @return bool Whether or not the conditional is met. */ public function is_met() { return WPSEO_Utils::is_development_mode(); } } open-graph-conditional.php 0000644 00000001330 15152522766 0011626 0 ustar 00 <?php namespace Yoast\WP\SEO\Conditionals; use Yoast\WP\SEO\Helpers\Options_Helper; /** * Conditional that is only met when the Open Graph feature is enabled. */ class Open_Graph_Conditional implements Conditional { /** * The options helper. * * @var Options_Helper */ private $options; /** * Open_Graph_Conditional constructor. * * @param Options_Helper $options The options helper. */ public function __construct( Options_Helper $options ) { $this->options = $options; } /** * Returns `true` when the Open Graph feature is enabled. * * @return bool `true` when the Open Graph feature is enabled. */ public function is_met() { return $this->options->get( 'opengraph' ) === true; } } yoast-admin-and-dashboard-conditional.php 0000644 00000002631 15152522766 0014505 0 ustar 00 <?php 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; // 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 ); } } no-tool-selected-conditional.php 0000644 00000000775 15152522766 0012757 0 ustar 00 <?php namespace Yoast\WP\SEO\Conditionals; /** * Conditional that is only met when current page is not a specific tool's page. */ class No_Tool_Selected_Conditional implements Conditional { /** * Returns whether or not this conditional is met. * * @return bool Whether or not the conditional is met. */ public function is_met() { // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- We just check whether a URL parameter does not exist. return ! isset( $_GET['tool'] ); } } semrush-enabled-conditional.php 0000644 00000001343 15152522766 0012650 0 ustar 00 <?php namespace Yoast\WP\SEO\Conditionals; use Yoast\WP\SEO\Helpers\Options_Helper; /** * Conditional that is only met when the SEMrush integration is enabled. */ class SEMrush_Enabled_Conditional implements Conditional { /** * The options helper. * * @var Options_Helper */ private $options; /** * SEMrush_Enabled_Conditional constructor. * * @param Options_Helper $options The options helper. */ public function __construct( Options_Helper $options ) { $this->options = $options; } /** * Returns whether or not this conditional is met. * * @return bool Whether or not the conditional is met. */ public function is_met() { return $this->options->get( 'semrush_integration_active', false ); } } addon-installation-conditional.php 0000644 00000000666 15152522766 0013365 0 ustar 00 <?php namespace Yoast\WP\SEO\Conditionals; /** * Checks if the Addon_Installation constant is set. */ class Addon_Installation_Conditional extends Feature_Flag_Conditional { /** * 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 'ADDON_INSTALLATION'; } }
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка