Skip to:
Content

BuddyPress.org

Ticket #5023: 5023.1.diff

File 5023.1.diff, 2.0 KB (added by ericlewis, 12 years ago)

add _deprecated_function call

  • bp-activity/bp-activity-functions.php

     
    942942        return apply_filters_ref_array( 'bp_activity_get', array( &$activity, &$r ) );
    943943}
    944944
     945        /**
     946         * Retrieve sitewide activity
     947         *
     948         * You should use bp_activity_get() instead
     949         *
     950         * @since BuddyPress (1.0)
     951         * @deprecated BuddyPress (1.2)
     952         *
     953         * @param array $args
     954         *
     955         * @uses BP_Activity_Activity::get() {@link BP_Activity_Activity}
     956         *
     957         * @return object $activity The activity/activities object
     958         */
     959        function bp_activity_get_sitewide( $args = '' ) {
     960                _deprecated_function( __FUNCTION__, '1.2', 'bp_activity_get()' );
     961
     962                $defaults = array(
     963                        'max' => false, // Maximum number of results to return
     964                        'page' => 1, // page 1 without a per_page will result in no pagination.
     965                        'per_page' => false, // results per page
     966                        'sort' => 'DESC', // sort ASC or DESC
     967                        'display_comments' => false, // false for no comments. 'stream' for within stream display, 'threaded' for below each activity item
     968
     969                        'search_terms' => false, // Pass search terms as a string
     970                        'show_hidden' => false, // Show activity items that are hidden site-wide?
     971
     972                        /**
     973                         * Pass filters as an array:
     974                         * array(
     975                         *      'user_id' => false, // user_id to filter on
     976                         *      'object' => false, // object to filter on e.g. groups, profile, status, friends
     977                         *      'action' => false, // action to filter on e.g. new_wire_post, new_forum_post, profile_updated
     978                         *      'primary_id' => false, // object ID to filter on e.g. a group_id or forum_id or blog_id etc.
     979                         *      'secondary_id' => false, // secondary object ID to filter on e.g. a post_id
     980                         * );
     981                         */
     982                        'filter' => array()
     983                );
     984
     985                $args = wp_parse_args( $args, $defaults );
     986
     987                return apply_filters( 'bp_activity_get_sitewide', BP_Activity_Activity::get( $args ), &$r );
     988        }
     989
    945990/**
    946991 * Fetch specific activity items
    947992 *