Codex

Function Reference/check admin referer

Contents

Description

Tests if the current request was referred from an admin page, or (given $action parameter) if the current request carries a valid nonce. Used to avoid security exploits.

Usage

<?php check_admin_referer$action$query_arg ?>

Parameters

$action
(string) (defaults to int -1) Action nonce
Default: -1
$query_arg
(string) (optional) where to look for nonce in $_REQUEST (since 2.5)
Default: '_wpnonce'

Return Values

(??) 
Function dies if not referred from admin page, returns boolean true if it was.
This page is marked as incomplete. You can help Codex by expanding it.

Examples

 <?php check_admin_referer('bcn_admin_options'); ?> 

Change Log

Since: 1.2.0

Related