Changeset 14789
- Timestamp:
- 05/21/2010 07:23:52 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/upload.php
r14701 r14789 21 21 wp_die( __('You are not allowed to scan for lost attachments.') ); 22 22 23 $all_posts = implode( ',', $wpdb->get_col("SELECT ID FROM $wpdb->posts WHERE post_type IN ('" . join("', '", get_post_types() ) . "')"));23 $all_posts = implode( ',', $wpdb->get_col("SELECT ID FROM $wpdb->posts WHERE post_type NOT IN ('attachment', '" . join("', '", get_post_types( array( 'public' => false ) ) ) . "')" ) ); 24 24 $lost = $wpdb->get_col("SELECT ID FROM $wpdb->posts WHERE post_type = 'attachment' AND post_parent > '0' and post_parent NOT IN ($all_posts)"); 25 25
Note: See TracChangeset
for help on using the changeset viewer.