Changes in branches/3.1/wp-includes/meta.php [18031:17531]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.1/wp-includes/meta.php
r18031 r17531 46 46 $meta_key = stripslashes($meta_key); 47 47 $meta_value = stripslashes_deep($meta_value); 48 $meta_value = sanitize_meta( $meta_key, $meta_value, $meta_type );49 48 50 49 $check = apply_filters( "add_{$meta_type}_metadata", null, $object_id, $meta_key, $meta_value, $unique ); … … 115 114 $meta_key = stripslashes($meta_key); 116 115 $meta_value = stripslashes_deep($meta_value); 117 $meta_value = sanitize_meta( $meta_key, $meta_value, $meta_type );118 116 119 117 $check = apply_filters( "update_{$meta_type}_metadata", null, $object_id, $meta_key, $meta_value, $prev_value ); … … 491 489 return $wpdb->$table_name; 492 490 } 493 494 /**495 * Determine whether a meta key is protected496 *497 * @since 3.1.3498 *499 * @param string $meta_key Meta key500 * @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 value510 *511 * @since 3.1.3512 *513 * @param string $meta_key Meta key514 * @param mixed $meta_value Meta value to sanitize515 * @param string $meta_type Type of meta516 * @return mixed Sanitized $meta_value517 */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 522 491 ?>
Note: See TracChangeset
for help on using the changeset viewer.