Changeset 10810 for trunk/wp-includes/post.php
- Timestamp:
- 03/18/2009 02:43:45 AM (17 years ago)
- File:
-
- 1 edited
-
trunk/wp-includes/post.php (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/post.php
r10730 r10810 513 513 if ( !$meta_key ) 514 514 return false; 515 515 516 516 global $wpdb; 517 517 … … 564 564 if ( !$meta_key ) 565 565 return false; 566 566 567 567 if ( empty( $meta_value ) ) 568 568 $meta_id = $wpdb->get_var( $wpdb->prepare( "SELECT meta_id FROM $wpdb->postmeta WHERE post_id = %d AND meta_key = %s", $post_id, $meta_key ) ); … … 598 598 if ( !$key ) 599 599 return ''; 600 600 601 601 $post_id = (int) $post_id; 602 602 … … 649 649 if ( !$meta_key ) 650 650 return false; 651 651 652 652 if ( ! $wpdb->get_var( $wpdb->prepare( "SELECT meta_key FROM $wpdb->postmeta WHERE meta_key = %s AND post_id = %d", $meta_key, $post_id ) ) ) { 653 653 return add_post_meta($post_id, $meta_key, $meta_value); … … 681 681 if ( !$post_meta_key ) 682 682 return false; 683 683 684 684 global $wpdb; 685 685 if ( $wpdb->query($wpdb->prepare("DELETE FROM $wpdb->postmeta WHERE meta_key = %s", $post_meta_key)) ) { … … 757 757 if ( !$key ) 758 758 return null; 759 759 760 760 $custom = get_post_custom($post_id); 761 761 … … 1547 1547 if ( !empty($tax_input) ) { 1548 1548 foreach ( $tax_input as $taxonomy => $tags ) { 1549 wp_set_post_terms( $post_ID, $tags, $taxonomy ); 1549 wp_set_post_terms( $post_ID, $tags, $taxonomy ); 1550 1550 } 1551 1551 } … … 3527 3527 $post = _wp_post_revision_fields( $post, $autosave ); 3528 3528 $post = add_magic_quotes($post); //since data is from db 3529 3529 3530 3530 $revision_id = wp_insert_post( $post ); 3531 3531 if ( is_wp_error($revision_id) ) … … 3603 3603 3604 3604 $update['ID'] = $revision['post_parent']; 3605 3605 3606 3606 $update = add_magic_quotes( $update ); //since data is from db 3607 3607
Note: See TracChangeset
for help on using the changeset viewer.