Beispiel #1
0
 public function _dismiss_admin_notice()
 {
     Redux_Admin_Notices::dismissAdminNotice();
 }
                    $id = $_GET['id'];
                    $val = $_GET['dismiss'];
                    // Add the dismiss request to the user meta.
                    update_user_meta($userid, 'ignore_' . $id, $val);
                }
            }
        }
        /**
         * dismissAdminNotice - Updates user meta to store dismiss notice preference
         *
         * @since       3.2.0
         * @access      public
         * @return      void
         */
        public static function dismissAdminNoticeAJAX()
        {
            global $current_user;
            if (!wp_verify_nonce($_POST['nonce'], $_POST['id'] . 'nonce')) {
                die(0);
            } else {
                // Get the user id
                $userid = $current_user->ID;
                // Get the notice id
                $id = $_POST['id'];
                // Add the dismiss request to the user meta.
                update_user_meta($userid, 'ignore_' . $id, true);
            }
        }
    }
    Redux_Admin_Notices::load();
}