id : ''; if (strpos($id, 'allaccessible') === false && $id !== 'dashboard') return false; if (!class_exists('AllAccessible_StatementPage')) return false; $state = get_option(self::OPTION, array()); return self::evaluate(array( 'can_manage' => true, 'screen_id' => $id, 'has_account' => (bool) get_option('aacb_accountID'), 'dismissed' => !empty($state['dismissed_at']) || (bool) get_option(self::LEGACY_OPTION), 'status' => AllAccessible_StatementPage::status(), )); } private static function on_plugin_screen() { $screen = function_exists('get_current_screen') ? get_current_screen() : null; return $screen && strpos((string) $screen->id, 'allaccessible') !== false; } /** * admin_notices path: WordPress Dashboard home only. Plugin screens hide * every core notice (SettingsPage inline CSS), so there the Overview * calls render_inline() instead. */ public static function maybe_render() { if (self::on_plugin_screen() || !self::should_show()) return; self::render(false); } /** Overview callout, printed by SettingsPage right under the page header. */ public static function render_inline() { if (!self::should_show()) return; self::render(true); } private static function render($inline) { $url = admin_url('admin.php?page=allaccessible#aacb-statement-card'); $nonce = wp_create_nonce(self::AJAX_ACTION); $ajax = admin_url('admin-ajax.php'); $title = __('New in 2.2: your accessibility statement page.', 'allaccessible'); $body = __('We draft it from your AllAccessible statement, you publish it, and the accessibility menu links visitors to it.', 'allaccessible'); if ($inline) : ?>