Gallery final class
Minn\Media\Gallery · public/minn/src/Minn/Media/Gallery.php · 73 lines
The classic `[gallery]` shortcode's markup. Every gallery on a page is numbered from one shared per-request counter, and the wrapper names both that number and the post the gallery sits in, so two galleries on one page can be styled apart.
The single quotes around the wrapper attributes and the tab-indented item body are the reference's, and themes have styled against them for long enough that they are contract rather than formatting.
Public
| static | render(array $items, array $args, int $instance, int $postId, ?string $opening = NULL): string# | The gallery shortcode's HTML for these attachments.
| ||||||
| static | opening(array $args, int $instance, int $postId): string# | The gallery's opening element: its instance id, its post, columns and size as classes. | ||||||
| static | defaultStyle(int $instance, int $columns): string# | The style block printed before a gallery when use_default_gallery_style asks for it (themes without HTML5 galleries), as the reference prints it (probe filter-inputs-3): the items floated in equal whole-percent columns, a border on the images, the caption flush left. |
Internals 3
Private and protected methods: how the class does its work. Not a contract; they change whenever the code is tidied.
Nothing matches.