%3$s
', esc_attr(self::DISMISS_ACTION), esc_attr(wp_create_nonce(self::DISMISS_ACTION)), esc_html__('New to 3D Viewer? Take the 1-minute guided setup โ it walks you through the file formats you can upload, your viewer defaults, and adding your first 3D model.', '3d-viewer'), esc_url(\BP3DAdmin::setupUrl()), esc_html__('Start Guided Setup', '3d-viewer') ); $this->print_dismiss_script(); } /** * Persist the dismissal when the user clicks the notice's close button. */ public function dismiss(): void { check_ajax_referer(self::DISMISS_ACTION, 'nonce'); if (!current_user_can(Onboarding::CAPABILITY)) { wp_send_json_error(null, 403); } update_user_meta(get_current_user_id(), self::DISMISS_META_KEY, 1); wp_send_json_success(); } /** * Inline script that catches the core "X" dismiss click and reports it * back so the notice does not return on the next page load. */ private function print_dismiss_script(): void { ?>