_bb_append_meta_sort

Sorts meta keys by length to ensure $appended_object->{$bbdb->prefix} key overwrites $appended_object->key as desired.

Description

_bb_append_meta_sort( $a, $b ); 

Parameters (2)

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

Usage

  1. if ( !function_exists( '_bb_append_meta_sort' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-forums/bbpress/bb-includes/functions.bb-meta.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 = _bb_append_meta_sort($a, $b); 
  12.  

Defined (1)

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

/bp-forums/bbpress/bb-includes/functions.bb-meta.php  
  1. function _bb_append_meta_sort( $a, $b ) 
  2. return strlen( $a->meta_key ) - strlen( $b->meta_key );