Changeset 6121
- Timestamp:
- 06/19/2012 01:27:00 PM (14 years ago)
- File:
-
- 1 edited
-
trunk/bp-core/bp-core-classes.php (modified) (25 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-core/bp-core-classes.php
r6022 r6121 125 125 * @param boolean $populate_extras Whether to fetch extra information such as group/friendship counts or not. 126 126 */ 127 publicfunction __construct( $user_id, $populate_extras = false ) {127 function __construct( $user_id, $populate_extras = false ) { 128 128 if ( !empty( $user_id ) ) { 129 129 $this->id = $user_id; … … 148 148 * @uses bp_profile_last_updated_date() Returns the last updated date for a user. 149 149 */ 150 privatefunction populate() {150 function populate() { 151 151 152 152 if ( bp_is_active( 'xprofile' ) ) … … 181 181 * Populates extra fields such as group and friendship counts. 182 182 */ 183 privatefunction populate_extras() {183 function populate_extras() { 184 184 185 185 if ( bp_is_active( 'friends' ) ) { … … 193 193 } 194 194 195 privatefunction get_profile_data() {195 function get_profile_data() { 196 196 return BP_XProfile_ProfileData::get_all_for_user( $this->id ); 197 197 } … … 199 199 /** Static Methods ********************************************************/ 200 200 201 public staticfunction get_users( $type, $limit = 0, $page = 1, $user_id = 0, $include = false, $search_terms = false, $populate_extras = true, $exclude = false, $meta_key = false, $meta_value = false ) {201 function get_users( $type, $limit = 0, $page = 1, $user_id = 0, $include = false, $search_terms = false, $populate_extras = true, $exclude = false, $meta_key = false, $meta_value = false ) { 202 202 global $wpdb, $bp; 203 203 … … 392 392 * @static 393 393 */ 394 public staticfunction get_users_by_letter( $letter, $limit = null, $page = 1, $populate_extras = true, $exclude = '' ) {394 function get_users_by_letter( $letter, $limit = null, $page = 1, $populate_extras = true, $exclude = '' ) { 395 395 global $bp, $wpdb; 396 396 … … 454 454 * @static 455 455 */ 456 public staticfunction get_specific_users( $user_ids, $limit = null, $page = 1, $populate_extras = true ) {456 function get_specific_users( $user_ids, $limit = null, $page = 1, $populate_extras = true ) { 457 457 global $wpdb; 458 458 … … 499 499 * @static 500 500 */ 501 public staticfunction search_users( $search_terms, $limit = null, $page = 1, $populate_extras = true ) {501 function search_users( $search_terms, $limit = null, $page = 1, $populate_extras = true ) { 502 502 global $bp, $wpdb; 503 503 … … 543 543 * @static 544 544 */ 545 public staticfunction get_user_extras( &$paged_users, &$user_ids, $type = false ) {545 function get_user_extras( &$paged_users, &$user_ids, $type = false ) { 546 546 global $bp, $wpdb; 547 547 … … 623 623 * @static 624 624 */ 625 public staticfunction get_core_userdata( $user_id ) {625 function get_core_userdata( $user_id ) { 626 626 global $wpdb; 627 627 … … 706 706 * @param integer $id 707 707 */ 708 publicfunction __construct( $id = 0 ) {708 function __construct( $id = 0 ) { 709 709 if ( !empty( $id ) ) { 710 710 $this->id = $id; … … 720 720 * @return bool Success or failure 721 721 */ 722 publicfunction save() {722 function save() { 723 723 global $bp, $wpdb; 724 724 … … 748 748 * @global wpdb $wpdb WordPress database object 749 749 */ 750 privatefunction populate() {750 function populate() { 751 751 global $bp, $wpdb; 752 752 … … 764 764 /** Static Methods ********************************************************/ 765 765 766 public staticfunction check_access( $user_id, $notification_id ) {766 function check_access( $user_id, $notification_id ) { 767 767 global $wpdb, $bp; 768 768 … … 780 780 * @static 781 781 */ 782 public staticfunction get_all_for_user( $user_id, $status = 'is_new' ) {782 function get_all_for_user( $user_id, $status = 'is_new' ) { 783 783 global $bp, $wpdb; 784 784 … … 798 798 * @static 799 799 */ 800 public staticfunction delete_for_user_by_type( $user_id, $component_name, $component_action ) {800 function delete_for_user_by_type( $user_id, $component_name, $component_action ) { 801 801 global $bp, $wpdb; 802 802 … … 816 816 * @static 817 817 */ 818 public staticfunction delete_for_user_by_item_id( $user_id, $item_id, $component_name, $component_action, $secondary_item_id = false ) {818 function delete_for_user_by_item_id( $user_id, $item_id, $component_name, $component_action, $secondary_item_id = false ) { 819 819 global $bp, $wpdb; 820 820 … … 834 834 * @static 835 835 */ 836 public staticfunction delete_from_user_by_type( $user_id, $component_name, $component_action ) {836 function delete_from_user_by_type( $user_id, $component_name, $component_action ) { 837 837 global $bp, $wpdb; 838 838 … … 851 851 * @static 852 852 */ 853 public staticfunction delete_all_by_type( $item_id, $component_name, $component_action, $secondary_item_id ) {853 function delete_all_by_type( $item_id, $component_name, $component_action, $secondary_item_id ) { 854 854 global $bp, $wpdb; 855 855 … … 1003 1003 * @return bool False if not allowed 1004 1004 */ 1005 publicfunction __construct( $args = '' ) {1005 function __construct( $args = '' ) { 1006 1006 1007 1007 // Default arguments … … 1107 1107 * @return string 1108 1108 */ 1109 publicfunction contents() {1109 function contents() { 1110 1110 return $this->contents; 1111 1111 } … … 1116 1116 * Output contents of button 1117 1117 */ 1118 publicfunction display() {1118 function display() { 1119 1119 if ( !empty( $this->contents ) ) 1120 1120 echo $this->contents; … … 1138 1138 * @global unknown $wp_embed 1139 1139 */ 1140 publicfunction __construct() {1140 function __construct() { 1141 1141 global $wp_embed; 1142 1142 … … 1187 1187 * @return string The embed HTML on success, otherwise the original URL. 1188 1188 */ 1189 publicfunction shortcode( $attr, $url = '' ) {1189 function shortcode( $attr, $url = '' ) { 1190 1190 if ( empty( $url ) ) 1191 1191 return ''; … … 1252 1252 * @return string The embed HTML on success, otherwise the original URL. 1253 1253 */ 1254 publicfunction parse_oembed( $id, $url, $attr, $rawattr ) {1254 function parse_oembed( $id, $url, $attr, $rawattr ) { 1255 1255 $id = intval( $id ); 1256 1256
Note: See TracChangeset
for help on using the changeset viewer.