PluginProbe
Yoast SEO – Advanced SEO with real-time guidance and built-in AI / trunk
Yoast SEO – Advanced SEO with real-time guidance and built-in AI vtrunk
28.5 28.4 28.3 28.2 28.1 28.0 27.9 27.8 27.7 27.6 27.5 trunk 18.0 18.1 18.2 18.3 18.4 18.4.1 18.5 18.5.1 18.6 18.7 18.8 18.9 19.0 All 129 releases
← All changes | src/conditionals/yoast-admin-and-dashboard-conditional.php +6 -1 18.4.1 → trunk View file →
@@ -1,5 +1,5 @@
1 -<?php
1 +<?php // phpcs:ignore Yoast.Files.FileName.InvalidClassFileName -- Reason: this explicitly concerns the Yoast admin and dashboard.
2 2
3 3 namespace Yoast\WP\SEO\Conditionals;
4 4
5 5 /**
@@ -13,8 +13,13 @@
13 13 * @return bool `true` when on the admin dashboard, update or Yoast SEO pages.
14 14 */
15 15 public function is_met() {
16 16 global $pagenow;
17 +
18 + // Bail out early if we're not on the front-end.
19 + if ( ! \is_admin() ) {
20 + return false;
21 + }
17 22
18 23 // Do not output on plugin / theme upgrade pages or when WordPress is upgrading.
19 24 if ( ( \defined( 'IFRAME_REQUEST' ) && \IFRAME_REQUEST ) || $this->on_upgrade_page() || \wp_installing() ) {
20 25 return false;