Make WordPress Core


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.1/wp-includes/meta.php

    r18031 r17531  
    4646        $meta_key = stripslashes($meta_key);
    4747        $meta_value = stripslashes_deep($meta_value);
    48         $meta_value = sanitize_meta( $meta_key, $meta_value, $meta_type );
    4948
    5049        $check = apply_filters( "add_{$meta_type}_metadata", null, $object_id, $meta_key, $meta_value, $unique );
    … …  
    115114        $meta_key = stripslashes($meta_key);
    116115        $meta_value = stripslashes_deep($meta_value);
    117         $meta_value = sanitize_meta( $meta_key, $meta_value, $meta_type );
    118116
    119117        $check = apply_filters( "update_{$meta_type}_metadata", null, $object_id, $meta_key, $meta_value, $prev_value );
    … …  
    491489        return $wpdb->$table_name;
    492490}
    493 
    494 /**
    495  * Determine whether a meta key is protected
    496  *
    497  * @since 3.1.3
    498  *
    499  * @param string $meta_key Meta key
    500  * @return bool True if the key is protected, false otherwise.
    501  */
    502 function is_protected_meta( $meta_key, $meta_type = null ) {
    503         $protected = (  '_' == $meta_key[0] );
    504 
    505         return apply_filters( 'is_protected_meta', $protected, $meta_key, $meta_type );
    506 }
    507 
    508 /**
    509  * Sanitize meta value
    510  *
    511  * @since 3.1.3
    512  *
    513  * @param string $meta_key Meta key
    514  * @param mixed $meta_value Meta value to sanitize
    515  * @param string $meta_type Type of meta
    516  * @return mixed Sanitized $meta_value
    517  */
    518 function sanitize_meta( $meta_key, $meta_value, $meta_type = null ) {
    519         return apply_filters( 'sanitize_meta', $meta_value, $meta_key, $meta_type );
    520 }
    521 
    522491?>
Note: See TracChangeset for help on using the changeset viewer.