Ticket #36824: 36824.patch
File 36824.patch, 3.3 KB (added by , 9 years ago) |
---|
-
src/wp-includes/comment.php
2263 2263 global $wpdb; 2264 2264 2265 2265 // Do pingbacks 2266 while ($ping = $wpdb->get_row("SELECT ID, post_content, meta_id FROM {$wpdb->posts}, {$wpdb->postmeta} WHERE {$wpdb->posts}.ID = {$wpdb->postmeta}.post_id AND {$wpdb->postmeta}.meta_key = '_pingme' LIMIT 1")) { 2267 delete_metadata_by_mid( 'post', $ping->meta_id ); 2266 $pings = get_posts( array( 'post_type' => 'any', 'posts_per_page' => -1, 'meta_value' => '_pingme', 'fields' => 'ids' ) ); 2267 foreach ( $pings as $ping ) { 2268 delete_post_meta( $ping->ID, '_pingme' ); 2268 2269 pingback( $ping->post_content, $ping->ID ); 2269 2270 } 2270 2271 2271 2272 // Do Enclosures 2272 while ($enclosure = $wpdb->get_row("SELECT ID, post_content, meta_id FROM {$wpdb->posts}, {$wpdb->postmeta} WHERE {$wpdb->posts}.ID = {$wpdb->postmeta}.post_id AND {$wpdb->postmeta}.meta_key = '_encloseme' LIMIT 1")) { 2273 delete_metadata_by_mid( 'post', $enclosure->meta_id ); 2273 $enclosures = get_posts( array( 'post_type' => 'any', 'posts_per_page' => -1, 'meta_value' => '_encloseme', 'fields' => 'ids' ) ); 2274 foreach ( $enclosures as $enclosure ) { 2275 delete_post_meta( $enclosure->ID, '_encloseme' ); 2274 2276 do_enclose( $enclosure->post_content, $enclosure->ID ); 2275 2277 } 2276 2278 2277 2279 // Do Trackbacks 2278 $trackbacks = $wpdb->get_col("SELECT ID FROM $wpdb->posts WHERE to_ping <> '' AND post_status = 'publish'");2279 if ( is_array($trackbacks) )2280 foreach ( $trackbacks as $trackback )2281 do_trackbacks($trackback);2280 $trackbacks = get_posts( array( 'post_type' => 'any', 'posts_per_page' => -1, 'to_ping' => '', 'fields' => 'ids' ) ); 2281 foreach ( $trackbacks as $trackback ) { 2282 do_trackbacks( $trackback ); 2283 } 2282 2284 2283 2285 //Do Update Services/Generic Pings 2284 2286 generic_ping(); -
src/wp-includes/query.php
1565 1565 * @type array $tax_query An associative array of WP_Tax_Query arguments. 1566 1566 * See WP_Tax_Query->queries. 1567 1567 * @type string $title Post title. 1568 * @type string $to_ping Post ping status. Default false. 1568 1569 * @type bool $update_post_meta_cache Whether to update the post meta cache. Default true. 1569 1570 * @type bool $update_post_term_cache Whether to update the post term cache. Default true. 1570 1571 * @type int $w The week number of the year. Default empty. Accepts numbers 0-53. … … 1599 1600 $qv['pagename'] = trim( $qv['pagename'] ); 1600 1601 $qv['name'] = trim( $qv['name'] ); 1601 1602 $qv['title'] = trim( $qv['title'] ); 1603 $qv['to_ping'] = isset( $qv['to_ping'] ) ? $qv['to_ping'] : false; 1602 1604 if ( '' !== $qv['hour'] ) $qv['hour'] = absint($qv['hour']); 1603 1605 if ( '' !== $qv['minute'] ) $qv['minute'] = absint($qv['minute']); 1604 1606 if ( '' !== $qv['second'] ) $qv['second'] = absint($qv['second']); … … 3076 3078 $post_type_object = get_post_type_object ( 'post' ); 3077 3079 } 3078 3080 3081 if ( $q['to_ping'] !== false ) { 3082 $where .= " AND {$wpdb->posts}.to_ping = " . $q['to_ping']; 3083 } 3084 3079 3085 $edit_cap = 'edit_post'; 3080 3086 $read_cap = 'read_post'; 3081 3087