class-admin-notices.php

Admin notices: activation issues, cache conflicts, onboarding.

Source includes/Admin/class-admin-notices.php3 min readPart of Performance Optimisation

includes/Admin/class-admin-notices.php

Admin notices: activation issues, cache conflicts, onboarding.

Namespace: PerformanceOptimise\\Inc · Lines: 784

Class Admin_Notices

Admin notices handler.

Source: includes/Admin/class-admin-notices.php, line 20

class Admin_Notices

Constants

ConstantVisibilityValueLine
COMPETING_CACHE_PLUGINSprivatearray( \'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

PropertyVisibilityTypeDefaultLine
$circuit_state_memoprivate staticarray|nullnull50
$circuit_state_memo_setprivate staticboolfalse58
$dropin_memoprivate staticbool|nullnull70

publicstatic reset_memo_cache_for_tests()

public static function reset_memo_cache_for_tests(): void

Reset the per-request memos (unit-test helper).

Return: void.

Tags: @since 2.2.0

Source: includes/Admin/class-admin-notices.php, line 82

privatestatic is_notice_screen()

private static function is_notice_screen(): bool

Whether the current admin screen is one of the allowed notice screens.

Return: bool — True when the notice I/O may run.

Tags: @since 2.2.0

Source: includes/Admin/class-admin-notices.php, line 99

public __construct()

public function __construct()

Register hooks.

Source: includes/Admin/class-admin-notices.php, line 118

public handle_dismiss()

public function handle_dismiss(): void

Dismiss notices via query arg + nonce.

Return: void.

Source: includes/Admin/class-admin-notices.php, line 128

public render_notices()

public function render_notices(): void

Output notices.

Return: void.

Source: includes/Admin/class-admin-notices.php, line 222

private maybe_activation_notices()

private function maybe_activation_notices(): void

One-time notices from activation (wp-config, foreign drop-in).

Return: void.

Source: includes/Admin/class-admin-notices.php, line 243

private maybe_htaccess_failure_notice()

private function maybe_htaccess_failure_notice(): void

Persistent .htaccess failure warning — a write failed verification.

Return: void.

Tags: @since 2.2.0

Source: includes/Admin/class-admin-notices.php, line 306

private maybe_object_cache_circuit_notice()

private function maybe_object_cache_circuit_notice(): void

Object-cache circuit-breaker warning — the drop-in auto-disabled.

Return: void.

Tags: @since 2.0.0

Source: includes/Admin/class-admin-notices.php, line 354

private maybe_nginx_redis_config_notice()

private function maybe_nginx_redis_config_notice(): void

Nginx Redis-config exposure warning.

Return: void.

Tags: @since 2.2.0

Source: includes/Admin/class-admin-notices.php, line 439

private maybe_litespeed_coexistence_notice()

private function maybe_litespeed_coexistence_notice(): void

LiteSpeed coexistence warning — when both plugins active in auto mode.

Return: void.

Tags: @since 2.0.0

Source: includes/Admin/class-admin-notices.php, line 502

private maybe_avif_webp_only_notice()

private function maybe_avif_webp_only_notice(): void

WebP-only fallback notice — AVIF requested but no encoder available.

Return: void.

Tags: @since 2.2.0

Source: includes/Admin/class-admin-notices.php, line 551

private maybe_competing_plugins_notice()

private function maybe_competing_plugins_notice(): void

Warn when another page-cache plugin is active alongside this one.

Return: void.

Source: includes/Admin/class-admin-notices.php, line 597

private maybe_builder_purge_notice()

private function maybe_builder_purge_notice(): void

Success notice after a builder-update purge (issue #907).

Return: void.

Tags: @since 2.0.0

Source: includes/Admin/class-admin-notices.php, line 650

private maybe_review_notice()

private function maybe_review_notice(): void

Display a gentle review request prompt after 7 days of active plugin use.

Return: void.

Source: includes/Admin/class-admin-notices.php, line 695

privatestatic get_active_plugin_files()

private static function get_active_plugin_files(): array

Active plugin paths for the current site.

Return: string[].

Source: includes/Admin/class-admin-notices.php, line 761