[wp-trac] [WordPress Trac] #16349: return list of images actually being used in post

WordPress Trac wp-trac at lists.automattic.com
Sat Jan 22 21:07:45 UTC 2011


#16349: return list of images actually being used in post
--------------------------------------+------------------------------
 Reporter:  mcmasterp                 |       Owner:
     Type:  enhancement               |      Status:  new
 Priority:  normal                    |   Milestone:  Awaiting Review
Component:  General                   |     Version:  3.0.4
 Severity:  normal                    |  Resolution:
 Keywords:  image, attachment, query  |
--------------------------------------+------------------------------

Comment (by mcmasterp):

 FYI. this is the code I am using in that plugin that is not sufficient:

 $args = array('post_type' => 'attachment',
               'numberposts' => -1,
                           'post_mime_type' => 'image',
                           'post_status' => null,
                           'post_parent' => $postId
      );
     $arrImages =& get_posts($args);

 It is from the knspr-imgnote plugin in the file knspr-imgnote-ajax.php
 around line 55

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/16349#comment:1>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list