
|
Server : Apache System : Linux 182.49.167.72.host.secureserver.net 4.18.0-553.92.1.el8_10.x86_64 #1 SMP Wed Jan 14 06:31:58 EST 2026 x86_64 User : kikai ( 1014) PHP Version : 8.3.30 Disable Function : NONE Directory : /home/kikai/public_html/wp-content/plugins/wordpress-seo/src/helpers/ |
Upload File : |
<?php
namespace Yoast\WP\SEO\Helpers;
/**
* A helper object for site environment.
*/
class Environment_Helper {
/**
* Determines if the site is running on production.
*
* @return bool True if WordPress is currently running on production, false for all other environments.
*/
public function is_production_mode() {
// phpcs:ignore Yoast.NamingConventions.ValidHookName.WrongPrefix -- existing hook.
$override = \apply_filters( 'yoast_seo_development_mode', false );
if ( $override ) {
return true;
}
return $this->get_wp_environment() === 'production';
}
/**
* Determines on which environment WordPress is running.
*
* @return string The current WordPress environment.
*/
public function get_wp_environment() {
return \wp_get_environment_type();
}
}