bp_activity_privacy_cmp_position

The BuddyPress Activity Privacy bp activity privacy cmp position function.

Description

bp_activity_privacy_cmp_position( $a, $b ); 

Parameters (2)

0. $a
The a.
1. $b
The b.

Usage

  1. if ( !function_exists( 'bp_activity_privacy_cmp_position' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress-activity-privacy/includes/bp-activity-privacy-functions.php'; 
  3.  
  4. // The a. 
  5. $a = null; 
  6.  
  7. // The b. 
  8. $b = null; 
  9.  
  10. // NOTICE! Understand what this does before running. 
  11. $result = bp_activity_privacy_cmp_position($a, $b); 
  12.  

Defined (1)

The function is defined in the following location(s).

/includes/bp-activity-privacy-functions.php  
  1. function bp_activity_privacy_cmp_position($a, $b) { 
  2. if ($a['position'] == $b['position']) { 
  3. return 0; 
  4. return ($a['position'] < $b['position']) ? -1 : 1;