Skip to:
Content

BuddyPress.org

Changeset 9833


Ignore:
Timestamp:
05/03/2015 06:51:25 PM (11 years ago)
Author:
tw2113
Message:

First pass at cleanup of Activity component documetnation.

See #6396.

Location:
trunk/src/bp-activity
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-activity/bp-activity-actions.php

    r9819 r9833  
    167167         *
    168168         * @param int $activity_id The activity ID.
    169          * @param int $user_id The user associated with the activity.
     169         * @param int $user_id     The user associated with the activity.
    170170         */
    171171        do_action( 'bp_activity_before_action_delete_activity', $activity_id, $activity->user_id );
     
    183183         *
    184184         * @param int $activity_id The activity ID.
    185          * @param int $user_id The user associated with the activity.
     185         * @param int $user_id     The user associated with the activity.
    186186         */
    187187        do_action( 'bp_activity_action_delete_activity', $activity_id, $activity->user_id );
     
    201201 *
    202202 * @param int $activity_id Activity id to be deleted. Defaults to 0.
     203 *
    203204 * @return bool False on failure.
    204205 */
     
    235236         *
    236237         * @param int    $activity_id Activity ID to be marked as spam.
    237          * @param object $activity Activity object for the ID to be marked as spam.
     238         * @param object $activity    Activity object for the ID to be marked as spam.
    238239         */
    239240        do_action( 'bp_activity_before_action_spam_activity', $activity->id, $activity );
     
    252253         *
    253254         * @param int $activity_id Activity ID that was marked as spam.
    254          * @param int $user_id User ID associated with activity.
     255         * @param int $user_id     User ID associated with activity.
    255256         */
    256257        do_action( 'bp_activity_action_spam_activity', $activity_id, $activity->user_id );
     
    299300         * @since BuddyPress (1.2.0)
    300301         *
    301          * @param string $whats-new Activity message being posted.
     302         * @param string $value Activity message being posted.
    302303         */
    303304        $content = apply_filters( 'bp_activity_post_update_content', $_POST['whats-new'] );
     
    310311                 * @since BuddyPress (1.2.0)
    311312                 *
    312                  * @param string $whats-new-post-object Item type to associate with.
     313                 * @param string $value Item type to associate with.
    313314                 */
    314315                $object = apply_filters( 'bp_activity_post_update_object', $_POST['whats-new-post-object'] );
     
    322323                 * @since BuddyPress (1.2.0)
    323324                 *
    324                  * @param string $whats-new-post-in Chosen component to post activity to.
     325                 * @param string $value Chosen component to post activity to.
    325326                 */
    326327                $item_id = apply_filters( 'bp_activity_post_update_item_id', $_POST['whats-new-post-in'] );
     
    350351                 * @since BuddyPress (1.2.0)
    351352                 *
    352                  * @param string $object Activity item being associated to.
     353                 * @param string $object  Activity item being associated to.
    353354                 * @param string $item_id Component ID being posted to.
    354355                 * @param string $content Activity content being posted.
     
    399400         * @since BuddyPress (1.2.0)
    400401         *
    401          * @param string $comment_form_id ID of the activity being replied to.
     402         * @param string $value ID of the activity being replied to.
    402403         */
    403404        $activity_id = apply_filters( 'bp_activity_post_comment_activity_id', $_POST['comment_form_id'] );
     
    408409         * @since BuddyPress (1.2.0)
    409410         *
    410          * @param string $ac_input_activity_id Comment content being posted.
     411         * @param string $value Comment content being posted.
    411412         */
    412413        $content = apply_filters( 'bp_activity_post_comment_content', $_POST['ac_input_' . $activity_id] );
     
    729730         * @since BuddyPress (1.6.0)
    730731         *
    731          * @param bool bp_is_akismet_active Return value of bp_is_akismet_active boolean function.
     732         * @param bool $value Return value of bp_is_akismet_active boolean function.
    732733         */
    733734        if ( ! apply_filters( 'bp_activity_use_akismet', bp_is_akismet_active() ) )
  • trunk/src/bp-activity/bp-activity-admin.php

    r9819 r9833  
    5353 *
    5454 * @param array $custom_menus The list of top-level BP menu items.
     55 *
    5556 * @return array $custom_menus List of top-level BP menu items, with Activity added
    5657 */
     
    139140 * @since BuddyPress (1.6.0)
    140141 *
    141  * @param string $value Will always be false unless another plugin filters it
    142  *        first.
    143  * @param string $option Screen option name.
     142 * @param string $value     Will always be false unless another plugin filters it first.
     143 * @param string $option    Screen option name.
    144144 * @param string $new_value Screen option form value.
     145 *
    145146 * @return string Option value. False to abandon update.
    146147 */
     
    162163 * @since BuddyPress (1.6.0)
    163164 *
     165 * @param array     $hidden Array of items to hide.
    164166 * @param WP_Screen $screen Screen identifier.
     167 *
    165168 * @return array Hidden Meta Boxes.
    166169 */
     
    194197 * @since BuddyPress (1.6.0)
    195198 *
    196  * @global object $bp BuddyPress global settings.
     199 * @global object                 $bp                    BuddyPress global settings.
    197200 * @global BP_Activity_List_Table $bp_activity_list_table Activity screen list table.
    198201 */
     
    412415                 * @since BuddyPress (1.6.0)
    413416                 *
    414                  * @param array  Array holding spam, not spam, deleted counts, error IDs.
    415                  * @param string $redirect_to URL to redirect to.
     417                 * @param array  $value        Array holding spam, not spam, deleted counts, error IDs.
     418                 * @param string $redirect_to  URL to redirect to.
    416419                 * @param array  $activity_ids Original array of activity IDs.
    417420                 */
     
    640643         * @since BuddyPress (1.6.0)
    641644         *
    642          * @param array Array holding single activity object.
     645         * @param array $value Array holding single activity object that was passed by reference.
    643646         */
    644647        do_action_ref_array( 'bp_activity_admin_edit', array( &$activity ) ); ?>
     
    889892 * @since BuddyPress (1.6.0)
    890893 *
    891  * @global BP_Activity_List_Table $bp_activity_list_table Activity screen list
    892  *         table.
    893  * @global string $plugin_page The current plugin page.
     894 * @global BP_Activity_List_Table $bp_activity_list_table Activity screen list table.
     895 * @global string                 $plugin_page            The current plugin page.
    894896 */
    895897function bp_activity_admin_index() {
     
    12891291                         *
    12901292                         * @param string $url_base Current URL base for view.
    1291                          * @param string $view Current view being displayed.
     1293                         * @param string $view     Current view being displayed.
    12921294                         */
    12931295                        do_action( 'bp_activity_list_table_get_views', $url_base, $this->view ); ?>
     
    15221524                 *
    15231525                 * @param array $actions Array of available actions user could use.
    1524                  * @param array $item Current item being added to page.
     1526                 * @param array $item    Current item being added to page.
    15251527                 */
    15261528                $actions = apply_filters( 'bp_activity_admin_comment_row_actions', array_filter( $actions ), $item );
     
    15741576                 * @since BuddyPress (1.6.0)
    15751577                 *
    1576                  * @param array Array of default activity types.
    1577                  * @param array $item Current item being displayed.
     1578                 * @param array $value Array of default activity types.
     1579                 * @param array $item  Current item being displayed.
    15781580                 */
    15791581                if ( empty( $item['item_id'] ) || ! in_array( $item['type'], apply_filters( 'bp_activity_admin_root_activity_types', array( 'activity_comment' ), $item ) ) ) {
     
    16061608         *
    16071609         * @param int $activity_id Activity ID to retrieve User ID for.
     1610         *
    16081611         * @return int User ID of the activity item in question.
    16091612         */
     
    16461649         *
    16471650         * @param array $item An array version of the BP_Activity_Activity object.
     1651         *
    16481652         * @return bool
    16491653         */
     
    17101714         *
    17111715         * @param array $tree Source array.
     1716         *
    17121717         * @return array Flattened array.
    17131718         */
  • trunk/src/bp-activity/bp-activity-akismet.php

    r9819 r9833  
    7272         * @since BuddyPress (1.6.0)
    7373         *
    74          * @param array $actions The hover links.
     74         * @param array $actions  The hover links.
    7575         * @param array $activity The activity for the current row being processed.
     76         *
    7677         * @return array The hover links.
    7778         */
     
    163164         * @see bp_dtheme_post_update()
    164165         *
    165          * @param string $content Activity update text.
    166          * @param int $user_id User ID.
    167          * @param int $activity_id Activity ID.
     166         * @param string $content     Activity update text.
     167         * @param int    $user_id    User ID.
     168         * @param int    $activity_id Activity ID.
    168169         */
    169170        public function check_member_activity_update( $content, $user_id, $activity_id ) {
     
    263264         * @since BuddyPress (1.6.0)
    264265         *
    265          * @param BP_Activity_Activity $activity
    266          * @param string $source Either "by_a_person" (e.g. a person has manually marked the activity as spam) or "by_akismet" (automatically spammed).
     266         * @param BP_Activity_Activity $activity Activity item being spammed.
     267         * @param string               $source   Either "by_a_person" (e.g. a person has
     268         *                                       manually marked the activity as spam) or
     269         *                                       "by_akismet" (automatically spammed).
    267270         */
    268271        public function mark_as_spam( $activity, $source ) {
     
    276279                 *
    277280                 * @param BP_Activity_Activity $activity Activity object being marked as spam.
    278                  * @param string $source Source of the whom marked as spam. Either "by_a_person" (e.g. a person has manually marked the activity as spam) or "by_akismet".
     281                 * @param string               $source   Source of the whom marked as spam.
     282                 *                                       Either "by_a_person" (e.g. a person has
     283                 *                                       manually marked the activity as spam)
     284                 *                                       or "by_akismet".
    279285                 */
    280286                do_action( 'bp_activity_akismet_mark_as_spam', $activity, $source );
     
    286292         * @since BuddyPress (1.6.0)
    287293         *
    288          * @param BP_Activity_Activity $activity
    289          * @param string $source Either "by_a_person" (e.g. a person has manually marked the activity as ham) or "by_akismet" (automatically hammed).
     294         * @param BP_Activity_Activity $activity Activity item being hammed.
     295         * @param string               $source   Either "by_a_person" (e.g. a person has
     296         *                                       manually marked the activity as ham) or
     297         *                                       "by_akismet" (automatically hammed).
    290298         */
    291299        public function mark_as_ham( $activity, $source ) {
     
    300308                 *
    301309                 * @param BP_Activity_Activity $activity Activity object being marked as ham.
    302                  * @param string $source Source of the whom marked as ham. Either "by_a_person" (e.g. a person has manually marked the activity as ham) or "by_akismet" (automatically hammed).
     310                 * @param string               $source   Source of the whom marked as ham.
     311                 *                                       Either "by_a_person" (e.g. a person has
     312                 *                                       manually marked the activity as ham) or
     313                 *                                       "by_akismet" (automatically hammed).
    303314                 */
    304315                do_action( 'bp_activity_akismet_mark_as_ham', $activity, $source );
     
    314325         *
    315326         * @param BP_Activity_Activity $activity Activity item data.
     327         *
     328         * @return array
    316329         */
    317330        public static function build_akismet_data_package( $activity ) {
     
    348361                 * @since BuddyPress (1.6.0)
    349362                 *
    350                  * @param array $activity_data Array of activity data for Akismet to inspect.
    351                  * @param BP_Activity_Activity $activity Activity item data.
     363                 * @param array                $activity_data Array of activity data for Akismet to inspect.
     364                 * @param BP_Activity_Activity $activity      Activity item data.
    352365                 */
    353366                return apply_filters( 'bp_akismet_build_akismet_data_package', $activity_data, $activity );
     
    392405                         * @since BuddyPress (1.6.0)
    393406                         *
    394                          * @param BP_Activity_Activity $activity The activity item proven to be spam.
    395                          * @param array $activity_data Array of activity data for item including Akismet check results data.
     407                         * @param BP_Activity_Activity $activity      The activity item proven to be spam.
     408                         * @param array                $activity_data Array of activity data for item including
     409                         *                                            Akismet check results data.
    396410                         */
    397411                        do_action_ref_array( 'bp_activity_akismet_spam_caught', array( &$activity, $activity_data ) );
     
    485499         * @global string $akismet_api_port
    486500         *
    487          * @param array $activity_data Packet of information to submit to Akismet.
    488          * @param string $check "check" or "submit".
    489          * @param string $spam "spam" or "ham".
     501         * @param array  $activity_data Packet of information to submit to Akismet.
     502         * @param string $check         "check" or "submit".
     503         * @param string $spam          "spam" or "ham".
     504         *
    490505         * @return array $activity_data Activity data, with Akismet data added.
    491506         */
     
    562577         *
    563578         * @param string $user_agent User agent string, as generated by Akismet.
     579         *
    564580         * @return string $user_agent Modified user agent string.
    565581         */
     
    611627         * @since BuddyPress (1.6.0)
    612628         *
    613          * @param int $activity_id Activity item ID.
    614          * @param string $message Human-readable description of what's changed.
    615          * @param string $event The type of check we were carrying out.
     629         * @param int    $activity_id Activity item ID.
     630         * @param string $message     Human-readable description of what's changed.
     631         * @param string $event       The type of check we were carrying out.
    616632         */
    617633        public function update_activity_history( $activity_id = 0, $message = '', $event = '' ) {
     
    633649         *
    634650         * @param int $activity_id Activity item ID.
     651         *
    635652         * @return array The activity item's Akismet history.
    636653         */
  • trunk/src/bp-activity/bp-activity-cache.php

    r9819 r9833  
    1717 * using querying activitymeta inline.
    1818 *
    19  * @param int|str|array $activity_ids Accepts a single activity ID, or a comma-
    20  *        separated list or array of activity ids
     19 * @param int|string|array|bool $activity_ids Accepts a single activity ID, or a comma-
     20 *                                            separated list or array of activity ids
    2121 */
    2222function bp_activity_update_meta_cache( $activity_ids = false ) {
  • trunk/src/bp-activity/bp-activity-filters.php

    r9819 r9833  
    180180 *
    181181 * @param string $content The activity content.
     182 *
    182183 * @return string $content Filtered activity content.
    183184 */
     
    221222 * @since BuddyPress (1.2.0)
    222223 *
    223  * @param string $content The contents of a given item.
    224  * @param int $activity_id The activity id. Deprecated.
     224 * @param string $content     The contents of a given item.
     225 * @param int    $activity_id The activity id. Deprecated.
     226 *
    225227 * @return string $content Content filtered for mentions.
    226228 */
     
    339341        // Send @mentions and setup BP notifications
    340342        foreach( (array) $usernames as $user_id => $username ) {
     343
    341344                /**
    342345                 * Filters BuddyPress' ability to send email notifications for @mentions.
     
    344347                 * @since BuddyPress (1.6.0)
    345348                 *
    346                  * @param bool  Whether or not BuddyPress should send a notification to the mentioned users.
     349                 * @param bool  $value     Whether or not BuddyPress should send a notification to the mentioned users.
    347350                 * @param array $usernames Array of users potentially notified.
    348351                 */
     
    362365 *
    363366 * @param string $text Activity text.
     367 *
    364368 * @return string $text Text with rel=nofollow added to any links.
    365369 */
     
    373377         * @since BuddyPress (1.2.0)
    374378         *
    375          * @param array $matches
    376          *
    377379         * @param array $matches Items matched by preg_replace_callback() in bp_activity_make_nofollow_filter().
     380         *
    378381         * @return string $text Link with rel=nofollow added
    379382         */
     
    400403 *
    401404 * @param string $text The original activity entry text.
     405 *
    402406 * @return string $excerpt The truncated text.
    403407 */
     
    408412         * Provides a filter that lets you choose whether to skip this filter on a per-activity basis.
    409413         *
    410          * @param bool $maybe_truncate_text If true, text should be checked to see if it needs truncating.
    411414         * @since BuddyPress (2.3.0)
     415         *
     416         * @param bool $value If true, text should be checked to see if it needs truncating.
    412417         */
    413418        $maybe_truncate_text = apply_filters(
     
    457462         * @since BuddyPress (1.5.0)
    458463         *
    459          * @param string $excerpt Excerpt text and markup to be displayed.
    460          * @param string $text The original activity entry text.
     464         * @param string $excerpt     Excerpt text and markup to be displayed.
     465         * @param string $text        The original activity entry text.
    461466         * @param string $append_text The final append text applied.
    462467         */
     
    472477 *
    473478 * @param array $js_handles The original dependencies.
     479 *
    474480 * @return array $js_handles The new dependencies.
    475481 */
     
    492498 *
    493499 * @param string $classes
     500 *
    494501 * @return string $classes
    495502 */
     
    511518 *
    512519 * @param string $classes
     520 *
    513521 * @return string $classes
    514522 */
     
    540548 * @param array $response
    541549 * @param array $data
     550 *
    542551 * @return array $response
    543552 */
     
    601610 *
    602611 * @param array $strings Localized strings.
     612 *
    603613 * @return array $strings
    604614 */
     
    661671 * @since BuddyPress (2.2.0)
    662672 *
    663  * @param array $retval Empty array by default
    664  * @param array $filter Current activity arguments
     673 * @param array $retval Empty array by default.
     674 * @param array $filter Current activity arguments.
     675 *
    665676 * @return array
    666677 */
     
    710721 * @since BuddyPress (2.2.0)
    711722 *
    712  * @param array $retval Empty array by default
    713  * @param array $filter Current activity arguments
     723 * @param array $retval Empty array by default.
     724 * @param array $filter Current activity arguments.
     725 *
    714726 * @return array
    715727 */
     
    767779 * @since BuddyPress (2.2.0)
    768780 *
    769  * @param array $retval Empty array by default
    770  * @param array $filter Current activity arguments
     781 * @param array $retval Empty array by default.
     782 * @param array $filter Current activity arguments.
     783 *
    771784 * @return array
    772785 */
  • trunk/src/bp-activity/bp-activity-functions.php

    r9819 r9833  
    6161 * mentions suggestions?
    6262 *
     63 * @since BuddyPress (2.1.0)
     64 *
    6365 * @return bool True if mentions scripts should be loaded.
    64  * @since BuddyPress (2.1.0)
    6566 */
    6667function bp_activity_maybe_load_mentions_scripts() {
     
    7374         * @since BuddyPress (2.1.0)
    7475         *
    75          * @param bool $load_mentions True to load mentions assets, false otherwise.
     76         * @param bool $load_mentions    True to load mentions assets, false otherwise.
    7677         * @param bool $mentions_enabled True if mentions are enabled.
    7778         */
     
    8586 *
    8687 * @param string $content The content of the activity, usually found in
    87  *        $activity->content.
     88 *                        $activity->content.
     89 *
    8890 * @return array|bool Associative array with user ID as key and username as
    89  *         value. Boolean false if no mentions found.
     91 *                    value. Boolean false if no mentions found.
    9092 */
    9193function bp_activity_find_mentions( $content ) {
     
    148150 * @uses bp_activity_update_mention_count_for_user()
    149151 *
    150  * @param int $activity_id The unique id for the activity item.
    151  * @param string $action Can be 'delete' or 'add'. Defaults to 'add'.
     152 * @param int    $activity_id The unique id for the activity item.
     153 * @param string $action      Can be 'delete' or 'add'. Defaults to 'add'.
     154 *
     155 * @return bool
    152156 */
    153157function bp_activity_adjust_mention_count( $activity_id = 0, $action = 'add' ) {
     
    186190 * @uses bp_update_user_meta()
    187191 *
    188  * @param int $user_id The user ID.
    189  * @param int $activity_id The unique ID for the activity item.
    190  * @param string $action 'delete' or 'add'. Default: 'add'.
     192 * @param int    $user_id     The user ID.
     193 * @param int    $activity_id The unique ID for the activity item.
     194 * @param string $action      'delete' or 'add'. Default: 'add'.
     195 *
    191196 * @return bool
    192197 */
     
    239244 *
    240245 * @since BuddyPress (1.9.0)
     246 *
     247 * @param int|string $user_id ID of the user to get @-mention name for.
    241248 *
    242249 * @return string User name appropriate for @-mentions.
     
    316323 * @since BuddyPress (1.1.0)
    317324 *
    318  * @param  string   $component_id    The unique string ID of the component.
    319  * @param  string   $type            The action type.
    320  * @param  string   $description     The action description.
    321  * @param  callable $format_callback Callback for formatting the action string.
    322  * @param  string   $label           String to describe this action in the activity stream filter dropdown.
    323  * @param  array    $context         Optional. Activity stream contexts where the filter should appear.
    324  *                                   Values: 'activity', 'member', 'member_groups', 'group'
    325  * @param  int      $position        Optional. The position of the action when listed in dropdowns.
     325 * @param  string        $component_id    The unique string ID of the component.
     326 * @param  string        $type            The action type.
     327 * @param  string        $description     The action description.
     328 * @param  callable|bool $format_callback Callback for formatting the action string.
     329 * @param  string|bool   $label           String to describe this action in the activity stream filter dropdown.
     330 * @param  array         $context         Optional. Activity stream contexts where the filter should appear.
     331 *                                        Values: 'activity', 'member', 'member_groups', 'group'
     332 * @param  int           $position        Optional. The position of the action when listed in dropdowns.
     333 *
    326334 * @return bool False if any param is empty, otherwise true.
    327335 */
     
    353361         * @since BuddyPress (1.1.0)
    354362         *
    355          * @param array    $array Array of arguments for action type being set.
    356          * @param string   $component_id ID of the current component being set.
    357          * @param string   $type Action type being set.
    358          * @param string   $description Action description for action being set.
     363         * @param array    $array           Array of arguments for action type being set.
     364         * @param string   $component_id    ID of the current component being set.
     365         * @param string   $type            Action type being set.
     366         * @param string   $description     Action description for action being set.
    359367         * @param callable $format_callback Callback for formatting the action string.
    360          * @param string   $label String to describe this action in the activity stream filter dropdown.
    361          * @param array    $context Activity stream contexts where the filter should appear. 'activity', 'member',
    362          *                 'member_groups', 'group'.
     368         * @param string   $label           String to describe this action in the activity stream filter dropdown.
     369         * @param array    $context         Activity stream contexts where the filter should appear. 'activity', 'member',
     370         *                                  'member_groups', 'group'.
    363371         */
    364372        $bp->activity->actions->{$component_id}->{$type} = apply_filters( 'bp_activity_set_action', array(
     
    406414 *                                              the post type does not natively support comments, otherwise false.
    407415 * }
     416 *
     417 * @return bool
    408418 */
    409419function bp_activity_set_post_type_tracking_args( $post_type = '', $args = array() ) {
     
    433443 * @since BuddyPress (2.2.0)
    434444 *
    435  * @param  string $post_type Name of the post type
     445 * @param  string $post_type Name of the post type.
     446 *
    436447 * @return object The tracking arguments of the post type.
    437448 */
     
    490501         *
    491502         * @param object $post_type_activity The tracking arguments of the post type.
    492          * @param string $post_type Name of the post type.
     503         * @param string $post_type          Name of the post type.
    493504         */
    494505        return apply_filters( 'bp_activity_get_post_type_tracking_args', $post_type_activity, $post_type );
     
    582593 *
    583594 * @param string $component_id The unique string ID of the component.
    584  * @param string $key The action key.
     595 * @param string $key          The action key.
     596 *
    585597 * @return string|bool Action value if found, otherwise false.
    586598 */
     
    654666 *
    655667 * @param int $user_id ID of the user whose favorites are being queried.
     668 *
    656669 * @return array IDs of the user's favorite activity items.
    657670 */
     
    690703 *
    691704 * @param int $activity_id ID of the activity item being favorited.
    692  * @param int $user_id ID of the user favoriting the activity item.
     705 * @param int $user_id     ID of the user favoriting the activity item.
     706 *
    693707 * @return bool True on success, false on failure.
    694708 */
     
    734748                 *
    735749                 * @param int $activity_id ID of the activity item being favorited.
    736                  * @param int $user_id ID of the user doing the favoriting.
     750                 * @param int $user_id     ID of the user doing the favoriting.
    737751                 */
    738752                do_action( 'bp_activity_add_user_favorite', $activity_id, $user_id );
     
    750764                 *
    751765                 * @param int $activity_id ID of the activity item being favorited.
    752                  * @param int $user_id ID of the user doing the favoriting.
     766                 * @param int $user_id     ID of the user doing the favoriting.
    753767                 */
    754768                do_action( 'bp_activity_add_user_favorite_fail', $activity_id, $user_id );
     
    771785 *
    772786 * @param int $activity_id ID of the activity item being unfavorited.
    773  * @param int $user_id ID of the user unfavoriting the activity item.
     787 * @param int $user_id     ID of the user unfavoriting the activity item.
     788 *
    774789 * @return bool True on success, false on failure.
    775790 */
     
    814829                                 *
    815830                                 * @param int $activity_id ID of the activity item being unfavorited.
    816                                  * @param int $user_id ID of the user doing the unfavoriting.
     831                                 * @param int $user_id     ID of the user doing the unfavoriting.
    817832                                 */
    818833                                do_action( 'bp_activity_remove_user_favorite', $activity_id, $user_id );
     
    846861 *
    847862 * @param string $content The content to filter by.
     863 *
    848864 * @return int|null The ID of the located activity item. Null if none is found.
    849865 */
     
    890906 *
    891907 * @param int $user_id ID of the user whose favorite count is being requested.
     908 *
    892909 * @return int Total favorite count for the user.
    893910 */
     
    911928 * @global object $wpdb WordPress database access object.
    912929 *
    913  * @param int $activity_id ID of the activity item whose metadata is being deleted.
    914  * @param string $meta_key Optional. The key of the metadata being deleted. If
    915  *        omitted, all metadata associated with the activity
    916  *        item will be deleted.
    917  * @param string $meta_value Optional. If present, the metadata will only be
    918  *        deleted if the meta_value matches this parameter.
    919  * @param bool $delete_all Optional. If true, delete matching metadata entries
    920  *        for all objects, ignoring the specified object_id. Otherwise,
    921  *        only delete matching metadata entries for the specified
    922  *        activity item. Default: false.
     930 * @param int    $activity_id ID of the activity item whose metadata is being deleted.
     931 * @param string $meta_key    Optional. The key of the metadata being deleted. If
     932 *                            omitted, all metadata associated with the activity
     933 *                            item will be deleted.
     934 * @param string $meta_value  Optional. If present, the metadata will only be
     935 *                            deleted if the meta_value matches this parameter.
     936 * @param bool   $delete_all  Optional. If true, delete matching metadata entries
     937 *                            for all objects, ignoring the specified object_id. Otherwise,
     938 *                                only delete matching metadata entries for the specified
     939 *                                activity item. Default: false.
     940 *
    923941 * @return bool True on success, false on failure.
    924942 */
     
    954972 * @uses apply_filters() To call the 'bp_activity_get_meta' hook.
    955973 *
    956  * @param int $activity_id ID of the activity item whose metadata is being requested.
    957  * @param string $meta_key Optional. If present, only the metadata matching
    958  *        that meta key will be returned. Otherwise, all metadata for the
    959  *        activity item will be fetched.
    960  * @param bool $single Optional. If true, return only the first value of the
    961  *        specified meta_key. This parameter has no effect if meta_key is not
    962  *        specified. Default: true.
     974 * @param int    $activity_id ID of the activity item whose metadata is being requested.
     975 * @param string $meta_key    Optional. If present, only the metadata matching
     976 *                            that meta key will be returned. Otherwise, all metadata for the
     977 *                            activity item will be fetched.
     978 * @param bool   $single      Optional. If true, return only the first value of the
     979 *                                specified meta_key. This parameter has no effect if meta_key is not
     980 *                                specified. Default: true.
     981 *
    963982 * @return mixed The meta value(s) being requested.
    964983 */
     
    973992         * @since BuddyPress (1.5.0)
    974993         *
    975          * @param mixed  $retval The meta values for the activity item.
     994         * @param mixed  $retval      The meta values for the activity item.
    976995         * @param int    $activity_id ID of the activity item.
    977          * @param string $meta_key Meta key for the value being requested.
    978          * @param bool   $single Whether to return one matched meta key row or all.
     996         * @param string $meta_key    Meta key for the value being requested.
     997         * @param bool   $single      Whether to return one matched meta key row or all.
    979998         */
    980999        return apply_filters( 'bp_activity_get_meta', $retval, $activity_id, $meta_key, $single );
     
    9861005 * @since BuddyPress (1.2.0)
    9871006 *
    988  * @param int $activity_id ID of the activity item whose metadata is being
    989  *        updated.
    990  * @param string $meta_key Key of the metadata being updated.
    991  * @param mixed $meta_value Value to be set.
    992  * @param mixed $prev_value Optional. If specified, only update existing
    993  *        metadata entries with the specified value. Otherwise, update all
    994  *        entries.
     1007 * @param int    $activity_id ID of the activity item whose metadata is being updated.
     1008 * @param string $meta_key    Key of the metadata being updated.
     1009 * @param mixed  $meta_value  Value to be set.
     1010 * @param mixed  $prev_value  Optional. If specified, only update existing metadata entries
     1011 *                            with the specified value. Otherwise, update all entries.
     1012 *
    9951013 * @return bool|int Returns false on failure. On successful update of existing
    996  *         metadata, returns true. On successful creation of new metadata,
    997  *         returns the integer ID of the new metadata row.
     1014 *                  metadata, returns true. On successful creation of new metadata,
     1015 *                  returns the integer ID of the new metadata row.
    9981016 */
    9991017function bp_activity_update_meta( $activity_id, $meta_key, $meta_value, $prev_value = '' ) {
     
    10101028 * @since BuddyPress (2.0.0)
    10111029 *
    1012  * @param int $activity_id ID of the activity item.
    1013  * @param string $meta_key Metadata key.
    1014  * @param mixed $meta_value Metadata value.
    1015  * @param bool $unique Optional. Whether to enforce a single metadata value
    1016  *        for the given key. If true, and the object already has a value for
    1017  *        the key, no change will be made. Default: false.
     1030 * @param int    $activity_id ID of the activity item.
     1031 * @param string $meta_key    Metadata key.
     1032 * @param mixed  $meta_value  Metadata value.
     1033 * @param bool   $unique      Optional. Whether to enforce a single metadata value for the
     1034 *                            given key. If true, and the object already has a value for
     1035 *                            the key, no change will be made. Default: false.
     1036 *
    10181037 * @return int|bool The meta ID on successful update, false on failure.
    10191038 */
     
    10401059 *
    10411060 * @param int $user_id ID of the user whose activity is being deleted.
     1061 *
     1062 * @return bool
    10421063 */
    10431064function bp_activity_remove_all_user_data( $user_id = 0 ) {
     
    10781099 *
    10791100 * @param int $user_id ID of the user whose activity is being spammed.
     1101 *
     1102 * @return bool
    10801103 */
    10811104function bp_activity_spam_all_user_data( $user_id = 0 ) {
     
    11311154         * @since BuddyPress (1.6.0)
    11321155         *
    1133          * @param int   $user_id ID of the user whose activity is being marked as spam.
     1156         * @param int   $user_id    ID of the user whose activity is being marked as spam.
    11341157         * @param array $activities Array of activity items being marked as spam.
    11351158         */
     
    11461169 *
    11471170 * @param int $user_id ID of the user whose activity is being hammed.
     1171 *
     1172 * @return bool
    11481173 */
    11491174function bp_activity_ham_all_user_data( $user_id = 0 ) {
     
    12001225         * @since BuddyPress (1.6.0)
    12011226         *
    1202          * @param int   $user_id ID of the user whose activity is being marked as ham.
     1227         * @param int   $user_id    ID of the user whose activity is being marked as ham.
    12031228         * @param array $activities Array of activity items being marked as ham.
    12041229         */
     
    12501275 *
    12511276 * @param object $activity Activity data object.
     1277 *
    12521278 * @return string|bool Returns false if no callback is found, otherwise returns
    1253  *         the formatted action string.
     1279 *                     the formatted action string.
    12541280 */
    12551281function bp_activity_generate_action_string( $activity ) {
     
    12741300         * @since BuddyPress (2.0.0)
    12751301         *
    1276          * @param BP_Activity_Activity $action Action string being requested.
     1302         * @param BP_Activity_Activity $action   Action string being requested.
    12771303         * @param BP_Activity_Activity $activity Activity item object.
    12781304         */
     
    12901316 * @since BuddyPress (2.0.0)
    12911317 *
    1292  * @param string $action Static activity action.
     1318 * @param string $action   Static activity action.
    12931319 * @param object $activity Activity data object.
     1320 *
    12941321 * @return string
    12951322 */
     
    13021329         * @since BuddyPress (1.2.0)
    13031330         *
    1304          * @param string               $action Activity action string value.
     1331         * @param string               $action   Activity action string value.
    13051332         * @param BP_Activity_Activity $activity Activity item object.
    13061333         */
     
    13131340 * @since BuddyPress (2.0.0)
    13141341 *
    1315  * @param string $action Static activity action.
     1342 * @param string $action   Static activity action.
    13161343 * @param object $activity Activity data object.
     1344 *
    13171345 * @return string
    13181346 */
     
    13251353         * @since BuddyPress (1.2.0)
    13261354         *
    1327          * @param string               $action Activity action string value.
     1355         * @param string               $action   Activity action string value.
    13281356         * @param BP_Activity_Activity $activity Activity item object.
    13291357         */
     
    13381366 * @param string $action   Static activity action.
    13391367 * @param object $activity Activity data object.
     1368 *
    13401369 * @return string
    13411370 */
     
    13821411         * @since BuddyPress (2.2.0)
    13831412         *
    1384          * @param string               $action Activity action string value.
     1413         * @param string               $action   Activity action string value.
    13851414         * @param BP_Activity_Activity $activity Activity item object.
    13861415         */
     
    14141443 * @uses apply_filters_ref_array() To call the 'bp_activity_get' hook.
    14151444 *
    1416  * @param array $args See BP_Activity_Activity::get() for description.
     1445 * @param array|string $args See BP_Activity_Activity::get() for description.
     1446 *
    14171447 * @return array $activity See BP_Activity_Activity::get() for description.
    14181448 */
     
    15051535         *
    15061536         * @param BP_Activity_Activity $activity Requested activity object.
    1507          * @param array                $r Arguments used for the activity query.
     1537         * @param array                $r        Arguments used for the activity query.
    15081538         */
    15091539        return apply_filters_ref_array( 'bp_activity_get', array( &$activity, &$r ) );
     
    15201550 * @uses BP_Activity_Activity::get() {@link BP_Activity_Activity}
    15211551 *
    1522  * @param array $args {
     1552 * @param array|string $args {
    15231553 *     All arguments and defaults are shared with BP_Activity_Activity::get(),
    15241554 *     except for the following:
     
    15601590         *
    15611591         * @param BP_Activity_Activity $activity Requested activity object.
    1562          * @param array                $args Original passed in arguments.
     1592         * @param array                $args     Original passed in arguments.
    15631593         * @param array                $get_args Constructed arguments used with request.
    15641594         */
     
    15771607 * @uses do_action() To call the 'bp_activity_add' hook
    15781608 *
    1579  * @param array $args {
     1609 * @param array|string $args {
    15801610 *     An array of arguments.
    1581  *     @type int|bool $id Pass an activity ID to update an existing item, or
    1582  *           false to create a new item. Default: false.
    1583  *     @type string $action Optional. The activity action/description, typically
    1584  *           something like "Joe posted an update". Values passed to this param
    1585  *           will be stored in the database and used as a fallback for when the
    1586  *           activity item's format_callback cannot be found (eg, when the
    1587  *           component is disabled). As long as you have registered a
    1588  *           format_callback for your $type, it is unnecessary to include this
    1589  *           argument - BP will generate it automatically.
    1590  *           See {@link bp_activity_set_action()}.
    1591  *     @type string $content Optional. The content of the activity item.
    1592  *     @type string $component The unique name of the component associated with
    1593  *           the activity item - 'groups', 'profile', etc.
    1594  *     @type string $type The specific activity type, used for directory
    1595  *           filtering. 'new_blog_post', 'activity_update', etc.
    1596  *     @type string $primary_link Optional. The URL for this item, as used in
    1597  *           RSS feeds. Defaults to the URL for this activity item's permalink page.
    1598  *     @type int|bool $user_id Optional. The ID of the user associated with the
    1599  *           activity item. May be set to false or 0 if the item is not related
    1600  *           to any user. Default: the ID of the currently logged-in user.
    1601  *     @type int $item_id Optional. The ID of the associated item.
    1602  *     @type int $secondary_item_id Optional. The ID of a secondary associated
    1603  *           item.
    1604  *     @type string $date_recorded Optional. The GMT time, in Y-m-d h:i:s format,
    1605  *           when the item was recorded. Defaults to the current time.
    1606  *     @type bool $hide_sitewide Should the item be hidden on sitewide streams?
    1607  *           Default: false.
    1608  *     @type bool $is_spam Should the item be marked as spam? Default: false.
     1611 *     @type int|bool $id                Pass an activity ID to update an existing item, or
     1612 *                                       false to create a new item. Default: false.
     1613 *     @type string   $action            Optional. The activity action/description, typically
     1614 *                                       something like "Joe posted an update". Values passed to this param
     1615 *                                       will be stored in the database and used as a fallback for when the
     1616 *                                       activity item's format_callback cannot be found (eg, when the
     1617 *                                       component is disabled). As long as you have registered a
     1618 *                                       format_callback for your $type, it is unnecessary to include this
     1619 *                                       argument - BP will generate it automatically.
     1620 *                                       See {@link bp_activity_set_action()}.
     1621 *     @type string   $content          Optional. The content of the activity item.
     1622 *     @type string   $component        The unique name of the component associated with
     1623 *                                       the activity item - 'groups', 'profile', etc.
     1624 *     @type string   $type              The specific activity type, used for directory
     1625 *                                       filtering. 'new_blog_post', 'activity_update', etc.
     1626 *     @type string   $primary_link      Optional. The URL for this item, as used in
     1627 *                                       RSS feeds. Defaults to the URL for this activity
     1628 *                                       item's permalink page.
     1629 *     @type int|bool $user_id           Optional. The ID of the user associated with the activity
     1630 *                                       item. May be set to false or 0 if the item is not related
     1631 *                                       to any user. Default: the ID of the currently logged-in user.
     1632 *     @type int      $item_id           Optional. The ID of the associated item.
     1633 *     @type int      $secondary_item_id Optional. The ID of a secondary associated item.
     1634 *     @type string   $date_recorded     Optional. The GMT time, in Y-m-d h:i:s format, when
     1635 *                                       the item was recorded. Defaults to the current time.
     1636 *     @type bool     $hide_sitewide    Should the item be hidden on sitewide streams?
     1637 *                                       Default: false.
     1638 *     @type bool     $is_spam          Should the item be marked as spam? Default: false.
    16091639 * }
    16101640 * @return int|bool The ID of the activity on success. False on error.
     
    16941724 * @uses do_action() To call the 'bp_activity_posted_update' hook.
    16951725 *
    1696  * @param array $args {
     1726 * @param array|string $args {
    16971727 *     @type string $content The content of the activity update.
    1698  *     @type int $user_id Optional. Defaults to the logged-in user.
     1728 *     @type int    $user_id Optional. Defaults to the logged-in user.
    16991729 * }
    17001730 * @return int $activity_id The activity id
     
    17511781         * @since BuddyPress (1.6.0)
    17521782         *
    1753          * @param string $r Content of the activity update.
     1783         * @param string $r                Content of the activity update.
    17541784         * @param string $activity_content Content of the activity update.
    17551785         */
     
    17671797         * @since BuddyPress (1.2.0)
    17681798         *
    1769          * @param string $content Content of the activity post update.
    1770          * @param int    $user_id ID of the user posting the activity update.
     1799         * @param string $content     Content of the activity post update.
     1800         * @param int    $user_id     ID of the user posting the activity update.
    17711801         * @param int    $activity_id ID of the activity item being updated.
    17721802         */
     
    17841814 * @param  WP_Post  $post    Post object.
    17851815 * @param  int      $user_id ID of the post author.
     1816 *
    17861817 * @return int|bool The ID of the activity on success. False on error.
    17871818 */
     
    19191950 *
    19201951 * @param  WP_Post $post Post item.
     1952 *
    19211953 * @return bool    True on success, false on failure.
    19221954 */
     
    19732005         * @since BuddyPress (2.2.0)
    19742006         *
    1975          * @param WP_Post              $post Post object.
     2007         * @param WP_Post              $post     Post object.
    19762008         * @param BP_Activity_Activity $activity Activity object.
    19772009         */
     
    19882020 * @param  int     $post_id ID of the post being unpublished.
    19892021 * @param  WP_Post $post    Post object.
     2022 *
    19902023 * @return bool    True on success, false on failure.
    19912024 */
     
    20242057         * @param array   $delete_activity_args Array of arguments for activity deletion.
    20252058         * @param WP_Post $post                 Post object.
    2026          * @param bool    $activity             Whether or not the activity
    2027          *                                      was successfully deleted.
     2059         * @param bool    $activity             Whether or not the activity was successfully deleted.
    20282060         */
    20292061        do_action( 'bp_activity_post_type_unpublished', $delete_activity_args, $post, $deleted );
     
    20442076 * @uses do_action() To call the 'bp_activity_comment_posted' hook.
    20452077 *
    2046  * @param array $args {
    2047  *     @type int $id Optional. Pass an ID to update an existing comment.
    2048  *     @type string $content The content of the comment.
    2049  *     @type int $user_id Optional. The ID of the user making the comment.
    2050  *           Defaults to the ID of the logged-in user.
    2051  *     @type int $activity_id The ID of the "root" activity item, ie the oldest
    2052  *           ancestor of the comment.
    2053  *     @type int $parent_id Optional. The ID of the parent activity item, ie the
    2054  *           item to which the comment is an immediate reply. If not provided,
    2055  *           this value defaults to the $activity_id.
     2078 * @param array|string $args {
     2079 *     @type int    $id          Optional. Pass an ID to update an existing comment.
     2080 *     @type string $content     The content of the comment.
     2081 *     @type int    $user_id    Optional. The ID of the user making the comment.
     2082 *                               Defaults to the ID of the logged-in user.
     2083 *     @type int    $activity_id The ID of the "root" activity item, ie the oldest
     2084 *                               ancestor of the comment.
     2085 *     @type int    $parent_id   Optional. The ID of the parent activity item, ie the item to
     2086 *                               which the comment is an immediate reply. If not provided,
     2087 *                               this value defaults to the $activity_id.
    20562088 * }
    20572089 * @return int|bool The ID of the comment on success, otherwise false.
     
    21422174         *
    21432175         * @param int   $comment_id ID of the newly posted activity comment.
    2144          * @param array $r Array of parsed comment arguments.
    2145          * @param int   $activity ID of the activity item being commented on.
     2176         * @param array $r          Array of parsed comment arguments.
     2177         * @param int   $activity   ID of the activity item being commented on.
    21462178         */
    21472179        do_action( 'bp_activity_comment_posted', $comment_id, $r, $activity );
     
    21652197 * @uses BP_Activity_Activity::save() {@link BP_Activity_Activity}
    21662198 *
    2167  * @param array $args See BP_Activity_Activity::get() for description.
     2199 * @param array|string $args See BP_Activity_Activity::get() for description.
     2200 *
    21682201 * @return int $activity_id The ID of the activity item found.
    21692202 */
     
    21862219         * @since BuddyPress (1.2.0)
    21872220         *
    2188          * @param BP_Activity_Activity ID returned by BP_Activity_Activity get_id() method with provided arguments.
     2221         * @param BP_Activity_Activity $value ID returned by BP_Activity_Activity get_id() method with provided arguments.
    21892222         */
    21902223        return apply_filters( 'bp_activity_get_activity_id', BP_Activity_Activity::get_id(
     
    22262259 * @uses wp_cache_delete()
    22272260 *
    2228  * @param array $args To delete specific activity items, use
    2229  *            $args = array( 'id' => $ids );
    2230  *        Otherwise, to use filters for item deletion, the argument format is
    2231  *        the same as BP_Activity_Activity::get(). See that method for a description.
     2261 * @param array|string $args To delete specific activity items, use
     2262 *                           $args = array( 'id' => $ids ); Otherwise, to use
     2263 *                           filters for item deletion, the argument format is
     2264 *                           the same as BP_Activity_Activity::get().
     2265 *                           See that method for a description.
     2266 *
    22322267 * @return bool True on success, false on failure.
    22332268 */
     
    23122347         * @uses bp_activity_delete()
    23132348         *
    2314          * @param array $args See BP_Activity_Activity::get for a description
    2315          *                    of accepted arguments.
     2349         * @param array|string $args See BP_Activity_Activity::get for a
     2350         *                           description of accepted arguments.
    23162351         *
    23172352         * @return bool True on success, false on failure.
     
    23372372         * @uses bp_activity_delete()
    23382373         *
    2339          * @param int ID of the activity item to be deleted.
     2374         * @param int $activity_id ID of the activity item to be deleted.
     2375         *
    23402376         * @return bool True on success, false on failure.
    23412377         */
     
    23542390         * @uses bp_activity_delete()
    23552391         *
    2356          * @param int $user_id The user id.
    2357          * @param string $content The activity id.
     2392         * @param int    $user_id  The user id.
     2393         * @param string $content   The activity id.
    23582394         * @param string $component The activity component.
    2359          * @param string $type The activity type.
     2395         * @param string $type      The activity type.
     2396         *
    23602397         * @return bool True on success, false on failure.
    23612398         */
     
    23792416         * @uses bp_activity_delete()
    23802417         *
    2381          * @param int $user_id The user id.
     2418         * @param int    $user_id  The user id.
    23822419         * @param string $component The activity component.
     2420         *
    23832421         * @return bool True on success, false on failure.
    23842422         */
     
    24072445 * @param int $activity_id The ID of the "root" activity, ie the comment's
    24082446 *                         oldest ancestor.
    2409  * @param int $comment_id The ID of the comment to be deleted.
     2447 * @param int $comment_id  The ID of the comment to be deleted.
     2448 *
    24102449 * @return bool True on success, false on failure
    24112450 */
     
    24202459         * @since BuddyPress (1.2.0)
    24212460         *
    2422          * @param bool $value Whether BuddyPress should continue or not.
     2461         * @param bool $value       Whether BuddyPress should continue or not.
    24232462         * @param int  $activity_id ID of the root activity item being deleted.
    2424          * @param int  $comment_id ID of the comment being deleted.
     2463         * @param int  $comment_id  ID of the comment being deleted.
    24252464         */
    24262465        if ( ! apply_filters( 'bp_activity_delete_comment_pre', true, $activity_id, $comment_id ) ) {
     
    24482487         *
    24492488         * @param int $activity_id ID of the activity that has had a comment deleted from.
    2450          * @param int $comment_id ID of the comment that was deleted.
     2489         * @param int $comment_id  ID of the comment that was deleted.
    24512490         */
    24522491        do_action( 'bp_activity_delete_comment', $activity_id, $comment_id );
     
    24652504         *
    24662505         * @param int $activity_id The ID of the "root" activity, ie the
    2467          *        comment's oldest ancestor.
    2468          * @param int $comment_id The ID of the comment to be deleted.
     2506         *                         comment's oldest ancestor.
     2507         * @param int $comment_id  The ID of the comment to be deleted.
    24692508         */
    24702509        function bp_activity_delete_children( $activity_id, $comment_id ) {
     
    25022541 * @uses apply_filters_ref_array() To call the 'bp_activity_get_permalink' hook.
    25032542 *
    2504  * @param int $activity_id The unique id of the activity object.
    2505  * @param object $activity_obj Optional. The activity object.
     2543 * @param int         $activity_id  The unique id of the activity object.
     2544 * @param object|bool $activity_obj Optional. The activity object.
     2545 *
    25062546 * @return string $link Permalink for the activity item.
    25072547 */
     
    25562596 *
    25572597 * @param int $user_id The ID of the user whose activity is being hidden.
     2598 *
    25582599 * @return bool True on success, false on failure.
    25592600 */
     
    25792620 * @uses apply_filters() To call the 'bp_activity_thumbnail_content_images' hook
    25802621 *
    2581  * @param string $content The content of the activity item.
    2582  * @param string $link Optional. The unescaped URL that the image should link
    2583  *        to. If absent, the image will not be a link.
    2584  * @param array $args Optional. The args passed to the activity
    2585  *        creation function (eg bp_blogs_record_activity()).
     2622 * @param string      $content The content of the activity item.
     2623 * @param string|bool $link    Optional. The unescaped URL that the image should link
     2624 *                             to. If absent, the image will not be a link.
     2625 * @param array|bool  $args    Optional. The args passed to the activity
     2626 *                             creation function (eg bp_blogs_record_activity()).
     2627 *
    25862628 * @return string $content The content with images stripped and replaced with a
    25872629 *         single thumb.
     
    26392681         * @param string $content Activity content that had images replaced in.
    26402682         * @param array  $matches Array of all image tags found in the posted content.
    2641          * @param array  $args Arguments passed into function creating the activity update.
     2683         * @param array  $args    Arguments passed into function creating the activity update.
    26422684         */
    26432685        return apply_filters( 'bp_activity_thumbnail_content_images', $content, $matches, $args );
     
    26562698 * @param array  $activity The data passed to bp_activity_add() or the values
    26572699 *                         from an Activity obj.
     2700 *
    26582701 * @return string
    26592702 */
     
    26682711        }
    26692712
    2670 
    26712713        /**
    26722714         * Filter the class name of the media extractor when creating an Activity summary.
     
    26742716         * Use this filter to change the media extractor used to extract media info for the activity item.
    26752717         *
     2718         * @since BuddyPress (2.3.0)
     2719         *
    26762720         * @param string $extractor Class name.
    2677          * @param string $content The content of the activity item.
    2678          * @param array $activity The data passed to bp_activity_add() or the values from an Activity obj.
    2679          * @since BuddyPress (2.3.0)
     2721         * @param string $content   The content of the activity item.
     2722         * @param array  $activity  The data passed to bp_activity_add() or the values from an Activity obj.
    26802723         */
    26812724        $extractor = apply_filters( 'bp_activity_create_summary_extractor_class', 'BP_Media_Extractor', $content, $activity );
     
    26852728         * Filter the arguments passed to the media extractor when creating an Activity summary.
    26862729         *
    2687          * @param array $args Array of bespoke data for the media extractor.
    2688          * @param string $content The content of the activity item.
    2689          * @param array $activity The data passed to bp_activity_add() or the values from an Activity obj.
     2730         * @since BuddyPress (2.3.0)
     2731         *
     2732         * @param array              $args      Array of bespoke data for the media extractor.
     2733         * @param string             $content   The content of the activity item.
     2734         * @param array              $activity  The data passed to bp_activity_add() or the values from an Activity obj.
    26902735         * @param BP_Media_Extractor $extractor The media extractor object.
    2691          * @since BuddyPress (2.3.0)
    26922736         */
    26932737        $args = apply_filters( 'bp_activity_create_summary_extractor_args', $args, $content, $activity, $extractor );
     
    27352779                $use_media_type = 'images';
    27362780                $image_source   = 'html';
    2737        
     2781
    27382782                // Featured Image > Galleries > inline <img>.
    27392783                if ( $has_feat_image ) {
     
    27572801                 * Filter the results of the media extractor when creating an Activity summary.
    27582802                 *
    2759                  * @param array $extracted_media Extracted media item. See {@link BP_Media_Extractor::extract()} for format.
    2760                  * @param string $content Content of the activity item.
    2761                  * @param array $activity The data passed to bp_activity_add() or the values from an Activity obj.
    2762                  * @param array $media All results from the media extraction. See {@link BP_Media_Extractor::extract()} for format.
    2763                  * @param string $use_media_type The kind of media item that was preferentially extracted.
    2764                  * @param string $image_source If $use_media_type was "images", the preferential source of the image.
    2765                  *               Otherwise empty.
    27662803                 * @since BuddyPress (2.3.0)
     2804                 *
     2805                 * @param array  $extracted_media Extracted media item. See {@link BP_Media_Extractor::extract()} for format.
     2806                 * @param string $content         Content of the activity item.
     2807                 * @param array  $activity        The data passed to bp_activity_add() or the values from an Activity obj.
     2808                 * @param array  $media           All results from the media extraction.
     2809                 *                                See {@link BP_Media_Extractor::extract()} for format.
     2810                 * @param string $use_media_type  The kind of media item that was preferentially extracted.
     2811                 * @param string $image_source    If $use_media_type was "images", the preferential source of the image.
     2812                 *                                Otherwise empty.
    27672813                 */
    27682814                $extracted_media = apply_filters(
     
    27922838         * Filters the newly-generated summary for the activity item.
    27932839         *
    2794          * @param string $summary Activity summary HTML.
    2795          * @param string $content $content Content of the activity item.
    2796          * @param array $activity The data passed to bp_activity_add() or the values from an Activity obj.
    2797          * @param array $extracted_media Media item extracted. See {@link BP_Media_Extractor::extract()} for format.
    27982840         * @since BuddyPress (2.3.0)
     2841         *
     2842         * @param string $summary         Activity summary HTML.
     2843         * @param string $content         Content of the activity item.
     2844         * @param array  $activity        The data passed to bp_activity_add() or the values from an Activity obj.
     2845         * @param array  $extracted_media Media item extracted. See {@link BP_Media_Extractor::extract()} for format.
    27992846         */
    28002847        return apply_filters( 'bp_activity_create_summary', $summary, $content, $activity, $extracted_media );
     
    28262873 *
    28272874 * @param BP_Activity_Activity $activity The activity item to be spammed.
    2828  * @param string $source Optional. Default is "by_a_person" (ie, a person has
    2829  *        manually marked the activity as spam). BP core also accepts
    2830  *        'by_akismet'.
     2875 * @param string               $source  Optional. Default is "by_a_person" (ie, a person has
     2876 *                                       manually marked the activity as spam). BP core also
     2877 *                                       accepts 'by_akismet'.
    28312878 */
    28322879function bp_activity_mark_as_spam( &$activity, $source = 'by_a_person' ) {
     
    28612908         *
    28622909         * @param BP_Activity_Activity $activity Activity item being marked as spam.
    2863          * @param string               $source Source of determination of spam status. For example
    2864          *                             "by_a_person" or "by_akismet".
     2910         * @param string               $source   Source of determination of spam status. For example
     2911         *                                       "by_a_person" or "by_akismet".
    28652912         */
    28662913        do_action( 'bp_activity_mark_as_spam', $activity, $source );
     
    28722919 * @since BuddyPress (1.6.0)
    28732920 *
    2874  * @param BP_Activity_Activity $activity The activity item to be hammed.
    2875  * @param string $source Optional. Default is "by_a_person" (ie, a person has
    2876  *        manually marked the activity as spam). BP core also accepts
    2877  *        'by_akismet'.
     2921 * @param BP_Activity_Activity $activity The activity item to be hammed. Passed by reference.
     2922 * @param string               $source  Optional. Default is "by_a_person" (ie, a person has
     2923 *                                       manually marked the activity as spam). BP core also accepts
     2924 *                                       'by_akismet'.
    28782925 */
    28792926function bp_activity_mark_as_ham( &$activity, $source = 'by_a_person' ) {
     
    29082955         *
    29092956         * @param BP_Activity_Activity $activity Activity item being marked as ham.
    2910          * @param string               $source Source of determination of ham status. For example
    2911          *                             "by_a_person" or "by_akismet".
     2957         * @param string               $source   Source of determination of ham status. For example
     2958         *                                       "by_a_person" or "by_akismet".
    29122959         */
    29132960        do_action( 'bp_activity_mark_as_ham', $activity, $source );
     
    30153062 * @uses bp_activity_get_meta()
    30163063 *
    3017  * @param string $cache An empty string passed by BP_Embed::parse_oembed() for
    3018  *        functions like this one to filter.
    3019  * @param int $id The ID of the activity item.
     3064 * @param string $cache    An empty string passed by BP_Embed::parse_oembed() for
     3065 *                         functions like this one to filter.
     3066 * @param int    $id      The ID of the activity item.
    30203067 * @param string $cachekey The cache key generated in BP_Embed::parse_oembed().
     3068 *
    30213069 * @return mixed The cached embeds for this activity item.
    30223070 */
     
    30353083 * @uses bp_activity_update_meta()
    30363084 *
    3037  * @param string $cache An empty string passed by BP_Embed::parse_oembed() for
    3038  *        functions like this one to filter.
     3085 * @param string $cache    An empty string passed by BP_Embed::parse_oembed() for
     3086 *                         functions like this one to filter.
    30393087 * @param string $cachekey The cache key generated in BP_Embed::parse_oembed().
    3040  * @param int $id The ID of the activity item.
     3088 * @param int    $id       The ID of the activity item.
     3089 *
    30413090 * @return bool True on success, false on failure.
    30423091 */
  • trunk/src/bp-activity/bp-activity-loader.php

    r9819 r9833  
    133133         * @param array $main_nav Optional. See BP_Component::setup_nav() for
    134134         *                        description.
    135          * @param array $sub_nav Optional. See BP_Component::setup_nav() for
    136          *                       description.
     135         * @param array $sub_nav  Optional. See BP_Component::setup_nav() for
     136         *                        description.
    137137         */
    138138        public function setup_nav( $main_nav = array(), $sub_nav = array() ) {
  • trunk/src/bp-activity/bp-activity-notifications.php

    r9819 r9833  
    3737 * @uses do_action() To call the 'bp_activity_sent_mention_email' hook
    3838 *
    39  * @param int $activity_id The ID of the activity update.
     39 * @param int $activity_id      The ID of the activity update.
    4040 * @param int $receiver_user_id The ID of the user who is receiving the update.
    4141 */
     
    114114                 * @since BuddyPress (1.2.0)
    115115                 *
    116                  * @param string $subject Email notification subject text.
     116                 * @param string $subject     Email notification subject text.
    117117                 * @param string $poster_name Name of the person who made the @mention.
    118118                 */
     
    124124                 * @since BuddyPress (1.2.0)
    125125                 *
    126                  * @param string $message Email notification message text.
    127                  * @param string $poster_name Name of the person who made the @mention.
    128                  * @param string $content Content of the @mention.
    129                  * @param string $message_link URL permalink for the activity message.
     126                 * @param string $message       Email notification message text.
     127                 * @param string $poster_name   Name of the person who made the @mention.
     128                 * @param string $content       Content of the @mention.
     129                 * @param string $message_link  URL permalink for the activity message.
    130130                 * @param string $settings_link URL permalink for the user's notification settings area.
    131131                 */
     
    140140         * @since BuddyPress (1.5.0)
    141141         *
    142          * @param BP_Activity_Activity $activity Activity Item object.
    143          * @param string               $subject Email notification subject text.
    144          * @param string               $message Email notification message text.
    145          * @param string               $content Content of the @mention.
     142         * @param BP_Activity_Activity $activity         Activity Item object.
     143         * @param string               $subject          Email notification subject text.
     144         * @param string               $message          Email notification message text.
     145         * @param string               $content          Content of the @mention.
    146146         * @param int                  $receiver_user_id The ID of the user who is receiving the update.
    147147         */
     
    174174 * @uses do_action() To call the 'bp_activity_sent_reply_to_reply_email' hook
    175175 *
    176  * @param int $comment_id The comment id.
    177  * @param int $commenter_id The ID of the user who posted the comment.
    178  * @param array $params {@link bp_activity_new_comment()}
     176 * @param int   $comment_id   The comment id.
     177 * @param int   $commenter_id The ID of the user who posted the comment.
     178 * @param array $params       {@link bp_activity_new_comment()}
     179 *
     180 * @return bool
    179181 */
    180182function bp_activity_new_comment_notification( $comment_id = 0, $commenter_id = 0, $params = array() ) {
     
    230232                 * @since BuddyPress (1.2.0)
    231233                 *
    232                  * @param string $subject Email notification subject text.
     234                 * @param string $subject     Email notification subject text.
    233235                 * @param string $poster_name Name of the person who made the comment.
    234236                 */
     
    240242                 * @since BuddyPress (1.2.0)
    241243                 *
    242                  * @param string $message Email notification message text.
    243                  * @param string $poster_name Name of the person who made the comment.
    244                  * @param string $content Content of the comment.
    245                  * @param string $thread_link URL permalink for the activity thread.
     244                 * @param string $message       Email notification message text.
     245                 * @param string $poster_name   Name of the person who made the comment.
     246                 * @param string $content       Content of the comment.
     247                 * @param string $thread_link   URL permalink for the activity thread.
    246248                 * @param string $settings_link URL permalink for the user's notification settings area.
    247249                 */
     
    255257                 * @since BuddyPress (1.5.0)
    256258                 *
    257                  * @param int    $user_id ID of the original activity item author.
    258                  * @param string $subject Email notification subject text.
    259                  * @param string $message Email notification message text.
    260                  * @param int    $comment_id ID for the newly received comment.
     259                 * @param int    $user_id      ID of the original activity item author.
     260                 * @param string $subject      Email notification subject text.
     261                 * @param string $message      Email notification message text.
     262                 * @param int    $comment_id   ID for the newly received comment.
    261263                 * @param int    $commenter_id ID of the user who made the comment.
    262                  * @param array  $params Arguments used with the original activity comment.
     264                 * @param array  $params       Arguments used with the original activity comment.
    263265                 */
    264266                do_action( 'bp_activity_sent_reply_to_update_email', $original_activity->user_id, $subject, $message, $comment_id, $commenter_id, $params );
     
    318320                 * @since BuddyPress (1.2.0)
    319321                 *
    320                  * @param string $subject Email notification subject text.
     322                 * @param string $subject     Email notification subject text.
    321323                 * @param string $poster_name Name of the person who made the comment reply.
    322324                 */
     
    328330                 * @since BuddyPress (1.2.0)
    329331                 *
    330                  * @param string $message Email notification message text.
    331                  * @param string $poster_name Name of the person who made the comment reply.
    332                  * @param string $content Content of the comment reply.
     332                 * @param string $message       Email notification message text.
     333                 * @param string $poster_name   Name of the person who made the comment reply.
     334                 * @param string $content       Content of the comment reply.
    333335                 * @param string $settings_link URL permalink for the user's notification settings area.
    334                  * @param string $thread_link URL permalink for the activity thread.
     336                 * @param string $thread_link   URL permalink for the activity thread.
    335337                 */
    336338                $message = apply_filters( 'bp_activity_new_comment_notification_comment_author_message', $message, $poster_name, $content, $settings_link, $thread_link );
     
    343345                 * @since BuddyPress (1.5.0)
    344346                 *
    345                  * @param int    $user_id ID of the parent activity item author.
    346                  * @param string $subject Email notification subject text.
    347                  * @param string $message Email notification message text.
    348                  * @param int    $comment_id ID for the newly received comment.
     347                 * @param int    $user_id      ID of the parent activity item author.
     348                 * @param string $subject      Email notification subject text.
     349                 * @param string $message      Email notification message text.
     350                 * @param int    $comment_id   ID for the newly received comment.
    349351                 * @param int    $commenter_id ID of the user who made the comment.
    350                  * @param array  $params Arguments used with the original activity comment.
     352                 * @param array  $params       Arguments used with the original activity comment.
    351353                 */
    352354                do_action( 'bp_activity_sent_reply_to_reply_email', $parent_comment->user_id, $subject, $message, $comment_id, $commenter_id, $params );
     
    358360 *
    359361 * @since BuddyPress (1.9.0)
    360  * @param int $comment_id
     362 *
     363 * @param int   $comment_id
    361364 * @param array $params
    362365 */
     
    380383 * @uses do_action() To call 'activity_format_notifications' hook.
    381384 *
    382  * @param string $action The type of activity item. Just 'new_at_mention' for now.
    383  * @param int $item_id The activity ID.
    384  * @param int $secondary_item_id In the case of at-mentions, this is the mentioner's ID.
    385  * @param int $total_items The total number of notifications to format.
    386  * @param string $format 'string' to get a BuddyBar-compatible notification, 'array' otherwise.
     385 * @param string $action            The type of activity item. Just 'new_at_mention' for now.
     386 * @param int    $item_id           The activity ID.
     387 * @param int    $secondary_item_id In the case of at-mentions, this is the mentioner's ID.
     388 * @param int    $total_items       The total number of notifications to format.
     389 * @param string $format            'string' to get a BuddyBar-compatible notification, 'array' otherwise.
     390 *
    387391 * @return string $return Formatted @mention notification.
    388392 */
     
    418422                 * @since BuddyPress (1.5.0)
    419423                 *
    420                  * @param string $string HTML anchor tag for the mention.
     424                 * @param string $string          HTML anchor tag for the mention.
    421425                 * @param string $at_mention_link The permalink for the mention.
    422                  * @param int    $total_items How many items being notified about.
    423                  * @param int    $activity_id ID of the activity item being formatted.
    424                  * @param int    $poster_user_id ID of the user posting the mention.
     426                 * @param int    $total_items     How many items being notified about.
     427                 * @param int    $activity_id     ID of the activity item being formatted.
     428                 * @param int    $poster_user_id  ID of the user posting the mention.
    425429                 */
    426430                $return = apply_filters( 'bp_activity_' . $amount . '_at_mentions_notification', '<a href="' . esc_url( $at_mention_link ) . '" title="' . esc_attr( $at_mention_title ) . '">' . esc_html( $text ) . '</a>', $at_mention_link, (int) $total_items, $activity_id, $poster_user_id );
     
    436440                 * @since BuddyPress (1.5.0)
    437441                 *
    438                  * @param array  $array Array holding the content and permalink for the mention notification.
     442                 * @param array  $array           Array holding the content and permalink for the mention notification.
    439443                 * @param string $at_mention_link The permalink for the mention.
    440                  * @param int    $total_items How many items being notified about.
    441                  * @param int    $activity_id ID of the activity item being formatted.
    442                  * @param int    $poster_user_id ID of the user posting the mention.
     444                 * @param int    $total_items     How many items being notified about.
     445                 * @param int    $activity_id     ID of the activity item being formatted.
     446                 * @param int    $poster_user_id  ID of the user posting the mention.
    443447                 */
    444448                $return = apply_filters( 'bp_activity_' . $amount . '_at_mentions_notification', array(
     
    453457         * @since BuddyPress (1.2.0)
    454458         *
    455          * @param string $action The type of activity item.
    456          * @param int    $item_id The activity ID.
     459         * @param string $action            The type of activity item.
     460         * @param int    $item_id           The activity ID.
    457461         * @param int    $secondary_item_id @mention mentioner ID.
    458          * @param int    $total_items Total amount of items to format.
     462         * @param int    $total_items       Total amount of items to format.
    459463         */
    460464        do_action( 'activity_format_notifications', $action, $item_id, $secondary_item_id, $total_items );
     
    473477 * @since BuddyPress (1.9.0)
    474478 *
    475  * @param obj $activity
     479 * @param object $activity
    476480 * @param string $subject (not used)
    477481 * @param string $message (not used)
    478482 * @param string $content (not used)
    479  * @param int $receiver_user_id
     483 * @param int    $receiver_user_id
    480484 */
    481485function bp_activity_at_mention_add_notification( $activity, $subject, $message, $content, $receiver_user_id ) {
     
    519523 *
    520524 * @since BuddyPress (2.0.0)
     525 *
     526 * @param object BP_Activity_Activity
    521527 */
    522528function bp_activity_remove_screen_notifications_single_activity_permalink( $activity ) {
  • trunk/src/bp-activity/bp-activity-screens.php

    r9819 r9833  
    314314         * @since BuddyPress (1.2.0)
    315315         *
    316          * @param BP_Activity_Activity $activity Object representing the current activity item being displayed.
    317          * @param bool $has_access Whether or not the current user has access to view activity.
     316         * @param BP_Activity_Activity $activity   Object representing the current activity item being displayed.
     317         * @param bool                 $has_access Whether or not the current user has access to view activity.
    318318         */
    319319        do_action( 'bp_activity_screen_single_activity_permalink', $activity, $has_access );
     
    476476         *
    477477         * @param string $templates The templates from bp_get_theme_compat_templates().
     478         *
    478479         * @return array $templates Array of custom templates to look for.
    479480         */
     
    536537         *
    537538         * @param string $templates The templates from bp_get_theme_compat_templates().
     539         *
    538540         * @return array $templates Array of custom templates to look for.
    539541         */
  • trunk/src/bp-activity/bp-activity-template.php

    r9828 r9833  
    227227         *     'include'. Default values for 'per_page' and 'display_comments'
    228228         *     differ from the originating function, and are described below.
    229          *     @type string $page_arg The string used as a query parameter in
    230          *           pagination links. Default: 'acpage'.
    231          *     @type array|bool $include Pass an array of activity IDs to
    232          *           retrieve only those items, or false to noop the 'include'
    233          *           parameter. 'include' differs from 'in' in that 'in' forms
    234          *           an IN clause that works in conjunction with other filters
    235          *           passed to the function, while 'include' is interpreted as
    236          *           an exact list of items to retrieve, which skips all other
    237          *           filter-related parameters. Default: false.
    238          *     @type int|bool $per_page Default: 20.
     229         *     @type string      $page_arg        The string used as a query parameter in
     230         *                                         pagination links. Default: 'acpage'.
     231         *     @type array|bool  $include          Pass an array of activity IDs to
     232         *                                         retrieve only those items, or false to noop the 'include'
     233         *                                         parameter. 'include' differs from 'in' in that 'in' forms
     234         *                                         an IN clause that works in conjunction with other filters
     235         *                                         passed to the function, while 'include' is interpreted as
     236         *                                         an exact list of items to retrieve, which skips all other
     237         *                                         filter-related parameters. Default: false.
     238         *     @type int|bool    $per_page        Default: 20.
    239239         *     @type string|bool $display_comments Default: 'threaded'.
    240240         * }
     
    523523 * @uses apply_filters() To call the 'bp_has_activities' hook.
    524524 *
    525  * @param array $args {
     525 * @param array|string $args {
    526526 *     Arguments for limiting the contents of the activity loop. Most arguments
    527527 *     are in the same format as {@link BP_Activity_Activity::get()}. However,
     
    14221422 * @uses bp_get_activity_avatar()
    14231423 *
    1424  * @param array $args See {@link bp_get_activity_avatar()} for description.
     1424 * @param array|string $args See {@link bp_get_activity_avatar()} for description.
    14251425 */
    14261426function bp_activity_avatar( $args = '' ) {
     
    14411441         * @uses apply_filters() To call the 'bp_get_activity_avatar' hook
    14421442         *
    1443          * @param array $args  {
     1443         * @param array|string $args  {
    14441444         *     Arguments are listed here with an explanation of their defaults.
    14451445         *     For more information about the arguments, see
    14461446         *     {@link bp_core_fetch_avatar()}.
    1447          *     @type string $alt Default: 'Profile picture of [user name]' if
    1448          *           activity user name is available, otherwise 'Profile picture'.
    1449          *     @type string $class Default: 'avatar'.
    1450          *     @type string|bool $email Default: Email of the activity's
    1451          *           associated user, if available. Otherwise false.
    1452          *     @type string $type Default: 'full' when viewing a single activity
    1453          *           permalink page, otherwise 'thumb'.
    1454          *     @type int|bool $user_id Default: ID of the activity's user.
     1447         *     @type string      $alt    Default: 'Profile picture of [user name]' if
     1448         *                                activity user name is available, otherwise 'Profile picture'.
     1449         *     @type string      $class  Default: 'avatar'.
     1450         *     @type string|bool $email   Default: Email of the activity's
     1451         *                                associated user, if available. Otherwise false.
     1452         *     @type string      $type    Default: 'full' when viewing a single activity
     1453         *                                permalink page, otherwise 'thumb'.
     1454         *     @type int|bool    $user_id Default: ID of the activity's user.
    14551455         * }
    14561456         * @return string User avatar string.
     
    15571557 * @uses bp_get_activity_secondary_avatar()
    15581558 *
    1559  * @param array $args See {@link bp_get_activity_secondary_avatar} for description.
     1559 * @param array|string $args See {@link bp_get_activity_secondary_avatar} for description.
    15601560 */
    15611561function bp_activity_secondary_avatar( $args = '' ) {
     
    15791579         * @param array $args  {
    15801580         *     For a complete description of arguments, see {@link bp_core_fetch_avatar()}.
    1581          *     @type string $alt Default value varies based on current activity
    1582          *           item component.
    1583          *     @type string $type Default: 'full' when viewing a single activity
    1584          *           permalink page, otherwise 'thumb'.
    1585          *     @type string $class Default: 'avatar'.
    1586          *     @type string|bool $email Default: email of the activity's user.
    1587          *     @type int|bool $user_id Default: ID of the activity's user.
     1581         *     @type string      $alt    Default value varies based on current activity
     1582         *                                item component.
     1583         *     @type string      $type    Default: 'full' when viewing a single activity
     1584         *                                permalink page, otherwise 'thumb'.
     1585         *     @type string      $class  Default: 'avatar'.
     1586         *     @type string|bool $email   Default: email of the activity's user.
     1587         *     @type int|bool    $user_id Default: ID of the activity's user.
    15881588         * }
    15891589         * @return string The secondary avatar
     
    17151715                         * @since BuddyPress (1.7.0)
    17161716                         *
    1717                          * @param string $link Link to wrap the avatar image in.
     1717                         * @param string $link      Link to wrap the avatar image in.
    17181718                         * @param string $component Activity component being acted on.
    17191719                         */
     
    17251725                         * @since BuddyPress (1.2.10)
    17261726                         *
    1727                          * @param string Formatted HTML <img> element, or raw avatar URL.
     1727                         * @param string $avatar Formatted HTML <img> element, or raw avatar URL.
    17281728                         */
    17291729                        $avatar = apply_filters( 'bp_get_activity_secondary_avatar', $avatar );
     
    17661766         *     @type bool $no_timestamp Whether to exclude the timestamp.
    17671767         * }
     1768         *
    17681769         * @return string The activity action.
    17691770         */
     
    19241925 *
    19251926 * @param string $content The activity content.
     1927 *
    19261928 * @return string The activity content with the metadata string attached.
    19271929 */
     
    19921994 * @uses apply_filters() To call the 'bp_activity_user_can_delete' hook
    19931995 *
    1994  * @param object $activity Optional. Falls back on the current item in the loop.
     1996 * @param object|bool $activity Optional. Falls back on the current item in the loop.
     1997 *
    19951998 * @return bool True if can delete, false otherwise.
    19961999 */
     
    20382041         *
    20392042         * @param bool   $can_delete Whether the user can delete the item.
    2040          * @param object $activity Current activity item object.
     2043         * @param object $activity   Current activity item object.
    20412044         */
    20422045        return (bool) apply_filters( 'bp_activity_user_can_delete', $can_delete, $activity );
     
    20512054 * @uses bp_get_activity_parent_content()
    20522055 *
    2053  * @param array $args See {@link bp_get_activity_parent_content} for description.
     2056 * @param array|string $args See {@link bp_get_activity_parent_content} for description.
    20542057 */
    20552058function bp_activity_parent_content( $args = '' ) {
     
    21312134         *
    21322135         * @return bool|int False if parent activity can't be found, otherwise
    2133          *         the parent activity's user ID.
     2136         *                  the parent activity's user ID.
    21342137         */
    21352138        function bp_get_activity_parent_user_id() {
     
    22072210 * @todo deprecate $args param
    22082211 *
    2209  * @param array $args See {@link bp_activity_get_comments} for description.
     2212 * @param array|string $args See {@link bp_activity_get_comments} for description.
    22102213 */
    22112214function bp_activity_comments( $args = '' ) {
     
    22272230         * @global object $activities_template {@link BP_Activity_Template}
    22282231         * @uses bp_activity_recurse_comments()
     2232         *
     2233         * @return bool
    22292234         */
    22302235        function bp_activity_get_comments( $args = '' ) {
     
    22502255                 * @global object $activities_template {@link BP_Activity_Template}
    22512256                 * @uses locate_template()
     2257                 *
     2258                 * @return bool|string
    22522259                 */
    22532260                function bp_activity_recurse_comments( $comment ) {
     
    23092316 *
    23102317 * @return object|bool $current_comment The activity comment currently being
    2311  *         displayed. False on failure.
     2318 *                                      displayed. False on failure.
    23122319 */
    23132320function bp_activity_current_comment() {
     
    23482355         * @uses apply_filters() To call the 'bp_activity_comment_id' hook.
    23492356         *
    2350          * @return int|bool $comment_id The ID of the activity comment
    2351          *         currently being displayed, false if none is found.
     2357         * @return int|bool $comment_id The ID of the activity comment currently
     2358         *                             being displayed, false if none is found.
    23522359         */
    23532360        function bp_get_activity_comment_id() {
     
    23862393         *
    23872394         * @return int|bool $user_id The user_id of the author of the displayed
    2388          *         activity comment. False on failure.
     2395         *                           activity comment. False on failure.
    23892396         */
    23902397        function bp_get_activity_comment_user_id() {
     
    25032510         *
    25042511         * @return string|bool $date_recorded Time since the activity was recorded,
    2505          *         in the form "%s ago". False on failure.
     2512         *                                    in the form "%s ago". False on failure.
    25062513         */
    25072514        function bp_get_activity_comment_date_recorded() {
     
    25762583         *
    25772584         * @return string $link The nonced URL for deleting the current
    2578          *         activity comment.
     2585         *                      activity comment.
    25792586         */
    25802587        function bp_get_activity_comment_delete_link() {
     
    26932700                 *
    26942701                 * @param object $comment Activity comment object.
    2695                  * @param int $count The current iteration count.
     2702                 * @param int    $count The current iteration count.
    26962703                 *
    26972704                 * @return int $count The activity comment count.
     
    27162723                         *
    27172724                         * @param int    $new_count New total count for the current comment.
    2718                          * @param object $comment Activity comment object.
    2719                          * @param int    $count Current iteration count for the current comment.
     2725                         * @param object $comment   Activity comment object.
     2726                         * @param int    $count     Current iteration count for the current comment.
    27202727                         */
    27212728                        return apply_filters( 'bp_activity_recurse_comment_count', $new_count, $comment, $count );
     
    28032810         *
    28042811         * @return string|bool The activity comment form no JavaScript
    2805          *         display CSS. False on failure.
     2812         *                     display CSS. False on failure.
    28062813         */
    28072814        function bp_get_activity_comment_form_nojs_display() {
     
    29582965                 * @since BuddyPress (1.8.0)
    29592966                 *
    2960                  * @param string $link Activity comment permalink.
     2967                 * @param string $link       Activity comment permalink.
    29612968                 * @param int    $comment_id ID for the current activity comment.
    29622969                 */
     
    31273134         *
    31283135         * @return string $link Activity delete link. Contains $redirect_to arg
    3129          *         if on single activity page.
     3136         *                      if on single activity page.
    31303137         */
    31313138        function bp_get_activity_delete_link() {
     
    31773184         *
    31783185         * @return string $link Activity delete link. Contains $redirect_to arg
    3179          *         if on single activity page.
     3186         *                      if on single activity page.
    31803187         */
    31813188        function bp_get_activity_delete_url() {
     
    32303237         *
    32313238         * @param int $user_id If empty, will fall back on displayed user.
     3239         *
    32323240         * @return string|bool $latest_update The activity latest update link.
    3233          *         False on failure
     3241         *                                    False on failure
    32343242         */
    32353243        function bp_get_activity_latest_update( $user_id = 0 ) {
     
    32813289 * @uses bp_get_activity_filter_links()
    32823290 *
    3283  * @param array $args See {@link bp_get_activity_filter_links()} for description.
     3291 * @param array|bool $args See {@link bp_get_activity_filter_links()} for description.
    32843292 */
    32853293function bp_activity_filter_links( $args = false ) {
     
    33003308         * @uses apply_filters() To call the 'bp_get_activity_filter_links' hook.
    33013309         *
    3302          * @param array $args {
     3310         * @param array|bool $args {
    33033311         *     @type string $style The type of markup to use for the links.
    3304          *           'list', 'paragraph', or 'span'. Default: 'list'.
     3312         *                         'list', 'paragraph', or 'span'. Default: 'list'.
    33053313         * }
    33063314         * @return string|bool $component_links The activity filter links.
     
    33643372                         * @since BuddyPress (1.1.0)
    33653373                         *
    3366                          * @param string $link The URL for the current component.
     3374                         * @param string $link      The URL for the current component.
    33673375                         * @param string $component The current component getting links constructed for.
    33683376                         */
     
    34413449         * @since BuddyPress (1.5.0)
    34423450         *
    3443          * @param bool   $can_comment Status on if activity can be commented on.
     3451         * @param bool   $can_comment     Status on if activity can be commented on.
    34443452         * @param string $activity_action Current activity action being checked on.
    34453453         */
     
    34893497         *
    34903498         * @param bool   $can_comment Status on if activity reply can be commented on.
    3491          * @param string $comment Current comment being checked on.
     3499         * @param string $comment     Current comment being checked on.
    34923500         */
    34933501        return (bool) apply_filters( 'bp_activity_can_comment_reply', $can_comment, $comment );
     
    35403548         *
    35413549         * @param int $user_id ID of user being queried. Default: displayed user ID.
     3550         *
    35423551         * @return int The total favorite count for the specified user.
    35433552         */
     
    35913600         *
    35923601         * @param int $user_id ID of user being queried. Default: displayed user ID.
     3602         *
    35933603         * @return int The total mention count for the specified user.
    35943604         */
     
    36683678 * @param array $activity Array of activities generated from {@link bp_activity_get()}.
    36693679 * @param array $activity_ids Used for recursion purposes in this function.
     3680 *
    36703681 * @return array
    36713682 */
     
    36963707 * @uses bp_get_mentioned_user_display_name()
    36973708 *
    3698  * @param int|string $user_id_or_username See {@link bp_get_mentioned_user_display_name()}.
     3709 * @param int|string|bool $user_id_or_username See {@link bp_get_mentioned_user_display_name()}.
    36993710 */
    37003711function bp_mentioned_user_display_name( $user_id_or_username = false ) {
     
    37103721         * @uses apply_filters() To call the 'bp_get_mentioned_user_display_name' hook.
    37113722         *
    3712          * @param int|string User ID or username.
     3723         * @param int|string|bool User ID or username.
     3724         *
    37133725         * @return string The mentioned user's display name.
    37143726         */
     
    37283740                 * @since BuddyPress (1.2.0)
    37293741                 *
    3730                  * @param string     $name Display name for the mentioned user.
     3742                 * @param string     $name                Display name for the mentioned user.
    37313743                 * @param int|string $user_id_or_username User ID or username use for query.
    37323744                 */
     
    37423754 * @uses bp_get_send_public_message_button()
    37433755 *
    3744  * @param array $args See {@link bp_get_send_public_message_button()}.
     3756 * @param array|string $args See {@link bp_get_send_public_message_button()}.
    37453757 */
    37463758function bp_send_public_message_button( $args = '' ) {
     
    37583770         * @uses apply_filters() To call the 'bp_get_send_public_message_button' hook.
    37593771         *
    3760          * @param array $args {
     3772         * @param array|string $args {
    37613773         *     All arguments are optional. See {@link BP_Button} for complete
    37623774         *     descriptions.
    3763          *     @type string $id Default: 'public_message'.
    3764          *     @type string $component Default: 'activity'.
    3765          *     @type bool $must_be_logged_in Default: true.
    3766          *     @type bool $block_self Default: true.
    3767          *     @type string $wrapper_id Default: 'post-mention'.
    3768          *     @type string $link_href Default: the public message link for
    3769          *           the current member in the loop.
    3770          *     @type string $link_title Default: 'Send a public message on your
    3771          *           activity stream.'.
    3772          *     @type string $link_text Default: 'Public Message'.
    3773          *     @type string $link_class Default: 'activity-button mention'.
     3775         *     @type string $id                Default: 'public_message'.
     3776         *     @type string $component         Default: 'activity'.
     3777         *     @type bool   $must_be_logged_in Default: true.
     3778         *     @type bool   $block_self        Default: true.
     3779         *     @type string $wrapper_id        Default: 'post-mention'.
     3780         *     @type string $link_href         Default: the public message link for
     3781         *                                     the current member in the loop.
     3782         *     @type string $link_title        Default: 'Send a public message on your
     3783         *                                     activity stream.'.
     3784         *     @type string $link_text         Default: 'Public Message'.
     3785         *     @type string $link_class        Default: 'activity-button mention'.
    37743786         * }
    37753787         * @return string The button for sending a public message.
     
    38993911         *
    39003912         * @param string $retval HTML markup for the list of avatars.
    3901          * @param array  $r Array of arguments used for each avatar.
     3913         * @param array  $r      Array of arguments used for each avatar.
    39023914         * @param array  $output Array of each avatar found, before imploded into single string.
    39033915         */
     
    39353947         *
    39363948         * @param array $comments Array of {@link BP_Activity_Activity} items.
     3949         *
    39373950         * @return array Array of user IDs.
    39383951         */
     
    40054018 * @since BuddyPress (1.7.0)
    40064019 *
    4007  * @param string $output Optional. Either 'select' or 'checkbox'. Default: 'select'.
    4008  * @param array $args {
     4020 * @param string       $output Optional. Either 'select' or 'checkbox'. Default: 'select'.
     4021 * @param array|string $args {
    40094022 *     Optional extra arguments.
    4010  *     @type string $checkbox_name When returning checkboxes, sets the 'name'
    4011  *           attribute.
    4012  *     @type array|string $selected A list of types that should be checked/
    4013  *           selected.
     4023 *     @type string       $checkbox_name When returning checkboxes, sets the 'name'
     4024 *                                       attribute.
     4025 *     @type array|string $selected      A list of types that should be checked/
     4026 *                                       selected.
    40144027 * }
    40154028 */
     
    40494062                 * @since BuddyPress (1.7.0)
    40504063                 *
    4051                  * @param array  $args Array of arguments passed into function.
    4052                  * @param string $type Activity type being rendered in the output.
     4064                 * @param array  $args        Array of arguments passed into function.
     4065                 * @param string $type        Activity type being rendered in the output.
    40534066                 * @param string $description Description of the activity type being rendered.
    40544067                 */
     
    44254438 *
    44264439 * @param string $context The current context. 'activity', 'member',
    4427  *        'member_groups', 'group'.
     4440 *                            'member_groups', 'group'.
    44284441 * @uses bp_get_activity_show_filters()
    44294442 */
     
    44374450         *
    44384451         * @param string $context The current context. 'activity', 'member',
    4439          *        'member_groups', 'group'
     4452         *                            'member_groups', 'group'
     4453         *
    44404454         * @return string HTML for <option> values.
    44414455         */
     
    44874501                 * @since BuddyPress (2.2.0)
    44884502                 *
    4489                  * @param array $filters Array of filter options for the given context, in the following format: $option_value => $option_name.
     4503                 * @param array  $filters Array of filter options for the given context, in the following format: $option_value => $option_name.
    44904504                 * @param string $context Context for the filter. 'activity', 'member', 'member_groups', 'group'.
    44914505                 */
     
    45064520                 * @since BuddyPress (2.1.0)
    45074521                 *
    4508                  * @param string $output HTML output for the activity filter dropdown.
     4522                 * @param string $output  HTML output for the activity filter dropdown.
    45094523                 * @param array  $filters Array of filter options for the given context, in the following format: $option_value => $option_name.
    45104524                 * @param string $context Context for the filter. 'activity', 'member', 'member_groups', 'group'.
  • trunk/src/bp-activity/classes/class-bp-activity-activity.php

    r9819 r9833  
    123123         * Constructor method.
    124124         *
    125          * @param int $id Optional. The ID of a specific activity item.
     125         * @param int|bool $id Optional. The ID of a specific activity item.
    126126         */
    127127        public function __construct( $id = false ) {
     
    212212                 * @since BuddyPress (1.0.0)
    213213                 *
    214                  * @param BP_Activity_Activity Current instance of the activity item being saved.
     214                 * @param BP_Activity_Activity $this Current instance of the activity item being saved. Passed by reference.
    215215                 */
    216216                do_action_ref_array( 'bp_activity_before_save', array( &$this ) );
     
    249249                 * @since BuddyPress (1.0.0)
    250250                 *
    251                  * @param BP_Activity_Activity Reference to current instance of activity being saved.
     251                 * @param BP_Activity_Activity $this Current instance of activity item being saved. Passed by reference.
    252252                 */
    253253                do_action_ref_array( 'bp_activity_after_save', array( &$this ) );
     
    460460                 *
    461461                 * @param array  $where_conditions Current conditions for MySQL WHERE statement.
    462                  * @param array  $r Parsed arguments passed into method.
    463                  * @param string $select_sql Current SELECT MySQL statement at point of execution.
    464                  * @param string $from_sql Current FROM MySQL statement at point of execution.
    465                  * @param string $join_sql Current INNER JOIN MySQL statement at point of execution.
     462                 * @param array  $r                Parsed arguments passed into method.
     463                 * @param string $select_sql       Current SELECT MySQL statement at point of execution.
     464                 * @param string $from_sql         Current FROM MySQL statement at point of execution.
     465                 * @param string $join_sql         Current INNER JOIN MySQL statement at point of execution.
    466466                 */
    467467                $where_conditions = apply_filters( 'bp_activity_get_where_conditions', $where_conditions, $r, $select_sql, $from_sql, $join_sql );
     
    509509                 * @since BuddyPress (2.0.0)
    510510                 *
    511                  * @param bool                 Whether to use legacy structure or not.
    512                  * @param BP_Activity_Activity Current method being called.
    513                  * @param array                $r Parsed arguments passed into method.
     511                 * @param bool                 $value Whether to use legacy structure or not.
     512                 * @param BP_Activity_Activity $value Current method being called.
     513                 * @param array                $r     Parsed arguments passed into method.
    514514                 */
    515515                if ( apply_filters( 'bp_use_legacy_activity_query', false, __METHOD__, $r ) ) {
     
    532532                                 * @since BuddyPress (1.5.0)
    533533                                 *
    534                                  * @param string Concatenated MySQL statement pieces to be query results with for legacy query.
     534                                 * @param string $value      Concatenated MySQL statement pieces to be query results with for legacy query.
    535535                                 * @param string $select_sql Final SELECT MySQL statement portion for legacy query.
    536                                  * @param string $from_sql Final FROM MySQL statement portion for legacy query.
    537                                  * @param string $where_sql Final WHERE MySQL statement portion for legacy query.
    538                                  * @param string $sort Final sort direction for legacy query.
     536                                 * @param string $from_sql   Final FROM MySQL statement portion for legacy query.
     537                                 * @param string $where_sql  Final WHERE MySQL statement portion for legacy query.
     538                                 * @param string $sort       Final sort direction for legacy query.
    539539                                 */
    540540                                $activities = $wpdb->get_results( apply_filters( 'bp_activity_get_user_join_filter', "{$select_sql} {$from_sql} {$join_sql} {$where_sql} ORDER BY a.date_recorded {$sort}", $select_sql, $from_sql, $where_sql, $sort, $pag_sql ) );
     
    557557                         *
    558558                         * @param string $activity_ids_sql MySQL statement used to query for Activity IDs.
    559                          * @param array  $r Array of arguments passed into method.
     559                         * @param array  $r                Array of arguments passed into method.
    560560                         */
    561561                        $activity_ids_sql = apply_filters( 'bp_activity_paged_activities_sql', $activity_ids_sql, $r );
     
    607607                         * @since BuddyPress (1.5.0)
    608608                         *
    609                          * @param string MySQL statement used to query for total activities.
     609                         * @param string $value     MySQL statement used to query for total activities.
    610610                         * @param string $where_sql MySQL WHERE statement portion.
    611                          * @param string $sort sort direction for query.
     611                         * @param string $sort      Sort direction for query.
    612612                         */
    613613                        $total_activities_sql = apply_filters( 'bp_activity_total_activities_sql', "SELECT count(DISTINCT a.id) FROM {$bp->activity->table_name} a {$join_sql} {$where_sql}", $where_sql, $sort );
     
    632632         *
    633633         * @param array $activity_ids Array of activity IDs.
     634         *
    634635         * @return array
    635636         */
     
    696697         *
    697698         * @param array $activities Activities array.
     699         *
    698700         * @return array
    699701         */
     
    736738         *
    737739         * @param array $activities Array of activities.
     740         *
     741         * @return array $activities Array of activities.
    738742         */
    739743        protected static function prefetch_object_data( $activities ) {
     
    760764         *
    761765         * @param array $activities Array of activities.
     766         *
    762767         * @return array
    763768         */
     
    787792         *
    788793         * @param array $meta_query An array of meta_query filters. See the
    789          *   documentation for WP_Meta_Query for details.
     794         *                          documentation for WP_Meta_Query for details.
     795         *
    790796         * @return array $sql_array 'join' and 'where' clauses.
    791797         */
     
    827833         *
    828834         * @param array $date_query An array of date_query parameters. See the
    829          *        documentation for the first parameter of WP_Date_Query.
     835         *                          documentation for the first parameter of WP_Date_Query.
     836         *
    830837         * @return string
    831838         */
     
    855862         * @param  array $r      Current activity arguments. Same as those of BP_Activity_Activity::get(),
    856863         *                       but merged with defaults.
     864         *
    857865         * @return array 'sql' WHERE SQL string and 'override' activity args
    858866         */
     
    956964         * @deprecated Use BP_Activity_Activity::get() with an 'in' parameter instead.
    957965         *
    958          * @param mixed $activity_ids Array or comma-separated string of activity IDs to retrieve
    959          * @param int $max Maximum number of results to return. (Optional; default is no maximum)
    960          * @param int $page The set of results that the user is viewing. Used in pagination. (Optional; default is 1)
    961          * @param int $per_page Specifies how many results per page. Used in pagination. (Optional; default is 25)
    962          * @param string MySQL column sort; ASC or DESC. (Optional; default is DESC)
    963          * @param bool $display_comments Retrieve an activity item's associated comments or not. (Optional; default is false)
     966         * @param mixed    $activity_ids    Array or comma-separated string of activity IDs to retrieve
     967         * @param int|bool $max              Maximum number of results to return. (Optional; default is no maximum)
     968         * @param int      $page            The set of results that the user is viewing. Used in pagination. (Optional; default is 1)
     969         * @param int      $per_page        Specifies how many results per page. Used in pagination. (Optional; default is 25)
     970         * @param string   $sort             MySQL column sort; ASC or DESC. (Optional; default is DESC)
     971         * @param bool     $display_comments Retrieve an activity item's associated comments or not. (Optional; default is false)
    964972         * @return array
    965973         */
     
    10411049         *
    10421050         * @param array $args {
    1043          *     @int $id Optional. The ID of a specific item to delete.
    1044          *     @string $action Optional. The action to filter by.
    1045          *     @string $content Optional. The content to filter by.
    1046          *     @string $component Optional. The component name to filter by.
    1047          *     @string $type Optional. The activity type to filter by.
    1048          *     @string $primary_link Optional. The primary URL to filter by.
    1049          *     @int $user_id Optional. The user ID to filter by.
    1050          *     @int $item_id Optional. The associated item ID to filter by.
    1051          *     @int $secondary_item_id Optional. The secondary associated item ID to filter by.
    1052          *     @string $date_recorded Optional. The date to filter by.
    1053          *     @int $hide_sitewide Optional. Default: false.
     1051         *     @int    $id                Optional. The ID of a specific item to delete.
     1052         *     @string $action            Optional. The action to filter by.
     1053         *     @string $content           Optional. The content to filter by.
     1054         *     @string $component         Optional. The component name to filter by.
     1055         *     @string $type              Optional. The activity type to filter by.
     1056         *     @string $primary_link      Optional. The primary URL to filter by.
     1057         *     @int    $user_id          Optional. The user ID to filter by.
     1058         *     @int    $item_id          Optional. The associated item ID to filter by.
     1059         *     @int    $secondary_item_id Optional. The secondary associated item ID to filter by.
     1060         *     @string $date_recorded     Optional. The date to filter by.
     1061         *     @int    $hide_sitewide    Optional. Default: false.
    10541062         * }
     1063         *
    10551064         * @return array|bool An array of deleted activity IDs on success, false on failure.
    10561065         */
     
    12161225         *
    12171226         * @param array $activity_ids Activity IDs whose comments should be deleted.
    1218          * @param bool $delete_meta Should we delete the activity meta items for these comments?
     1227         * @param bool  $delete_meta  Should we delete the activity meta items for these comments?
     1228         *
    12191229         * @return bool True on success.
    12201230         */
     
    12451255         *
    12461256         * @param array $activity_ids Activity IDs whose meta should be deleted.
     1257         *
    12471258         * @return bool True on success.
    12481259         */
     
    12641275         * @global wpdb $wpdb WordPress database object
    12651276         *
    1266          * @param array $activities Activities to fetch comments for.
    1267          * @param bool $spam Optional. 'ham_only' (default), 'spam_only' or 'all'.
     1277         * @param array  $activities Activities to fetch comments for.
     1278         * @param string $spam       Optional. 'ham_only' (default), 'spam_only' or 'all'.
     1279         *
    12681280         * @return array The updated activities with nested comments.
    12691281         */
     
    12941306         * @global wpdb $wpdb WordPress database object.
    12951307         *
    1296          * @param int $activity_id Activity ID to fetch comments for.
    1297          * @param int $left Left-most node boundary.
    1298          * @param into $right Right-most node boundary.
    1299          * @param bool $spam Optional. 'ham_only' (default), 'spam_only' or 'all'.
    1300          * @param int $top_level_parent_id Optional. The id of the root-level parent activity item.
     1308         * @param int    $activity_id         Activity ID to fetch comments for.
     1309         * @param int    $left                Left-most node boundary.
     1310         * @param int    $right               Right-most node boundary.
     1311         * @param string $spam                Optional. 'ham_only' (default), 'spam_only' or 'all'.
     1312         * @param int    $top_level_parent_id Optional. The id of the root-level parent activity item.
     1313         *
    13011314         * @return array The updated activities with nested comments.
    13021315         */
     
    13481361                         * @since BuddyPress (2.0.0)
    13491362                         *
    1350                          * @param bool                 Whether or not to use the legacy query.
    1351                          * @param BP_Activity_Activity Magic method referring to currently called method.
    1352                          * @param array $func_args    Array of the method's argument list.
     1363                         * @param bool                 $value     Whether or not to use the legacy query.
     1364                         * @param BP_Activity_Activity $value     Magic method referring to currently called method.
     1365                         * @param array                $func_args Array of the method's argument list.
    13531366                         */
    13541367                        if ( apply_filters( 'bp_use_legacy_activity_query', false, __METHOD__, $func_args ) ) {
     
    13591372                                 * @since BuddyPress (1.5.0)
    13601373                                 *
    1361                                  * @param string Prepared statement for the activity query.
     1374                                 * @param string $value       Prepared statement for the activity query.
    13621375                                 * @param int    $activity_id Activity ID to fetch comments for.
    1363                                  * @param int    $left Left-most node boundary.
    1364                                  * @param int    $right Right-most node boundary.
    1365                                  * @param string $spam_sql SQL Statement portion to differentiate between ham or spam.
     1376                                 * @param int    $left        Left-most node boundary.
     1377                                 * @param int    $right       Right-most node boundary.
     1378                                 * @param string $spam_sql    SQL Statement portion to differentiate between ham or spam.
    13661379                                 */
    13671380                                $sql = apply_filters( 'bp_activity_comments_user_join_filter', $wpdb->prepare( "SELECT a.*, u.user_email, u.user_nicename, u.user_login, u.display_name{$fullname_select} FROM {$bp->activity->table_name} a, {$wpdb->users} u{$fullname_from} WHERE u.ID = a.user_id {$fullname_where} AND a.type = 'activity_comment' {$spam_sql} AND a.item_id = %d AND a.mptt_left > %d AND a.mptt_left < %d ORDER BY a.date_recorded ASC", $top_level_parent_id, $left, $right ), $activity_id, $left, $right, $spam_sql );
     
    14891502         *
    14901503         * @param int $parent_id ID of an activity or activity comment.
     1504         *
    14911505         * @return object Numerically indexed array of child comments.
    14921506         */
     
    15071521         *        the activity table, but these items are not full-fledged
    15081522         *        activity items.) Default: true.
     1523         *
    15091524         * @return array List of component names.
    15101525         */
     
    15271542         *
    15281543         * @param int $limit Optional. Number of items to fetch. Default: 35.
     1544         *
    15291545         * @return array $activity_feed List of activity items, with RSS data added.
    15301546         */
     
    15511567         * @see BP_Activity_Activity::get_filter_sql()
    15521568         *
    1553          * @param string $field The database field.
     1569         * @param string     $field The database field.
    15541570         * @param array|bool $items The values for the IN clause, or false when none are found.
     1571         *
     1572         * @return string|bool.
    15551573         */
    15561574        public static function get_in_operator_sql( $field, $items ) {
     
    15871605         * @param array $filter_array {
    15881606         *     Fields and values to filter by.
    1589          *     @type array|string|id $user_id User ID(s).
    1590          *     @type array|string $object Corresponds to the 'component'
    1591          *           column in the database.
    1592          *     @type array|string $action Corresponds to the 'type' column
    1593          *           in the database.
    1594          *     @type array|string|int $primary_id Corresponds to the 'item_id'
    1595          *           column in the database.
     1607         *
     1608         *     @type array|string|int $user_id User ID(s).
     1609         *     @type array|string     $object       Corresponds to the 'component'
     1610         *                                          column in the database.
     1611         *     @type array|string     $action       Corresponds to the 'type' column
     1612         *                                          in the database.
     1613         *     @type array|string|int $primary_id   Corresponds to the 'item_id'
     1614         *                                          column in the database.
    15961615         *     @type array|string|int $secondary_id Corresponds to the
    1597          *           'secondary_item_id' column in the database.
    1598          *     @type int $offset Return only those items with an ID greater
    1599          *           than the offset value.
    1600          *     @type string $since Return only those items that have a
    1601          *           date_recorded value greater than a given MySQL-formatted
    1602          *           date.
     1616         *                                          'secondary_item_id' column in the database.
     1617         *     @type int              $offset      Return only those items with an ID greater
     1618         *                                          than the offset value.
     1619         *     @type string           $since        Return only those items that have a
     1620         *                                          date_recorded value greater than a
     1621         *                                          given MySQL-formatted date.
    16031622         * }
     1623         *
    16041624         * @return string The filter clause, for use in a SQL query.
    16051625         */
     
    16781698         * @since BuddyPress (1.2.0)
    16791699         *
    1680          * @param int The ID of the user whose favorites you're counting.
    1681          * @return int A count of the user's favorites.
     1700         * @param int $user_id The ID of the user whose favorites you're counting.
     1701         *
     1702         * @return int $value A count of the user's favorites.
    16821703         */
    16831704        public static function total_favorite_count( $user_id ) {
     
    16971718         *
    16981719         * @param string $content The content to filter by.
     1720         *
    16991721         * @return int|bool The ID of the first matching item if found, otherwise false.
    17001722         */
     
    17111733         *
    17121734         * @param int $user_id The ID of the user whose activity you want to mark hidden.
    1713          * @param int
     1735         *
     1736         * @return mixed
    17141737         */
    17151738        public static function hide_all_for_user( $user_id ) {
     
    17391762         * @param  array $base         Array with keys needing to be replaced
    17401763         * @param  array $replacements Array with the replaced keys
     1764         *
    17411765         * @return array
    17421766         */
  • trunk/src/bp-activity/classes/class-bp-activity-feed.php

    r9819 r9833  
    1818 * See {@link bp_activity_action_sitewide_feed()} as an example.
    1919 *
    20  * Accepted parameters:
    21  *   id               - internal id for the feed; should be alphanumeric only
    22  *                      (required)
    23  *   title            - RSS feed title
    24  *   link             - Relevant link for the RSS feed
    25  *   description      - RSS feed description
    26  *   ttl              - Time-to-live (see inline doc in constructor)
    27  *   update_period    - Part of the syndication module (see inline doc in
    28  *                      constructor for more info)
    29  *   update_frequency - Part of the syndication module (see inline doc in
    30  *                      constructor for more info)
    31  *   max              - Number of feed items to display
    32  *   activity_args    - Arguments passed to {@link bp_has_activities()}
    33  *
     20 * @param array $args {
     21 *   @type string $id               Required. Internal id for the feed; should be alphanumeric only.
     22 *   @type string $title            Optional. RSS feed title.
     23 *   @type string $link             Optional. Relevant link for the RSS feed.
     24 *   @type string $description      Optional. RSS feed description.
     25 *   @type string $ttl              Optional. Time-to-live. (see inline doc in constructor)
     26 *   @type string $update_period    Optional. Part of the syndication module.
     27 *                                            (see inline doc in constructor for more info)
     28 *   @type string $update_frequency Optional. Part of the syndication module.
     29 *                                            (see inline doc in constructor for more info)
     30 *   @type string $max              Optional. Number of feed items to display.
     31 *   @type array  $activity_args    Optional. Arguments passed to {@link bp_has_activities()}
     32 * }
    3433 * @since BuddyPress (1.8.0)
    3534 */
    3635class BP_Activity_Feed {
     36
    3737        /**
    3838         * Holds our custom class properties.
     
    5050         *
    5151         * @param string $key
     52         *
     53         * @return bool Whether or not data variable exists.
    5254         */
    5355        public function __isset( $key ) { return isset( $this->data[$key] ); }
     
    5759         *
    5860         * @param string $key
     61         *
     62         * @return mixed Data in variable if available or null.
    5963         */
    6064        public function __get( $key ) { return isset( $this->data[$key] ) ? $this->data[$key] : null; }
     
    124128                 * @since BuddyPress (1.8.0)
    125129                 *
    126                  * @param BP_Activity_Feed Reference to current instance of activity feed.
     130                 * @param BP_Activity_Feed $this Current instance of activity feed. Passed by reference.
    127131                 */
    128132                do_action_ref_array( 'bp_activity_feed_prefetch', array( &$this ) );
     
    142146                 * @since BuddyPress (1.8.0)
    143147                 *
    144                  * @param BP_Activity_Feed Reference to current instance of activity feed.
     148                 * @param BP_Activity_Feed $this Current instance of activity feed. Passed by reference.
    145149                 */
    146150                do_action_ref_array( 'bp_activity_feed_postfetch', array( &$this ) );
  • trunk/src/bp-activity/classes/class-bp-activity-query.php

    r9819 r9833  
    9191         *
    9292         * @param string $alias An existing table alias that is compatible with the current query clause.
    93          *               Default: 'a'. BP_Activity_Activity::get() uses 'a', so we default to that.
     93         *                      Default: 'a'. BP_Activity_Activity::get() uses 'a', so we default to that.
     94         *
    9495         * @return string SQL fragment to append to the main WHERE clause.
    9596         */
     
    116117         * @param  array $clause       Array of arguments belonging to the clause.
    117118         * @param  array $parent_query Parent query to which the clause belongs.
     119         *
    118120         * @return array {
    119121         *     @type array $where Array of subclauses for the WHERE statement.
     
    226228         * @access protected
    227229         *
    228          * @param  array $query Clause to check.
     230         * @param array $query Clause to check.
     231         *
    229232         * @return bool
    230233         */
     
    243246         *
    244247         * @param string $column The user-supplied column name.
     248         *
    245249         * @return string A validated column name value.
    246250         */
Note: See TracChangeset for help on using the changeset viewer.