Changeset 14547
- Timestamp:
- 05/10/2010 08:51:58 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/meta.php
r14546 r14547 22 22 * @param string $meta_type Type of object metadata is for (e.g., comment, post, or user) 23 23 * @param int $object_id ID of the object metadata is for 24 * @param string $meta_key Metadata key . Expected unslashed.24 * @param string $meta_key Metadata key 25 25 * @param string $meta_value Metadata value 26 26 * @param bool $unique Optional, default is false. Whether the specified metadata key should be … … 43 43 $column = esc_sql($meta_type . '_id'); 44 44 45 // expected_slashed ($meta_key) 46 $meta_key = stripslashes($meta_key); 47 45 48 if ( $unique && $wpdb->get_var( $wpdb->prepare( 46 49 "SELECT COUNT(*) FROM $table WHERE meta_key = %s AND $column = %d", … … 80 83 * @param string $meta_type Type of object metadata is for (e.g., comment, post, or user) 81 84 * @param int $object_id ID of the object metadata is for 82 * @param string $meta_key Metadata key . Expected unslashed.85 * @param string $meta_key Metadata key 83 86 * @param string $meta_value Metadata value 84 87 * @param string $prev_value Optional. If specified, only update existing metadata entries with … … 100 103 $column = esc_sql($meta_type . '_id'); 101 104 $id_column = 'user' == $meta_type ? 'umeta_id' : 'meta_id'; 105 106 // expected_slashed ($meta_key) 107 $meta_key = stripslashes($meta_key); 102 108 103 109 if ( ! $meta_id = $wpdb->get_var( $wpdb->prepare( "SELECT $id_column FROM $table WHERE meta_key = %s AND $column = %d", $meta_key, $object_id ) ) ) … … 138 144 * @param string $meta_type Type of object metadata is for (e.g., comment, post, or user) 139 145 * @param int $object_id ID of the object metadata is for 140 * @param string $meta_key Metadata key . Expected unslashed.146 * @param string $meta_key Metadata key 141 147 * @param string $meta_value Optional. Metadata value. If specified, only delete metadata entries 142 148 * with this value. Otherwise, delete all entries with the specified meta_key. … … 160 166 $type_column = esc_sql($meta_type . '_id'); 161 167 $id_column = 'user' == $meta_type ? 'umeta_id' : 'meta_id'; 162 168 // expected_slashed ($meta_key) 169 $meta_key = stripslashes($meta_key); 163 170 $meta_value = maybe_serialize( stripslashes_deep($meta_value) ); 164 171
Note: See TracChangeset
for help on using the changeset viewer.