BP_Admin_Setting_Search

主要搜索设置类。

描述

文件:bp-core /管理/设置/ bp-admin-setting-search.php

class BP_Admin_Setting_Search extends BP_Admin_Setting_tab {public function initialize() {$this->tab_label = __('Search', 'buddyboss');$ this - > tab_name =“bp-search”;$ this - > tab_order = 80;} public function is_active() {return bp_is_active('search');}公共函数register_fields() {$sections = bp_search_get_settings_sections();foreach ((array) $sections as $section_id => $section){//如果section有字段,只添加section和字段$fields = bp_search_get_settings_fields_for_section($section_id);If (empty($fields)){继续;} //添加section $this->add_section($section_id, $section['title'], $section['callback']);$field_id => $field) {if (!空($field['callback']) && ! empty( $field['title'] ) ) { $sanitize_callback = isset( $field['sanitize_callback'] ) ? $field['sanitize_callback'] : []; $args = isset( $field['args'] ) ? $field['args'] : array(); $this->add_field( $field_id, $field['title'], $field['callback'], $sanitize_callback, $args ); } } } } }

更新日志

更新日志
版本 描述
BuddyBoss 1.0.0 介绍了。

方法

问题吗?

我们总是很乐意帮助您解决代码或其他问题!搜索我们的开发人员文档联络支持,或与我们联系销售团队