当前位置: 首页>>代码示例>>PHP>>正文


PHP PBHelper::getPOSTOption方法代码示例

本文整理汇总了PHP中PBHelper::getPOSTOption方法的典型用法代码示例。如果您正苦于以下问题:PHP PBHelper::getPOSTOption方法的具体用法?PHP PBHelper::getPOSTOption怎么用?PHP PBHelper::getPOSTOption使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PBHelper的用法示例。


在下文中一共展示了PBHelper::getPOSTOption方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: adminSaveMetaBox

 function adminSaveMetaBox($postId)
 {
     if ($_POST) {
         if (PBHelper::checkSavePost($postId, PLUGIN_PAGE_BUILDER_CONTEXT . '_team_noncename', 'adminSaveMetaBox') === false) {
             return false;
         }
         $option = PBHelper::getPOSTOption('team');
         $Validation = new PBValidation();
         /***/
         PBHelper::removeUIndex($option, 'team_skill_name', 'team_skill_level', 'team_skill_order');
         $skill = array('team_skill_name' => $option['team_skill_name'], 'team_skill_level' => $option['team_skill_level'], 'team_skill_order' => $option['team_skill_order']);
         unset($option['team_skill_name'], $option['team_skill_level'], $option['team_skill_order']);
         foreach ($skill['team_skill_name'] as $index => $value) {
             if ($Validation->isEmpty($value)) {
                 continue;
             }
             if (!array_key_exists($index, $skill['team_skill_level'])) {
                 continue;
             }
             if (!$Validation->isNumber($skill['team_skill_level'][$index], 1, 100)) {
                 continue;
             }
             $option['team_skill'][] = array('team_skill_name' => $value, 'team_skill_level' => $skill['team_skill_level'][$index], 'team_skill_order' => array_key_exists($index, $skill['team_skill_order']) ? $skill['team_skill_order'][$index] : 0);
         }
         /***/
         PBHelper::removeUIndex($option, 'team_social_name', 'team_social_url', 'team_social_order');
         $social = array('team_social_name' => $option['team_social_name'], 'team_social_url' => $option['team_social_url'], 'team_social_order' => $option['team_social_order']);
         unset($option['team_social_name'], $option['team_social_url'], $option['team_social_order']);
         foreach ($social['team_social_name'] as $index => $value) {
             if (!array_key_exists($value, $this->social)) {
                 continue;
             }
             if (!array_key_exists($index, $social['team_social_url'])) {
                 continue;
             }
             if (!$Validation->isURL($social['team_social_url'][$index])) {
                 continue;
             }
             $option['team_social'][] = array('team_social_name' => $value, 'team_social_url' => $social['team_social_url'][$index], 'team_social_order' => array_key_exists($index, $social['team_social_order']) ? $social['team_social_order'][$index] : 0);
         }
         PBMeta::update($postId, $option);
     }
 }
开发者ID:slavai,项目名称:sadick,代码行数:43,代码来源:PB.Component.Team.class.php


注:本文中的PBHelper::getPOSTOption方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。