WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 4 years ago

#12077 closed defect (bug) (worksforme)

gallery shortcode exclude/include

Reported by: realTM Owned by:
Milestone: Priority: normal
Severity: normal Version: 2.9.1
Component: Gallery Keywords: gallery, shortcode, include, exclude
Focuses: Cc:

Description

Hi,

this my first ticket, I looked for anything similar in the forum and in trac but couldn't find anything.

Basically, with the [gallery] shortcode, the exclude and include options doesn't seems to work in 2.9.1. I am updating a plugin that use the gallery shortcode and wanted to add those new feature from 2.9. I though that the problem could come from me but I tried it directly in a post thought the editor (html) and it didn't work either. I am sure that I have the right attachments' ID.

I get the attachments' ID with something similar to this:

$post_attachments = get_children('post_type=attachment&post_mime_type=image&post_parent='.$postID);

foreach($post_attachments as $attach) {
      $attchID[] = $attach->ID;
}

I though that the problem could come from the fact that all images were uploaded with with a previous version of wordpress (2.8). But I created a new post, uploaded new pictures and it still didn't work

If this is not a bug, I am really sorry, I tried everything I could; several tests, documentation, forum, google, etc... and really could found a answer and can only come to the conclusion that this is a bug.

Hope that help
Thomas

ps: wp rocks!

Change History (2)

comment:1 realTM4 years ago

  • Version changed from 2.9 to 2.9.1

comment:2 nacin4 years ago

  • Milestone 2.9.3 deleted
  • Resolution set to worksforme
  • Status changed from new to closed

include/exclude take comma-delimited strings of attachment IDs (as it is a shortcode handler), not an array.

Note: See TracTickets for help on using tickets.