本文整理汇总了PHP中WDWLibrary::verify_nonce方法的典型用法代码示例。如果您正苦于以下问题:PHP WDWLibrary::verify_nonce方法的具体用法?PHP WDWLibrary::verify_nonce怎么用?PHP WDWLibrary::verify_nonce使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WDWLibrary
的用法示例。
在下文中一共展示了WDWLibrary::verify_nonce方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: execute
public function execute()
{
$task = isset($_POST['task']) ? esc_html(stripslashes($_POST['task'])) : '';
if ($task != '') {
if (!WDWLibrary::verify_nonce('uninstall_bwg')) {
die('Sorry, your nonce did not verify.');
}
}
if (method_exists($this, $task)) {
$this->{$task}();
} else {
$this->display();
}
}
示例2: execute
public function execute()
{
$task = WDWLibrary::get('task');
$from_menu = isset($_GET['page']) && esc_html($_GET['page']) == 'BWGShortcode' ? TRUE : FALSE;
if ($task != '' && $from_menu) {
if (!WDWLibrary::verify_nonce('BWGShortcode')) {
die('Sorry, your nonce did not verify.');
}
}
if (method_exists($this, $task)) {
$this->{$task}();
}
$this->display();
}
示例3: execute
public function execute()
{
$task = WDWLibrary::get('task');
$id = WDWLibrary::get('current_id', 0);
$message = WDWLibrary::get('message');
if ($task != '') {
if (!WDWLibrary::verify_nonce('themes_bwg')) {
die('Sorry, your nonce did not verify.');
}
}
echo WDWLibrary::message_id($message);
if (method_exists($this, $task)) {
$this->{$task}($id);
} else {
$this->display();
}
}
示例4: bwg_ajax
function bwg_ajax()
{
if (function_exists('current_user_can')) {
if (!current_user_can('manage_options')) {
die('Access Denied');
}
} else {
die('Access Denied');
}
global $wpdb;
require_once WD_BWG_DIR . '/framework/WDWLibrary.php';
$page = WDWLibrary::get('action');
if ($page != '' && ($page == 'BWGShortcode' || $page == 'addAlbumsGalleries' || $page == 'editThumb' || $page == 'addTags')) {
if (!WDWLibrary::verify_nonce($page) && $page != 'BWGShortcode') {
die('Sorry, your nonce did not verify.');
}
require_once WD_BWG_DIR . '/admin/controllers/BWGController' . ucfirst($page) . '.php';
$controller_class = 'BWGController' . ucfirst($page);
$controller = new $controller_class();
$controller->execute();
}
}