Changeset 9380
- Timestamp:
- 01/19/2015 09:07:23 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-activity/bp-activity-classes.php
r9379 r9380 860 860 * @since BuddyPress (2.2.0) 861 861 * 862 * @param string $scope The activity scope863 * @param array $rCurrent activity arguments. Same as those of BP_Activity_Activity::get(),862 * @param mixed $scope The activity scope. Accepts string or array of scopes 863 * @param array $r Current activity arguments. Same as those of BP_Activity_Activity::get(), 864 864 * but merged with defaults. 865 865 * @return array 'sql' WHERE SQL string and 'override' activity args 866 866 */ 867 public static function get_scope_query_sql( $scope = '', $r = array() ) { 867 public static function get_scope_query_sql( $scope = false, $r = array() ) { 868 869 // Define arrays for future use 868 870 $query_args = array(); 869 871 $override = array(); 870 872 $retval = array(); 871 873 872 if ( ! is_array( $scope ) ) { 874 // Check for array of scopes 875 if ( is_array( $scope ) ) { 876 $scopes = $scope; 877 878 // Explode a comma separated string of scopes 879 } elseif ( is_string( $scope ) ) { 873 880 $scopes = explode( ',', $scope ); 874 } else { 875 $scopes = $scope; 876 } 877 881 } 882 883 // Bail if no scope passed 878 884 if ( empty( $scopes ) ) { 879 return $sql;880 } 881 882 // helper to easily grab the 'user_id'885 return false; 886 } 887 888 // Helper to easily grab the 'user_id' 883 889 if ( ! empty( $r['filter']['user_id'] ) ) { 884 890 $r['user_id'] = $r['filter']['user_id'];
Note: See TracChangeset
for help on using the changeset viewer.