| @@ -1,8 +1,8 @@ | ||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | 3 | /** |
| 4 | - * bbPress BuddyPress Activity Class. | |
| 4 | + * bbPress BuddyPress Activity Class | |
| 5 | 5 | * |
| 6 | 6 | * @package bbPress |
| 7 | 7 | * @subpackage BuddyPress |
| 8 | 8 | */ |
| @@ -11,9 +11,9 @@ | ||
| 11 | 11 | defined( 'ABSPATH' ) || exit; |
| 12 | 12 | |
| 13 | 13 | if ( ! class_exists( 'BBP_BuddyPress_Activity' ) ) : |
| 14 | 14 | /** |
| 15 | - * Loads BuddyPress Activity extension. | |
| 15 | + * Loads BuddyPress Activity extension | |
| 16 | 16 | * |
| 17 | 17 | * @since 2.2.0 bbPress (r4394) |
| 18 | 18 | * |
| 19 | 19 | * @package bbPress |
| @@ -23,9 +23,9 @@ | ||
| 23 | 23 | |
| 24 | 24 | /** Variables *************************************************************/ |
| 25 | 25 | |
| 26 | 26 | /** |
| 27 | - * The name of the BuddyPress component, used in activity streams. | |
| 27 | + * The name of the BuddyPress component, used in activity streams | |
| 28 | 28 | * |
| 29 | 29 | * @var string |
| 30 | 30 | */ |
| 31 | 31 | private $component = ''; |
| @@ -30,9 +30,9 @@ | ||
| 30 | 30 | */ |
| 31 | 31 | private $component = ''; |
| 32 | 32 | |
| 33 | 33 | /** |
| 34 | - * Forum Create Activity Action. | |
| 34 | + * Forum Create Activity Action | |
| 35 | 35 | * |
| 36 | 36 | * @var string |
| 37 | 37 | */ |
| 38 | 38 | private $forum_create = ''; |
| @@ -37,9 +37,9 @@ | ||
| 37 | 37 | */ |
| 38 | 38 | private $forum_create = ''; |
| 39 | 39 | |
| 40 | 40 | /** |
| 41 | - * Topic Create Activity Action. | |
| 41 | + * Topic Create Activity Action | |
| 42 | 42 | * |
| 43 | 43 | * @var string |
| 44 | 44 | */ |
| 45 | 45 | private $topic_create = ''; |
| @@ -44,9 +44,9 @@ | ||
| 44 | 44 | */ |
| 45 | 45 | private $topic_create = ''; |
| 46 | 46 | |
| 47 | 47 | /** |
| 48 | - * Topic Close Activity Action. | |
| 48 | + * Topic Close Activity Action | |
| 49 | 49 | * |
| 50 | 50 | * @var string |
| 51 | 51 | */ |
| 52 | 52 | private $topic_close = ''; |
| @@ -51,9 +51,9 @@ | ||
| 51 | 51 | */ |
| 52 | 52 | private $topic_close = ''; |
| 53 | 53 | |
| 54 | 54 | /** |
| 55 | - * Topic Edit Activity Action. | |
| 55 | + * Topic Edit Activity Action | |
| 56 | 56 | * |
| 57 | 57 | * @var string |
| 58 | 58 | */ |
| 59 | 59 | private $topic_edit = ''; |
| @@ -58,9 +58,9 @@ | ||
| 58 | 58 | */ |
| 59 | 59 | private $topic_edit = ''; |
| 60 | 60 | |
| 61 | 61 | /** |
| 62 | - * Topic Open Activity Action. | |
| 62 | + * Topic Open Activity Action | |
| 63 | 63 | * |
| 64 | 64 | * @var string |
| 65 | 65 | */ |
| 66 | 66 | private $topic_open = ''; |
| @@ -65,9 +65,9 @@ | ||
| 65 | 65 | */ |
| 66 | 66 | private $topic_open = ''; |
| 67 | 67 | |
| 68 | 68 | /** |
| 69 | - * Reply Create Activity Action. | |
| 69 | + * Reply Create Activity Action | |
| 70 | 70 | * |
| 71 | 71 | * @var string |
| 72 | 72 | */ |
| 73 | 73 | private $reply_create = ''; |
| @@ -72,9 +72,9 @@ | ||
| 72 | 72 | */ |
| 73 | 73 | private $reply_create = ''; |
| 74 | 74 | |
| 75 | 75 | /** |
| 76 | - * Reply Edit Activity Action. | |
| 76 | + * Reply Edit Activity Action | |
| 77 | 77 | * |
| 78 | 78 | * @var string |
| 79 | 79 | */ |
| 80 | 80 | private $reply_edit = ''; |
| @@ -81,9 +81,9 @@ | ||
| 81 | 81 | |
| 82 | 82 | /** Setup Methods *********************************************************/ |
| 83 | 83 | |
| 84 | 84 | /** |
| 85 | - * The bbPress BuddyPress Activity loader. | |
| 85 | + * The bbPress BuddyPress Activity loader | |
| 86 | 86 | * |
| 87 | 87 | * @since 2.2.0 bbPress (r4394) |
| 88 | 88 | */ |
| 89 | 89 | public function __construct() { |
| @@ -93,9 +93,9 @@ | ||
| 93 | 93 | $this->fully_loaded(); |
| 94 | 94 | } |
| 95 | 95 | |
| 96 | 96 | /** |
| 97 | - * Extension variables. | |
| 97 | + * Extension variables | |
| 98 | 98 | * |
| 99 | 99 | * @since 2.2.0 bbPress (r4394) |
| 100 | 100 | * |
| 101 | 101 | * @access private |
| @@ -119,9 +119,9 @@ | ||
| 119 | 119 | $this->reply_edit = 'bbp_reply_edit'; |
| 120 | 120 | } |
| 121 | 121 | |
| 122 | 122 | /** |
| 123 | - * Setup the actions. | |
| 123 | + * Setup the actions | |
| 124 | 124 | * |
| 125 | 125 | * @since 2.2.0 bbPress (r4394) |
| 126 | 126 | * |
| 127 | 127 | * @access private |
| @@ -144,9 +144,9 @@ | ||
| 144 | 144 | add_action( 'bbp_delete_reply', array( $this, 'reply_delete' ), 10, 1 ); |
| 145 | 145 | } |
| 146 | 146 | |
| 147 | 147 | /** |
| 148 | - * Setup the filters. | |
| 148 | + * Setup the filters | |
| 149 | 149 | * |
| 150 | 150 | * @since 2.2.0 bbPress (r4394) |
| 151 | 151 | * |
| 152 | 152 | * @access private |
| @@ -446,9 +446,9 @@ | ||
| 446 | 446 | && ! bbp_get_password_required_id( $post_id ); |
| 447 | 447 | } |
| 448 | 448 | |
| 449 | 449 | /** |
| 450 | - * Register our activity actions with BuddyPress. | |
| 450 | + * Register our activity actions with BuddyPress | |
| 451 | 451 | * |
| 452 | 452 | * @since 2.2.0 bbPress (r4394) |
| 453 | 453 | */ |
| 454 | 454 | public function register_activity_actions() { |
| @@ -474,15 +474,15 @@ | ||
| 474 | 474 | ); |
| 475 | 475 | } |
| 476 | 476 | |
| 477 | 477 | /** |
| 478 | - * Wrapper for recoding bbPress actions to the BuddyPress activity stream. | |
| 478 | + * Wrapper for recoding bbPress actions to the BuddyPress activity stream | |
| 479 | 479 | * |
| 480 | 480 | * @since 2.2.0 bbPress (r4394) |
| 481 | 481 | * |
| 482 | - * @param array $args Array of arguments for bp_activity_add(). | |
| 482 | + * @param array $args Array of arguments for bp_activity_add() | |
| 483 | 483 | * |
| 484 | - * @return int Activity ID if successful, false if not. | |
| 484 | + * @return int Activity ID if successful, false if not | |
| 485 | 485 | */ |
| 486 | 486 | private function record_activity( $args = array() ) { |
| 487 | 487 | |
| 488 | 488 | // Default activity args |
| @@ -508,15 +508,15 @@ | ||
| 508 | 508 | return bp_activity_add( $activity ); |
| 509 | 509 | } |
| 510 | 510 | |
| 511 | 511 | /** |
| 512 | - * Wrapper for deleting bbPress actions from BuddyPress activity stream. | |
| 512 | + * Wrapper for deleting bbPress actions from BuddyPress activity stream | |
| 513 | 513 | * |
| 514 | 514 | * @since 2.2.0 bbPress (r4394) |
| 515 | 515 | * |
| 516 | - * @param array $args Array of arguments for bp_activity_add(). | |
| 516 | + * @param array $args Array of arguments for bp_activity_add() | |
| 517 | 517 | * |
| 518 | - * @return int Activity ID if successful, false if not. | |
| 518 | + * @return int Activity ID if successful, false if not | |
| 519 | 519 | */ |
| 520 | 520 | public function delete_activity( $args = array() ) { |
| 521 | 521 | |
| 522 | 522 | // Default activity args |
| @@ -536,12 +536,12 @@ | ||
| 536 | 536 | bp_activity_delete_by_item_id( $activity ); |
| 537 | 537 | } |
| 538 | 538 | |
| 539 | 539 | /** |
| 540 | - * Check for an existing activity stream entry for a given post_id. | |
| 540 | + * Check for an existing activity stream entry for a given post_id | |
| 541 | 541 | * |
| 542 | - * @param int $post_id ID of the topic or reply. | |
| 543 | - * @return int if an activity id is verified, false if not. | |
| 542 | + * @param int $post_id ID of the topic or reply | |
| 543 | + * @return int if an activity id is verified, false if not | |
| 544 | 544 | */ |
| 545 | 545 | private static function get_activity_id( $post_id = 0 ) { |
| 546 | 546 | |
| 547 | 547 | // Try to get the activity ID of the post |
| @@ -562,9 +562,9 @@ | ||
| 562 | 562 | return $activity_id; |
| 563 | 563 | } |
| 564 | 564 | |
| 565 | 565 | /** |
| 566 | - * Maybe disable activity stream comments on select actions. | |
| 566 | + * Maybe disable activity stream comments on select actions | |
| 567 | 567 | * |
| 568 | 568 | * @since 2.2.0 bbPress (r4394) |
| 569 | 569 | * |
| 570 | 570 | * @global BP_Activity_Template $activities_template |
| @@ -600,15 +600,15 @@ | ||
| 600 | 600 | return $can_comment; |
| 601 | 601 | } |
| 602 | 602 | |
| 603 | 603 | /** |
| 604 | - * Maybe link directly to topics and replies in activity stream entries. | |
| 604 | + * Maybe link directly to topics and replies in activity stream entries | |
| 605 | 605 | * |
| 606 | 606 | * @since 2.2.0 bbPress (r4394) |
| 607 | 607 | * |
| 608 | 608 | * @param string $link |
| 609 | 609 | * @param mixed $activity_object |
| 610 | - * @return string The link to the activity stream item. | |
| 610 | + * @return string The link to the activity stream item | |
| 611 | 611 | */ |
| 612 | 612 | public function activity_get_permalink( $link = '', $activity_object = false ) { |
| 613 | 613 | |
| 614 | 614 | // Setup the array of actions to link directly to |
| @@ -627,9 +627,9 @@ | ||
| 627 | 627 | |
| 628 | 628 | /** Topics ****************************************************************/ |
| 629 | 629 | |
| 630 | 630 | /** |
| 631 | - * Record an activity stream entry when a topic is created or updated. | |
| 631 | + * Record an activity stream entry when a topic is created or updated | |
| 632 | 632 | * |
| 633 | 633 | * @since 2.2.0 bbPress (r4394) |
| 634 | 634 | * |
| 635 | 635 | * @param int $topic_id |
| @@ -635,9 +635,9 @@ | ||
| 635 | 635 | * @param int $topic_id |
| 636 | 636 | * @param int $forum_id |
| 637 | 637 | * @param array $anonymous_data |
| 638 | 638 | * @param int $topic_author_id |
| 639 | - * @return Bail early if topic is by anonymous user. | |
| 639 | + * @return Bail early if topic is by anonymous user | |
| 640 | 640 | */ |
| 641 | 641 | public function topic_create( $topic_id = 0, $forum_id = 0, $anonymous_data = array(), $topic_author_id = 0 ) { |
| 642 | 642 | |
| 643 | 643 | // Bail early if topic is by anonymous user |
| @@ -712,9 +712,9 @@ | ||
| 712 | 712 | } |
| 713 | 713 | } |
| 714 | 714 | |
| 715 | 715 | /** |
| 716 | - * Delete the activity stream entry when a topic is spammed, trashed, or deleted. | |
| 716 | + * Delete the activity stream entry when a topic is spammed, trashed, or deleted | |
| 717 | 717 | * |
| 718 | 718 | * @param int $topic_id |
| 719 | 719 | */ |
| 720 | 720 | public function topic_delete( $topic_id = 0 ) { |
| @@ -728,13 +728,13 @@ | ||
| 728 | 728 | return false; |
| 729 | 729 | } |
| 730 | 730 | |
| 731 | 731 | /** |
| 732 | - * Update the activity stream entry when a topic status changes. | |
| 732 | + * Update the activity stream entry when a topic status changes | |
| 733 | 733 | * |
| 734 | 734 | * @param int $topic_id |
| 735 | 735 | * @param obj $post |
| 736 | - * @return Bail early if not a topic, or topic is by anonymous user. | |
| 736 | + * @return Bail early if not a topic, or topic is by anonymous user | |
| 737 | 737 | */ |
| 738 | 738 | public function topic_update( $topic_id = 0, $post = null ) { |
| 739 | 739 | |
| 740 | 740 | // Bail early if not a topic |
| @@ -769,9 +769,9 @@ | ||
| 769 | 769 | |
| 770 | 770 | /** Replies ***************************************************************/ |
| 771 | 771 | |
| 772 | 772 | /** |
| 773 | - * Record an activity stream entry when a reply is created. | |
| 773 | + * Record an activity stream entry when a reply is created | |
| 774 | 774 | * |
| 775 | 775 | * @since 2.2.0 bbPress (r4394) |
| 776 | 776 | * |
| 777 | 777 | * @param int $topic_id |
| @@ -777,9 +777,9 @@ | ||
| 777 | 777 | * @param int $topic_id |
| 778 | 778 | * @param int $forum_id |
| 779 | 779 | * @param array $anonymous_data |
| 780 | 780 | * @param int $topic_author_id |
| 781 | - * @return Bail early if topic is by anonymous user. | |
| 781 | + * @return Bail early if topic is by anonymous user | |
| 782 | 782 | */ |
| 783 | 783 | public function reply_create( $reply_id = 0, $topic_id = 0, $forum_id = 0, $anonymous_data = array(), $reply_author_id = 0 ) { |
| 784 | 784 | |
| 785 | 785 | // Do not log activity of anonymous users |
| @@ -858,9 +858,9 @@ | ||
| 858 | 858 | } |
| 859 | 859 | } |
| 860 | 860 | |
| 861 | 861 | /** |
| 862 | - * Delete the activity stream entry when a reply is spammed, trashed, or deleted. | |
| 862 | + * Delete the activity stream entry when a reply is spammed, trashed, or deleted | |
| 863 | 863 | * |
| 864 | 864 | * @param int $reply_id |
| 865 | 865 | */ |
| 866 | 866 | public function reply_delete( $reply_id ) { |
| @@ -874,13 +874,13 @@ | ||
| 874 | 874 | return false; |
| 875 | 875 | } |
| 876 | 876 | |
| 877 | 877 | /** |
| 878 | - * Update the activity stream entry when a reply status changes. | |
| 878 | + * Update the activity stream entry when a reply status changes | |
| 879 | 879 | * |
| 880 | 880 | * @param int $reply_id |
| 881 | 881 | * @param obj $post |
| 882 | - * @return Bail early if not a reply, or reply is by anonymous user. | |
| 882 | + * @return Bail early if not a reply, or reply is by anonymous user | |
| 883 | 883 | */ |
| 884 | 884 | public function reply_update( $reply_id, $post ) { |
| 885 | 885 | |
| 886 | 886 | // Bail early if not a reply |