false, 'message' => $check->get_error_message(), ); } /** * Wraps wp_is_file_mod_allowed() when available; falls back to the raw * DISALLOW_FILE_MODS constant during very early load. */ private static function file_mods_allowed( string $context ): bool { if ( function_exists( 'wp_is_file_mod_allowed' ) ) { return (bool) wp_is_file_mod_allowed( 'acrossai_core_abilities_' . $context ); } return ! ( defined( 'DISALLOW_FILE_MODS' ) && DISALLOW_FILE_MODS ); } }