Opened 11 years ago
Closed 10 years ago
#27058 closed enhancement (duplicate)
Limit parameter for [gallery] shortcode
Reported by: | nboehr | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.8 |
Component: | Gallery | Keywords: | has-patch |
Focuses: | Cc: |
Description
The gallery shortcode does not allow to limit the number of images displayed.
The attached patch adds this functionality. The default behaviour is not changed, i.e. by default, all images are displayed. The new parameter is called limit. Also, if you explicitly specifiy the IDs via include=, ids= or exclude=, all images are displayed, regardless of whether the parameter is specified or not. If you guys think that this behaviour is not optimal, please add your comments so I can adjust the patch.
Example usage:
[gallery id="57" limit=3]
The patch is against the latest HEAD revision 26993.
Attachments (3)
Change History (9)
#2
@
11 years ago
- Component changed from Media to Gallery
- Summary changed from Patch: Limit parameter for [gallery] shortcode to Limit parameter for [gallery] shortcode
- Version changed from trunk to 3.8
#3
@
11 years ago
I just added a new version of the patch that applies to revision 28200. If there is anything I can do to get this into the wordpress codebase, please let me know.
#4
@
10 years ago
- Keywords has-patch needs-refresh added
- Milestone changed from Awaiting Review to Future Release
Patch is blowing up.
Seems like a good addition, +1.