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


PHP Redux_Helpers::recursive_array_search方法代码示例

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


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

示例1: isFieldInUse

 public static function isFieldInUse($parent, $field)
 {
     foreach ($parent->sections as $k => $section) {
         if (!isset($section['title'])) {
             continue;
         }
         if (isset($section['fields']) && !empty($section['fields'])) {
             if (Redux_Helpers::recursive_array_search($field, $section['fields'])) {
                 return true;
                 continue;
             }
         }
     }
 }
开发者ID:Typikall,项目名称:memotsix,代码行数:14,代码来源:class.redux_helpers.php

示例2: in_field

 public function in_field()
 {
     foreach ($this->parent->sections as $k => $section) {
         if (!isset($section['title'])) {
             continue;
         }
         if (false == $this->is_field && isset($section['fields']) && !empty($section['fields'])) {
             $this->is_field = Redux_Helpers::recursive_array_search('import_export', $section['fields']);
         }
     }
 }
开发者ID:evinw,项目名称:project_gg_studios,代码行数:11,代码来源:import_export.php

示例3: _options_page

 /**
  * Class Options Page Function, creates main options page.
  * @since       1.0.0
  * @access      public
  * @return void
  */
 function _options_page()
 {
     if ($this->args['menu_type'] == 'submenu') {
         $this->page = add_submenu_page($this->args['page_parent'], $this->args['page_title'], $this->args['menu_title'], $this->args['page_permissions'], $this->args['page_slug'], array(&$this, '_options_page_html'));
     } else {
         $this->page = add_menu_page($this->args['page_title'], $this->args['menu_title'], $this->args['page_permissions'], $this->args['page_slug'], array(&$this, '_options_page_html'), $this->args['menu_icon'], $this->args['page_priority']);
         if (true === $this->args['allow_sub_menu']) {
             if (!isset($section['type']) || $section['type'] != 'divide') {
                 foreach ($this->sections as $k => $section) {
                     if (!isset($section['title'])) {
                         continue;
                     }
                     if (false == $this->import_export->is_field) {
                         $this->import_export->is_field = Redux_Helpers::recursive_array_search('import_export', $section['fields']);
                     }
                     if (isset($section['submenu']) && $section['submenu'] == false) {
                         continue;
                     }
                     add_submenu_page($this->args['page_slug'], $section['title'], $section['title'], $this->args['page_permissions'], $this->args['page_slug'] . '&tab=' . $k, '__return_null');
                 }
                 // Remove parent submenu item instead of adding null item.
                 remove_submenu_page($this->args['page_slug'], $this->args['page_slug']);
             }
             if (true === $this->args['show_import_export'] && false == $this->import_export->is_field) {
                 $this->import_export->add_submenu();
             }
             if (true === $this->args['dev_mode']) {
                 $this->debug->add_submenu();
             }
             if (true === $this->args['system_info']) {
                 add_submenu_page($this->args['page_slug'], __('System Info', 'redux-framework'), __('System Info', 'redux-framework'), $this->args['page_permissions'], $this->args['page_slug'] . '&tab=system_info_default', '__return_null');
             }
         }
     }
     add_action("load-{$this->page}", array(&$this, '_load_page'));
 }
开发者ID:bluedrone,项目名称:plugins,代码行数:42,代码来源:framework.php


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