BP\u搜索::加载\u搜索\u帮助程序()
描述
来源
文件:bp-search/classes/class-bp-search.php
公共函数load_search_helpers(){global$bp;//加载helper类型父类require_一次($bp->plugin_dir.'bp search/classes/class bp search types.php');//加载并逐个关联helpers if(bp_is_search_post_type_enable('post')){require_一次($bp->plugin_dir.'bp search/classes/class bp search posts.php'))$this->search_helpers['posts']=新的Bp_search_posts('post','posts');$this->search_items[]='posts'}如果(Bp_是搜索_post类型启用('page')){require_一次($Bp->plugin dir。'Bp search/classes/class Bp search posts.php');$this->search_helpers['pages]=新的Bp_search_posts('page','pages pages}如果(Bp_是活动的('forums'))&&bp_是搜索_发布类型_启用('forum'){require_once('bp->plugin_dir.'bp search/classes/class-bp search-bbpress.php');if(bp_是搜索_发布类型_启用('forum'){require_once('bp->plugin dir.'bp search/classes/class-bp search-bbpress-forums.php');$this->search-search-helpers['forum']=bp_搜索论坛::实例()$this->searchable_items[]=“forum”;}if(bp_是搜索_-post_-type_-enable('topic')){require_一次($bp->plugin_-dir。'bp-search/classes/class-bp-search-bbpress-forums-topics.php');$this->search_-helpers['topic']=bp_-search_-bbpress-topics::instance();$this->可搜索_-post[]=“topic'}if(bp_是搜索_-search-post-type-type{require_once($bp->plugin_dir.'bp search/classes/class bp search bbpress forums repress.php');$this->search_helpers['reply']=bp_search_bbpress_repress::instance();$this->search_items[]='reply'}//如果(bp_是搜索_成员_enable()){需要_,请检查BuddyPress是否处于活动状态($bp->plugin_dir.'bp search/classes/class-bp search members.php');$this->search_helpers['members']=bp_search_members::instance();$this->search\u items[]='members'}如果(bp_处于活动状态('groups')&&bp_处于搜索组启用状态()){require once_一次($bp->plugin_dir.bp search/classes/class-bp search-groups.php');$this搜索帮助程序['groups']=Bp_Search_groups::instance();$this->Search/classes/class Bp Search activities.php');$this->Search helpers['activity']=Bp_Search_activities::instance(){Bp_是活动('activity')&&Bp_是活动('activity')&&Bp_Search_是活动)\\ enable(){require once_一次($Bp->plugin dir Bp Search/classes/class/class-Bp Search-Search-Search-activities.php');$this->se='activity';if(bp_is_search_activity_comments_enable()){require_once($bp->plugin_dir.'bp search/classes/class bp search activity comments.php');$this->search_helpers['activity_comment']=bp_search_activity_comment::instance();$this->search_items[]='activity_comment'}/***钩住为其他搜索类型加载帮助器类。*/$additional\u search\u helpers=apply\u筛选器('bp\u search\u additional\u search\u helpers',array());if(!empty($additional\u search\u helpers)){foreach($search\u type=>$helper\u object)所有帮助器类必须从bp\u search\u类型继承*/if(!isset($this->search\u helpers[$search\u type])&&is\u a($helper\u object,'BP\u search\u type')){$this->search\u helpers[$search\u type]=$helper\u object;}}
变更日志
版本 | 描述 |
---|---|
BuddyBoss 1.0.0 | 介绍。 |