Changeset 7308 for trunk/bp-core/bp-core-classes.php
- Timestamp:
- 07/25/2013 02:28:28 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-core/bp-core-classes.php
r7298 r7308 626 626 * @var integer 627 627 */ 628 var$id;628 public $id; 629 629 630 630 /** … … 633 633 * @var string 634 634 */ 635 var$avatar;635 public $avatar; 636 636 637 637 /** … … 640 640 * @var string 641 641 */ 642 var$avatar_thumb;642 public $avatar_thumb; 643 643 644 644 /** … … 647 647 * @var string 648 648 */ 649 var$avatar_mini;649 public $avatar_mini; 650 650 651 651 /** … … 654 654 * @var string 655 655 */ 656 var$fullname;656 public $fullname; 657 657 658 658 /** … … 661 661 * @var string 662 662 */ 663 var$email;663 public $email; 664 664 665 665 /** … … 668 668 * @var string 669 669 */ 670 var$user_url;670 public $user_url; 671 671 672 672 /** … … 675 675 * @var string 676 676 */ 677 var$user_link;677 public $user_link; 678 678 679 679 /** … … 684 684 * @var string 685 685 */ 686 var$last_active;686 public $last_active; 687 687 688 688 /* Extras */ … … 693 693 * @var integer 694 694 */ 695 var$total_friends;695 public $total_friends; 696 696 697 697 /** … … 701 701 * @deprecated No longer used 702 702 */ 703 var$total_blogs;703 public $total_blogs; 704 704 705 705 /** … … 710 710 * @var string 711 711 */ 712 var$total_groups;712 public $total_groups; 713 713 714 714 /** … … 728 728 * @param boolean $populate_extras Whether to fetch extra information such as group/friendship counts or not. 729 729 */ 730 function __construct( $user_id, $populate_extras = false ) {730 public function __construct( $user_id, $populate_extras = false ) { 731 731 if ( !empty( $user_id ) ) { 732 732 $this->id = $user_id; … … 751 751 * @uses bp_profile_last_updated_date() Returns the last updated date for a user. 752 752 */ 753 function populate() {753 private function populate() { 754 754 755 755 if ( bp_is_active( 'xprofile' ) ) … … 784 784 * Populates extra fields such as group and friendship counts. 785 785 */ 786 function populate_extras() {786 private function populate_extras() { 787 787 788 788 if ( bp_is_active( 'friends' ) ) { … … 796 796 } 797 797 798 function get_profile_data() {798 private function get_profile_data() { 799 799 return BP_XProfile_ProfileData::get_all_for_user( $this->id ); 800 800 } … … 802 802 /** Static Methods ********************************************************/ 803 803 804 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 ) {804 public static 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 ) { 805 805 global $wpdb, $bp; 806 806 … … 989 989 * @static 990 990 */ 991 function get_users_by_letter( $letter, $limit = null, $page = 1, $populate_extras = true, $exclude = '' ) {991 public static function get_users_by_letter( $letter, $limit = null, $page = 1, $populate_extras = true, $exclude = '' ) { 992 992 global $bp, $wpdb; 993 993 … … 1054 1054 * @static 1055 1055 */ 1056 function get_specific_users( $user_ids, $limit = null, $page = 1, $populate_extras = true ) {1056 public static function get_specific_users( $user_ids, $limit = null, $page = 1, $populate_extras = true ) { 1057 1057 global $wpdb; 1058 1058 … … 1098 1098 * @static 1099 1099 */ 1100 function search_users( $search_terms, $limit = null, $page = 1, $populate_extras = true ) {1100 public static function search_users( $search_terms, $limit = null, $page = 1, $populate_extras = true ) { 1101 1101 global $bp, $wpdb; 1102 1102 … … 1140 1140 * @static 1141 1141 */ 1142 function get_user_extras( &$paged_users, &$user_ids, $type = false ) {1142 public static function get_user_extras( &$paged_users, &$user_ids, $type = false ) { 1143 1143 global $bp, $wpdb; 1144 1144 … … 1223 1223 * @static 1224 1224 */ 1225 function get_core_userdata( $user_id ) {1225 public static function get_core_userdata( $user_id ) { 1226 1226 global $wpdb; 1227 1227 … … 1248 1248 * @var integer 1249 1249 */ 1250 var$id;1250 public $id; 1251 1251 1252 1252 /** … … 1255 1255 * @var integer 1256 1256 */ 1257 var$item_id;1257 public $item_id; 1258 1258 1259 1259 /** … … 1262 1262 * @var integer 1263 1263 */ 1264 var$secondary_item_id = null;1264 public $secondary_item_id = null; 1265 1265 1266 1266 /** … … 1269 1269 * @var integer 1270 1270 */ 1271 var$user_id;1271 public $user_id; 1272 1272 1273 1273 /** … … 1276 1276 * @var string 1277 1277 */ 1278 var$component_name;1278 public $component_name; 1279 1279 1280 1280 /** … … 1283 1283 * @var string 1284 1284 */ 1285 var$component_action;1285 public $component_action; 1286 1286 1287 1287 /** … … 1290 1290 * @var string 1291 1291 */ 1292 var$date_notified;1292 public $date_notified; 1293 1293 1294 1294 /** … … 1297 1297 * @var boolean 1298 1298 */ 1299 var$is_new;1299 public $is_new; 1300 1300 1301 1301 /** Public Methods ********************************************************/ … … 1306 1306 * @param integer $id 1307 1307 */ 1308 function __construct( $id = 0 ) {1308 public function __construct( $id = 0 ) { 1309 1309 if ( !empty( $id ) ) { 1310 1310 $this->id = $id; … … 1320 1320 * @return bool Success or failure 1321 1321 */ 1322 function save() {1322 public function save() { 1323 1323 global $bp, $wpdb; 1324 1324 … … 1348 1348 * @global wpdb $wpdb WordPress database object 1349 1349 */ 1350 function populate() {1350 private function populate() { 1351 1351 global $bp, $wpdb; 1352 1352 … … 1364 1364 /** Static Methods ********************************************************/ 1365 1365 1366 function check_access( $user_id, $notification_id ) {1366 public static function check_access( $user_id, $notification_id ) { 1367 1367 global $wpdb, $bp; 1368 1368 … … 1380 1380 * @static 1381 1381 */ 1382 function get_all_for_user( $user_id, $status = 'is_new' ) {1382 public static function get_all_for_user( $user_id, $status = 'is_new' ) { 1383 1383 global $bp, $wpdb; 1384 1384 … … 1398 1398 * @static 1399 1399 */ 1400 function delete_for_user_by_type( $user_id, $component_name, $component_action ) {1400 public static function delete_for_user_by_type( $user_id, $component_name, $component_action ) { 1401 1401 global $bp, $wpdb; 1402 1402 … … 1416 1416 * @static 1417 1417 */ 1418 function delete_for_user_by_item_id( $user_id, $item_id, $component_name, $component_action, $secondary_item_id = false ) {1418 public static function delete_for_user_by_item_id( $user_id, $item_id, $component_name, $component_action, $secondary_item_id = false ) { 1419 1419 global $bp, $wpdb; 1420 1420 … … 1434 1434 * @static 1435 1435 */ 1436 function delete_from_user_by_type( $user_id, $component_name, $component_action ) {1436 public static function delete_from_user_by_type( $user_id, $component_name, $component_action ) { 1437 1437 global $bp, $wpdb; 1438 1438 … … 1451 1451 * @static 1452 1452 */ 1453 function delete_all_by_type( $item_id, $component_name, $component_action, $secondary_item_id ) {1453 public static function delete_all_by_type( $item_id, $component_name, $component_action, $secondary_item_id ) { 1454 1454 global $bp, $wpdb; 1455 1455 … … 1713 1713 * @global unknown $wp_embed 1714 1714 */ 1715 function __construct() {1715 public function __construct() { 1716 1716 global $wp_embed; 1717 1717 … … 1762 1762 * @return string The embed HTML on success, otherwise the original URL. 1763 1763 */ 1764 function shortcode( $attr, $url = '' ) {1764 public function shortcode( $attr, $url = '' ) { 1765 1765 if ( empty( $url ) ) 1766 1766 return ''; … … 1827 1827 * @return string The embed HTML on success, otherwise the original URL. 1828 1828 */ 1829 function parse_oembed( $id, $url, $attr, $rawattr ) {1829 public function parse_oembed( $id, $url, $attr, $rawattr ) { 1830 1830 $id = intval( $id ); 1831 1831 … … 1895 1895 * @since BuddyPress (1.7) 1896 1896 */ 1897 function walk( $elements, $max_depth ) {1897 public function walk( $elements, $max_depth ) { 1898 1898 $args = array_slice( func_get_args(), 2 ); 1899 1899 $output = ''; … … 1982 1982 * @since BuddyPress (1.7) 1983 1983 */ 1984 function start_el( &$output, $item, $depth = 0, $args = array(), $id = 0 ) {1984 public function start_el( &$output, $item, $depth = 0, $args = array(), $id = 0 ) { 1985 1985 // If we're someway down the tree, indent the HTML with the appropriate number of tabs 1986 1986 $indent = $depth ? str_repeat( "\t", $depth ) : '';
Note: See TracChangeset
for help on using the changeset viewer.