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


PHP FrmAppHelper::remove_get_action方法代碼示例

本文整理匯總了PHP中FrmAppHelper::remove_get_action方法的典型用法代碼示例。如果您正苦於以下問題:PHP FrmAppHelper::remove_get_action方法的具體用法?PHP FrmAppHelper::remove_get_action怎麽用?PHP FrmAppHelper::remove_get_action使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在FrmAppHelper的用法示例。


在下文中一共展示了FrmAppHelper::remove_get_action方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: route

 public static function route($action)
 {
     add_filter('frm_entry_stop_action_route', '__return_true');
     add_action('frm_load_form_hooks', 'FrmHooksController::trigger_load_form_hooks');
     FrmAppHelper::trigger_hook_load('form');
     switch ($action) {
         case 'create':
             return self::create();
         case 'edit':
             return self::edit();
         case 'update':
             return self::update();
         case 'duplicate':
             return self::duplicate();
         case 'new':
             return self::new_entry();
         default:
             $action = FrmAppHelper::get_param('action', '', 'get', 'sanitize_text_field');
             if ($action == -1) {
                 $action = FrmAppHelper::get_param('action2', '', 'get', 'sanitize_title');
             }
             if (strpos($action, 'bulk_') === 0) {
                 FrmAppHelper::remove_get_action();
                 return self::bulk_actions($action);
             }
             return FrmEntriesController::display_list();
     }
 }
開發者ID:swc-dng,項目名稱:swcsandbox,代碼行數:28,代碼來源:FrmProEntriesController.php

示例2: route

 public static function route()
 {
     $action = isset($_REQUEST['frm_action']) ? 'frm_action' : 'action';
     $vars = array();
     if (isset($_POST['frm_compact_fields'])) {
         FrmAppHelper::permission_check('frm_edit_forms');
         $json_vars = htmlspecialchars_decode(nl2br(stripslashes(str_replace('"', '\\\\"', $_POST['frm_compact_fields']))));
         $json_vars = json_decode($json_vars, true);
         if (empty($json_vars)) {
             // json decoding failed so we should return an error message
             $action = FrmAppHelper::get_param($action, '', 'get', 'sanitize_title');
             if ('edit' == $action) {
                 $action = 'update';
             }
             add_filter('frm_validate_form', 'FrmFormsController::json_error');
         } else {
             $vars = FrmAppHelper::json_to_array($json_vars);
             $action = $vars[$action];
             unset($_REQUEST['frm_compact_fields'], $_POST['frm_compact_fields']);
             $_REQUEST = array_merge($_REQUEST, $vars);
             $_POST = array_merge($_POST, $_REQUEST);
         }
     } else {
         $action = FrmAppHelper::get_param($action, '', 'get', 'sanitize_title');
         if (isset($_REQUEST['delete_all'])) {
             // override the action for this page
             $action = 'delete_all';
         }
     }
     add_action('frm_load_form_hooks', 'FrmHooksController::trigger_load_form_hooks');
     FrmAppHelper::trigger_hook_load('form');
     switch ($action) {
         case 'new':
             return self::new_form($vars);
         case 'create':
         case 'edit':
         case 'update':
         case 'duplicate':
         case 'trash':
         case 'untrash':
         case 'destroy':
         case 'delete_all':
         case 'settings':
         case 'update_settings':
             return self::$action($vars);
         default:
             do_action('frm_form_action_' . $action);
             if (apply_filters('frm_form_stop_action_' . $action, false)) {
                 return;
             }
             $action = FrmAppHelper::get_param('action', '', 'get', 'sanitize_text_field');
             if ($action == -1) {
                 $action = FrmAppHelper::get_param('action2', '', 'get', 'sanitize_title');
             }
             if (strpos($action, 'bulk_') === 0) {
                 FrmAppHelper::remove_get_action();
                 return self::list_form();
             }
             return self::display_forms_list();
     }
 }
開發者ID:swc-dng,項目名稱:swcsandbox,代碼行數:61,代碼來源:FrmFormsController.php

示例3: test_remove_get_action

 /**
  * @covers FrmAppHelper::remove_get_action
  */
 function test_remove_get_action()
 {
     $_GET['action'] = 'bulk_trash';
     $start_url = $_SERVER['REQUEST_URI'] = admin_url('admin.php?page=formidable&action=bulk_trash');
     FrmAppHelper::remove_get_action();
     $new_url = FrmAppHelper::get_server_value('REQUEST_URI');
     $this->assertNotEquals($new_url, $start_url);
 }
開發者ID:rbkhrlstn,項目名稱:formidable-forms,代碼行數:11,代碼來源:test_FrmAppHelper.php


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