WordPress.org

Make WordPress Core

Ticket #10521: xmlrpc-post_parent-patch.txt

File xmlrpc-post_parent-patch.txt, 479 bytes (added by c0nstruct, 6 years ago)

Patch used to fix my xml-rpc.php

Line 
12272c2272
2<               $attachments = $wpdb->get_results( "SELECT ID, guid FROM {$wpdb->posts} WHERE post_parent = '-1' AND post_type = 'attachment'" );
3---
4>               $attachments = $wpdb->get_results( "SELECT ID, guid FROM {$wpdb->posts} WHERE post_parent = '0' AND post_type = 'attachment'" );
52876,2877c2876,2877
6<               // attach to post_id -1
7<               $post_id = -1;
8---
9>               // attach to post_id 0
10>               $post_id = 0;