This commit is contained in:
Javier Casares 2026-08-24 11:35:56 +00:00
commit 5cd5900111
12 changed files with 68 additions and 70 deletions

View file

@ -66,11 +66,19 @@ if ( ! class_exists( 'AI_Translator_Manager_Notice' ) ) {
/**
* Returns whether Manager (by ROBOTSTXT) is installed and active.
*
* Uses the ecosystem presence constant (Manager 1.6.2+) and falls back
* to a plugin-list scan for older Manager versions.
*
* @since 1.2.2
* @since 1.2.3 Added the ROBOTSTXT_MANAGER_NOTICED presence-constant check.
*
* @return bool True when Manager is present and activated.
*/
public function is_manager_active() {
if ( defined( 'ROBOTSTXT_MANAGER_NOTICED' ) && ROBOTSTXT_MANAGER_NOTICED ) {
return true;
}
if ( ! function_exists( 'get_plugins' ) ) {
require_once ABSPATH . 'wp-admin/includes/plugin.php';
}