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


PHP WP_User_Query::__construct方法代码示例

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


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

示例1: WishListMemberUserSearch

 function WishListMemberUserSearch($search_term = '', $page = '', $role = '', $ids = 'no longer used', $sortby = '', $sortorder = '', $howmany = 15, $more_filters = array())
 {
     if (empty($page)) {
         $page = 1;
     }
     $query = array('offset' => ($page - 1) * $howmany, 'role' => $role, 'number' => $howmany, 'orderby' => $sortby, 'order' => $sortorder, 'fields' => 'ID');
     //add search term if not empty
     if (trim($search_term) != "") {
         $query['search'] = '*' . trim($search_term) . '*';
         $query['search_columns'] = array('user_login', 'user_nicename', 'user_email');
     }
     $this->SortOrder = $sortorder ? $sortorder : 'ASC';
     $this->search_term = $search_term;
     $this->users_per_page = $howmany;
     $this->total_users = $this->total_users_for_query;
     $this->additional_filters = $more_filters;
     parent::__construct($query);
 }
开发者ID:brooklyntri,项目名称:btc-plugins,代码行数:18,代码来源:UserSearch_WP31.php

示例2: GuestParty

 function GuestParty($party_id)
 {
     parent::__construct(array('fields' => 'all_with_meta', 'meta_key' => '_wedding_party', 'meta_value' => $party_id));
     $this->num_guests = count($this->results);
     foreach ($this->results as $user) {
         $user = new WeddingGuest($user->ID);
         if ($user->_attending_wedding == '1') {
             $this->attending_wedding++;
         }
         if ($user->_attending_dinner == '1') {
             $this->attending_dinner++;
         }
         if ($user->has_responded) {
             $this->num_responded++;
         }
     }
     $this->guests = $this->results;
     $do_not_unset = array('num_guests', 'num_responded', 'attending_wedding', 'attending_dinner', 'guests');
     foreach ($this as $key => $val) {
         if (!in_array($key, $do_not_unset)) {
             unset($this->{$key});
         }
     }
 }
开发者ID:ryanbagwell,项目名称:Wordpress-Weddings,代码行数:24,代码来源:class.guests.php

示例3: array

 function __construct($query = null)
 {
     add_action('pre_user_query', array(&$this, 'filter_registered_users_only'));
     parent::__construct($query);
 }
开发者ID:kd5ytx,项目名称:Empirical-Wordpress,代码行数:5,代码来源:group-invites.php


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