[wp-trac] [WordPress Trac] #23041: Images Don't Become Attached When Inserting a Gallery

WordPress Trac noreply at wordpress.org
Sat Dec 22 01:53:22 UTC 2012


#23041: Images Don't Become Attached When Inserting a Gallery
--------------------------+--------------------
 Reporter:  miqrogroove   |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  3.5.1
Component:  Gallery       |     Version:  3.5
 Severity:  normal        |  Resolution:
 Keywords:                |
--------------------------+--------------------

Comment (by Frumph):

 ... use case:  Gallery outside of the_content() section of a post.,
 design wise post data on left, gallery in a column on the right,
 impossible (as far as I know ;/) to do unless images are attached to the
 gallery of the post.

 This is how I was doing it post 3.5, which no longer works (works with
 previous pre 3.5 attached images though.

 {{{
                 $columns = get_post_meta( $post->ID, 'comic-gallery-
 columns', true );
                 if (empty($columns)) $columns = 5;
                 $args = array(
                                 'id'         => $post->ID,
                                 'columns'    => $columns,
                                 'exclude'    => $post_image_id
                                 );
                 $output .= gallery_shortcode($args);
 }}}

 Now that the images are unattached another way to do this now would be to
 make another custom meta field to contain the ID's that represent the
 gallery and store them that way

 Just a thought.. didn't exactly want to install a overbearing gallery
 plugin and waste all that processing when I could be using internal core
 code.

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


More information about the wp-trac mailing list