[ Index ]

PHP Cross Reference of BuddyPress

title

Body

[close]

/src/bp-core/deprecated/ -> 1.2.php (source)

   1  <?php
   2  /**
   3   * Deprecated Functions
   4   *
   5   * @package BuddyPress
   6   * @subpackage Core
   7   */
   8  
   9  /**
  10   * Retrieve sitewide activity
  11   *
  12   * You should use bp_activity_get() instead
  13   *
  14   * @since 1.0.0
  15   * @deprecated 1.2.0
  16   *
  17   * @param string|array $args
  18   *
  19   * @return object $activity The activity/activities object
  20   */
  21  function bp_activity_get_sitewide( $args = '' ) {
  22      _deprecated_function( __FUNCTION__, '1.2', 'bp_activity_get()' );
  23  
  24      $defaults = array(
  25          'max'              => false,  // Maximum number of results to return.
  26          'page'             => 1,      // Page 1 without a per_page will result in no pagination.
  27          'per_page'         => false,  // Results per page.
  28          'sort'             => 'DESC', // Sort ASC or DESC.
  29          'display_comments' => false,  // False for no comments. 'stream' for within stream display, 'threaded' for below each activity item.
  30  
  31          'search_terms'     => false,  // Pass search terms as a string.
  32          'show_hidden'      => false,  // Show activity items that are hidden site-wide?
  33  
  34          /**
  35           * Pass filters as an array:
  36           * array(
  37           *     'user_id'      => false,  // user_id to filter on.
  38           *    'object'       => false,  // Object to filter on e.g. groups, profile, status, friends.
  39           *    'action'       => false,  // Action to filter on e.g. new_wire_post, new_forum_post, profile_updated.
  40           *    'primary_id'   => false,  // Object ID to filter on e.g. a group_id or forum_id or blog_id etc.
  41           *    'secondary_id' => false,  // Secondary object ID to filter on e.g. a post_id.
  42           * );
  43           */
  44          'filter' => array()
  45      );
  46  
  47      $args = bp_parse_args(
  48          $args,
  49          $defaults
  50      );
  51  
  52      return apply_filters( 'bp_activity_get_sitewide', BP_Activity_Activity::get( $args ), $r );
  53  }
  54  
  55  


Generated: Fri Dec 13 01:00:56 2024 Cross-referenced by PHPXref 0.7.1