當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。