本文整理汇总了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;
}
}
}
}
示例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']);
}
}
}
示例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'));
}