Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
05/16/2011 08:54:02 PM (13 years ago)
Author:
boonebgorges
Message:

Abstracts user_meta keys so that they can be filtered. Fixes #2952

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-core/bp-core-component.php

    r4281 r4372  
    9595     * @uses apply_filters() Calls 'bp_{@link bp_Component::name}_id'
    9696     * @uses apply_filters() Calls 'bp_{@link bp_Component::name}_slug'
     97     * @uses apply_filters() Calls 'bp_user_meta_keys_$key_name'
    9798     *
    9899     * @param arr $args Used to
     
    109110            'search_string'         => '',
    110111            'global_tables'         => '',
     112            'user_meta_keys'    => array()
    111113        );
    112114        $r = wp_parse_args( $args, $defaults );
     
    128130            foreach ( $r['global_tables'] as $global_name => $table_name )
    129131                $this->$global_name = $table_name;
    130 
     132           
     133        // User meta keys
     134        if ( !empty( $r['user_meta_keys'] ) ) {
     135            foreach ( $r['user_meta_keys'] as $key_name => $key_value )
     136                $bp->user_meta_keys->$key_name = apply_filters( "bp_user_meta_keys_$key_name", $key_value );
     137        }
     138       
    131139        /** BuddyPress ********************************************************/
    132140
Note: See TracChangeset for help on using the changeset viewer.