includes/Admin/class-admin-notices.php
Admin notices: activation issues, cache conflicts, onboarding.
Class Admin_Notices
Admin notices handler.
class Admin_NoticesConstants
| Constant | Visibility | Value | Line |
|---|---|---|---|
COMPETING_CACHE_PLUGINS | private | array( \'wp-super-cache/wp-cache.php\' => \'WP Super Cache\', \'w3-total-cache/w3-total-cache.php\' => \'W3 Total Cache\', \'wp-fastest-cache/wpFastestCache.php\' => \'WP Fastest Cache\', \'litespeed-cache/litespeed-cache.php\' => \'LiteSpeed Cache\', \'cache-enabler/cache-enabler.php\' => \'Cache Enabler\', \'sg-cachepress/sg-cachepress.php\' => \'SG Optimizer\', \'wp-rocket/wp-rocket.php\' => \'WP Rocket\', \'comet-cache/comet-cache.php\' => \'Comet Cache\', \'swift-performance-lite/performance.php\' => \'Swift Performance Lite\', \'swift-performance/performance.php\' => \'Swift Performance\', ) | 27 |
Properties
| Property | Visibility | Type | Default | Line |
|---|---|---|---|---|
$circuit_state_memo | private static | array|null | null | 50 |
$circuit_state_memo_set | private static | bool | false | 58 |
$dropin_memo | private static | bool|null | null | 70 |
publicstatic reset_memo_cache_for_tests()
public static function reset_memo_cache_for_tests(): voidReset the per-request memos (unit-test helper).
Return: void.
privatestatic is_notice_screen()
private static function is_notice_screen(): boolWhether the current admin screen is one of the allowed notice screens.
Return: bool — True when the notice I/O may run.
public __construct()
public function __construct()Register hooks.
public handle_dismiss()
public function handle_dismiss(): voidDismiss notices via query arg + nonce.
Return: void.
public render_notices()
public function render_notices(): voidOutput notices.
Return: void.
private maybe_activation_notices()
private function maybe_activation_notices(): voidOne-time notices from activation (wp-config, foreign drop-in).
Return: void.
private maybe_htaccess_failure_notice()
private function maybe_htaccess_failure_notice(): voidPersistent .htaccess failure warning — a write failed verification.
Return: void.
private maybe_object_cache_circuit_notice()
private function maybe_object_cache_circuit_notice(): voidObject-cache circuit-breaker warning — the drop-in auto-disabled.
Return: void.
private maybe_nginx_redis_config_notice()
private function maybe_nginx_redis_config_notice(): voidNginx Redis-config exposure warning.
Return: void.
private maybe_litespeed_coexistence_notice()
private function maybe_litespeed_coexistence_notice(): voidLiteSpeed coexistence warning — when both plugins active in auto mode.
Return: void.
private maybe_avif_webp_only_notice()
private function maybe_avif_webp_only_notice(): voidWebP-only fallback notice — AVIF requested but no encoder available.
Return: void.
private maybe_competing_plugins_notice()
private function maybe_competing_plugins_notice(): voidWarn when another page-cache plugin is active alongside this one.
Return: void.
private maybe_builder_purge_notice()
private function maybe_builder_purge_notice(): voidSuccess notice after a builder-update purge (issue #907).
Return: void.
private maybe_review_notice()
private function maybe_review_notice(): voidDisplay a gentle review request prompt after 7 days of active plugin use.
Return: void.
privatestatic get_active_plugin_files()
private static function get_active_plugin_files(): arrayActive plugin paths for the current site.
Return: string[].