Ticket #21827: 21827.2.patch
| File 21827.2.patch, 1.1 KB (added by SergeyBiryukov, 10 months ago) |
|---|
-
wp-includes/media.php
817 817 } 818 818 819 819 if ( !empty($include) ) { 820 $include = preg_replace( '/[^0-9,]+/', '', $include );821 820 $_attachments = get_posts( array('include' => $include, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => $order, 'orderby' => $orderby) ); 822 821 823 822 $attachments = array(); … … 825 824 $attachments[$val->ID] = $_attachments[$key]; 826 825 } 827 826 } elseif ( !empty($exclude) ) { 828 $exclude = preg_replace( '/[^0-9,]+/', '', $exclude );829 827 $attachments = get_children( array('post_parent' => $id, 'exclude' => $exclude, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => $order, 'orderby' => $orderby) ); 830 828 } else { 831 829 $attachments = get_children( array('post_parent' => $id, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => $order, 'orderby' => $orderby) );