get_admin_notices()->get_new_notice( self::BULK_UPDATED, $text, self::GROUP ); $new_notice->set_hideable( true ); $new_notice->set_css_class_types( 'notice-success' ); $this->get_admin_notices()->add_notice( $new_notice ); } /** * Add action to remove updated notice after display */ public function remove_bulk_updated_notice_after_display() { add_action( 'admin_notices', array( $this, 'remove_bulk_updated_notice' ), PHP_INT_MAX ); } /** * Remove bulk_updated notice */ public function remove_bulk_updated_notice() { $this->get_admin_notices()->remove_notice( self::GROUP, self::BULK_UPDATED ); } /** * @return WPML_Notices */ private function get_admin_notices() { if ( ! $this->admin_notices ) { $this->admin_notices = wpml_get_admin_notices(); } return $this->admin_notices; } }