當前位置: 首頁>>代碼示例>>PHP>>正文


PHP WDWLibrary::verify_nonce方法代碼示例

本文整理匯總了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();
     }
 }
開發者ID:RA2WP,項目名稱:RA2WP,代碼行數:14,代碼來源:BWGControllerUninstall_bwg.php

示例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();
 }
開發者ID:RA2WP,項目名稱:RA2WP,代碼行數:14,代碼來源:BWGControllerBWGShortcode.php

示例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();
     }
 }
開發者ID:ssesto,項目名稱:wordpress-pvc,代碼行數:17,代碼來源:BWGControllerThemes_bwg.php

示例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();
    }
}
開發者ID:benshez,項目名稱:DreamWeddingCeremonies,代碼行數:22,代碼來源:photo-gallery.php


注:本文中的WDWLibrary::verify_nonce方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。