Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
03/14/2014 01:12:13 AM (10 years ago)
Author:
boonebgorges
Message:

Remove unnecessary parameter sanitization from meta functions

WP's meta API functions already perform the necessary sanitization.

See #5399

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-xprofile/bp-xprofile-functions.php

    r8134 r8135  
    579579    global $wpdb;
    580580
    581     // Legacy - no empty object id
    582     if ( empty( $object_id ) ) {
    583         return false;
    584     }
    585 
    586     // Legacy - sanitize object type
     581    // Sanitize object type
    587582    if ( ! in_array( $object_type, array( 'group', 'field', 'data' ) ) ) {
    588583        return false;
     
    604599    add_filter( 'query', 'bp_xprofile_filter_meta_query' );
    605600
     601    $retval = false;
    606602    foreach ( $keys as $key ) {
    607603        $retval = delete_metadata( 'xprofile_' . $object_type, $object_id, $key, $meta_value, $delete_all );
     
    630626 */
    631627function bp_xprofile_get_meta( $object_id, $object_type, $meta_key = '', $single = true ) {
    632     // Legacy - sanitize object type
     628    // Sanitize object type
    633629    if ( ! in_array( $object_type, array( 'group', 'field', 'data' ) ) ) {
    634630        return false;
Note: See TracChangeset for help on using the changeset viewer.