IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
2446 | 2446 | function do_all_pings() { |
2447 | 2447 | global $wpdb; |
2448 | 2448 | |
| 2449 | $post_types = get_post_types( array( 'publicly_queryable' => true ) ); |
| 2450 | |
2449 | 2451 | // Do pingbacks |
2450 | | 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")) { |
2451 | | delete_metadata_by_mid( 'post', $ping->meta_id ); |
| 2452 | $pings = get_posts( array( 'post_type' => $post_types, 'suppress_filters' => false, 'nopaging' => true, 'meta_value' => '_pingme' ) ); |
| 2453 | foreach ( $pings as $ping ) { |
| 2454 | delete_post_meta( $ping->ID, '_pingme' ); |
2452 | 2455 | pingback( $ping->post_content, $ping->ID ); |
2453 | 2456 | } |
2454 | 2457 | |
2455 | 2458 | // Do Enclosures |
2456 | | 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")) { |
2457 | | delete_metadata_by_mid( 'post', $enclosure->meta_id ); |
| 2459 | $enclosures = get_posts( array( 'post_type' => $post_types, 'suppress_filters' => false, 'nopaging' => true, 'meta_value' => '_encloseme' ) ); |
| 2460 | foreach ( $enclosures as $enclosure ) { |
| 2461 | delete_post_meta( $enclosure->ID, '_encloseme' ); |
2458 | 2462 | do_enclose( $enclosure->post_content, $enclosure->ID ); |
2459 | 2463 | } |
2460 | 2464 | |
2461 | 2465 | // Do Trackbacks |
2462 | | $trackbacks = $wpdb->get_col("SELECT ID FROM $wpdb->posts WHERE to_ping <> '' AND post_status = 'publish'"); |
2463 | | if ( is_array($trackbacks) ) |
2464 | | foreach ( $trackbacks as $trackback ) |
2465 | | do_trackbacks($trackback); |
| 2466 | $trackbacks = get_posts( array( 'post_type' => $post_types, 'suppress_filters' => false, 'nopaging' => true, 'to_ping' => true, 'fields' => 'ids' ) ); |
| 2467 | foreach ( $trackbacks as $trackback ) { |
| 2468 | do_trackbacks( $trackback ); |
| 2469 | } |
2466 | 2470 | |
2467 | 2471 | //Do Update Services/Generic Pings |
2468 | 2472 | generic_ping(); |
… |
… |
|
3013 | 3017 | * @param int $comment_post_ID Post ID. |
3014 | 3018 | */ |
3015 | 3019 | do_action( 'comment_on_draft', $comment_post_ID ); |
3016 | | |
| 3020 | |
3017 | 3021 | if ( current_user_can( 'read_post', $comment_post_ID ) ) { |
3018 | 3022 | return new WP_Error( 'comment_on_draft', __( 'Sorry, comments are not allowed for this item.' ), 403 ); |
3019 | 3023 | } else { |