Changeset 7308 for trunk/bp-activity/bp-activity-classes.php
- Timestamp:
- 07/25/2013 02:28:28 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-activity/bp-activity-classes.php
r7228 r7308 26 26 var $is_spam; 27 27 28 function __construct( $id = false ) {28 public function __construct( $id = false ) { 29 29 if ( !empty( $id ) ) { 30 30 $this->id = $id; … … 33 33 } 34 34 35 function populate() {35 public function populate() { 36 36 global $wpdb, $bp; 37 37 … … 56 56 } 57 57 58 function save() {59 global $wpdb, $bp , $current_user;58 public function save() { 59 global $wpdb, $bp; 60 60 61 61 $this->id = apply_filters_ref_array( 'bp_activity_id_before_save', array( $this->id, &$this ) ); … … 113 113 * @return array 114 114 */ 115 function get( $args = array() ) {115 public static function get( $args = array() ) { 116 116 global $wpdb, $bp; 117 117 … … 350 350 * @since BuddyPress (1.2) 351 351 */ 352 function get_specific( $activity_ids, $max = false, $page = 1, $per_page = 25, $sort = 'DESC', $display_comments = false ) {352 public static function get_specific( $activity_ids, $max = false, $page = 1, $per_page = 25, $sort = 'DESC', $display_comments = false ) { 353 353 _deprecated_function( __FUNCTION__, '1.5', 'Use BP_Activity_Activity::get() with the "in" parameter instead.' ); 354 354 return BP_Activity_Activity::get( $max, $page, $per_page, $sort, false, false, $display_comments, false, false, $activity_ids ); 355 355 } 356 356 357 function get_id( $user_id, $component, $type, $item_id, $secondary_item_id, $action, $content, $date_recorded ) {357 public static function get_id( $user_id, $component, $type, $item_id, $secondary_item_id, $action, $content, $date_recorded ) { 358 358 global $bp, $wpdb; 359 359 … … 392 392 } 393 393 394 function delete( $args) {394 public static function delete( $args = array() ) { 395 395 global $wpdb, $bp; 396 396 … … 467 467 } 468 468 469 function delete_activity_item_comments( $activity_ids = array() ) {469 public static function delete_activity_item_comments( $activity_ids = array() ) { 470 470 global $bp, $wpdb; 471 471 … … 475 475 } 476 476 477 function delete_activity_meta_entries( $activity_ids = array() ) {477 public static function delete_activity_meta_entries( $activity_ids = array() ) { 478 478 global $bp, $wpdb; 479 479 … … 496 496 * @since BuddyPress (1.2) 497 497 */ 498 function append_comments( $activities, $spam = 'ham_only' ) { 499 global $wpdb; 500 498 public static function append_comments( $activities, $spam = 'ham_only' ) { 501 499 $activity_comments = array(); 502 500 … … 528 526 * @since BuddyPress (1.2) 529 527 */ 530 function get_activity_comments( $activity_id, $left, $right, $spam = 'ham_only', $top_level_parent_id = 0 ) {528 public static function get_activity_comments( $activity_id, $left, $right, $spam = 'ham_only', $top_level_parent_id = 0 ) { 531 529 global $wpdb, $bp; 532 530 … … 585 583 } 586 584 587 function rebuild_activity_comment_tree( $parent_id, $left = 1 ) {585 public static function rebuild_activity_comment_tree( $parent_id, $left = 1 ) { 588 586 global $wpdb, $bp; 589 587 … … 609 607 } 610 608 611 function get_child_comments( $parent_id ) {609 public static function get_child_comments( $parent_id ) { 612 610 global $bp, $wpdb; 613 611 … … 620 618 * @return array 621 619 */ 622 function get_recorded_components() {620 public static function get_recorded_components() { 623 621 global $wpdb, $bp; 624 622 return $wpdb->get_col( "SELECT DISTINCT component FROM {$bp->activity->table_name} ORDER BY component ASC" ); 625 623 } 626 624 627 function get_sitewide_items_for_feed( $limit = 35 ) { 628 global $bp; 629 625 public static function get_sitewide_items_for_feed( $limit = 35 ) { 630 626 $activities = bp_activity_get_sitewide( array( 'max' => $limit ) ); 631 627 $activity_feed = array(); … … 642 638 } 643 639 644 function get_in_operator_sql( $field, $items ) {640 public static function get_in_operator_sql( $field, $items ) { 645 641 global $wpdb; 646 642 … … 666 662 } 667 663 668 function get_filter_sql( $filter_array ) {664 public static function get_filter_sql( $filter_array ) { 669 665 670 666 $filter_sql = array(); … … 706 702 } 707 703 708 function get_last_updated() {704 public static function get_last_updated() { 709 705 global $bp, $wpdb; 710 706 … … 712 708 } 713 709 714 function total_favorite_count( $user_id ) {710 public static function total_favorite_count( $user_id ) { 715 711 if ( !$favorite_activity_entries = bp_get_user_meta( $user_id, 'bp_favorite_activities', true ) ) 716 712 return 0; … … 719 715 } 720 716 721 function check_exists_by_content( $content ) {717 public static function check_exists_by_content( $content ) { 722 718 global $wpdb, $bp; 723 719 … … 725 721 } 726 722 727 function hide_all_for_user( $user_id ) {723 public static function hide_all_for_user( $user_id ) { 728 724 global $wpdb, $bp; 729 725
Note: See TracChangeset
for help on using the changeset viewer.