Changeset 11930 for trunk/wp-includes/post.php
- Timestamp:
- 09/14/2009 02:03:32 PM (17 years ago)
- File:
-
- 1 edited
-
trunk/wp-includes/post.php (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/post.php
r11911 r11930 136 136 137 137 $children = get_posts( $r ); 138 138 139 139 if ( !$children ) 140 140 return $kids; … … 584 584 585 585 wp_cache_delete($post_id, 'post_meta'); 586 586 587 587 do_action( 'deleted_post_meta', $meta_id, $post_id, $meta_key, $meta_value ); 588 588 … … 673 673 674 674 do_action( 'update_post_meta', $meta_id, $post_id, $meta_key, $meta_value ); 675 675 676 676 $wpdb->update( $wpdb->postmeta, $data, $where ); 677 677 wp_cache_delete($post_id, 'post_meta'); 678 678 679 679 do_action( 'updated_post_meta', $meta_id, $post_id, $meta_key, $meta_value ); 680 680 681 681 return true; 682 682 } … … 1155 1155 if ( ($post->post_type == 'post' || $post->post_type == 'page') && get_post_status($postid) != 'trash' && EMPTY_TRASH_DAYS > 0 ) 1156 1156 return wp_trash_post($postid); 1157 1157 1158 1158 if ( $post->post_type == 'attachment' ) 1159 1159 return wp_delete_attachment($postid); 1160 1160 1161 1161 do_action('delete_post', $postid); 1162 1162 1163 1163 delete_post_meta($postid,'_wp_trash_meta_status'); 1164 1164 delete_post_meta($postid,'_wp_trash_meta_time'); … … 1820 1820 if ( in_array( $post_status, array( 'draft', 'pending' ) ) ) 1821 1821 return $slug; 1822 1822 1823 1823 global $wpdb, $wp_rewrite; 1824 1824 $hierarchical_post_types = apply_filters('hierarchical_post_types', array('page')); … … 1827 1827 $check_sql = "SELECT post_name FROM $wpdb->posts WHERE post_name = %s AND ID != %d LIMIT 1"; 1828 1828 $post_name_check = $wpdb->get_var($wpdb->prepare($check_sql, $slug, $post_ID)); 1829 1829 1830 1830 if ( $post_name_check || in_array($slug, $wp_rewrite->feeds) ) { 1831 1831 $suffix = 2; … … 1842 1842 $check_sql = "SELECT post_name FROM $wpdb->posts WHERE post_name = %s AND post_type IN ( '" . implode("', '", $wpdb->escape($hierarchical_post_types)) . "' ) AND ID != %d AND post_parent = %d LIMIT 1"; 1843 1843 $post_name_check = $wpdb->get_var($wpdb->prepare($check_sql, $slug, $post_ID, $post_parent)); 1844 1844 1845 1845 if ( $post_name_check || in_array($slug, $wp_rewrite->feeds) ) { 1846 1846 $suffix = 2; … … 1856 1856 $check_sql = "SELECT post_name FROM $wpdb->posts WHERE post_name = %s AND post_type = %s AND ID != %d LIMIT 1"; 1857 1857 $post_name_check = $wpdb->get_var($wpdb->prepare($check_sql, $slug, $post_type, $post_ID)); 1858 1858 1859 1859 if ( $post_name_check || in_array($slug, $wp_rewrite->feeds) ) { 1860 1860 $suffix = 2;
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)