self::is_dismissed( self::POINTER_ADMIN_MENU_NAME ), 'settings_is_dismissed' => self::is_dismissed( self::POINTER_ADMIN_MENU_SETTINGS_NAME ), 'menu_name' => self::POINTER_ADMIN_MENU_NAME, 'settings_menu_name' => self::POINTER_ADMIN_MENU_SETTINGS_NAME, 'content_title' => esc_html__( 'Admin Notices Manager', 'admin-notices-manager' ), 'content_text' => esc_html__( 'From now onward, all the admin notices will be displayed here.', 'admin-notices-manager' ), 'first_element_id' => 'wp-admin-bar-anm_notification_count', 'second_element_id' => 'menu-settings', 'second_content_title' => esc_html__( 'Configure the Admin Notices Manager', 'admin-notices-manager' ), 'second_content_text' => esc_html__( 'Configure how the plugin handles different types of admin notices from the Settings > Admin Notices menu item.', 'admin-notices-manager' ), ) ); } /** * Checks if the user already dismissed the message * * @param string $pointer - Name of the pointer to check. * * @return boolean * * @since 1.6.0 */ public static function is_dismissed( string $pointer ): bool { $dismissed = array_filter( explode( ',', (string) \get_user_meta( \get_current_user_id(), 'dismissed_wp_pointers', true ) ) ); return \in_array( $pointer, (array) $dismissed, true ); } } }