#23451 closed feature request (worksforme)
Organize/Tag media library items into galleries
Reported by: | abdessamad idrissi | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Media | Keywords: | |
Focuses: | Cc: |
Description
The new media library in 3.5 is great! The only thing missing is a way of organizing/tagging the items in the library into categories that would be accessed from the theme.
Something like; get_gallery($gallery_id, $args)
Some of the arguments would be;
- src [Boolean]; allows to return only the src of the images
- etc..
Of course there's a lot of plugins out there such as the NextGen Gallery but it's too much for such a simple thing.
There's also the option to create galleries within posts/pages and using the short-code [gallery] to access them but for this, a media must be associated with a post/page :(
Change History (10)
#2
@
12 years ago
Sorry for the misunderstanding.
To understand this ticket, let's examine this situation; Using the core functions of WordPress (which means without the help of any plugin) how can I organize a bunch of hundreds of media files (jpg/gif/png images that I have uploaded into my media > Library) inside galleries that I can retrieve in my theme?
Not only I want to retrieve them, but also, I want some control over their display; I need a function to get the link to images (withing my created gallery) without any pre-formatting (<ul><li>.. etc.)
And one last thing; It is not true that In 3.5 you can have multiple galleries and the media file doesn't have to be associated with the page/post.
#3
@
12 years ago
Perhaps you are looking to turn on taxonomies for attachments so that you can retrieve them in an organized way? In which case, you can do that now, for example: register_taxonomy_for_object_type( 'category', 'attachment' );
There are many functions for retrieving attachments and image-specific information. Not sure what you're asking for core to do.
#4
follow-up:
↓ 7
@
12 years ago
It sounds like you're talking about two different things, like @markoheijnen points out:
- Wanting attachment categories (or similar), which is already possible via
register_taxonomy()
as @helen mentions in comment:3.
- Wanting some kind of
gallery
endpoint, which was briefly discussed near the end of the 3.5 cycle, but probably won't happen, at least in 3.6. As it is, "galleries", that is, "galleries of unattached images" are really just one-time groups of images displayed via a shortcode. An endpoint for effectively "reusing groups of unattached images" would be a nice future enhancement. There may be a "re-usable gallery" ticket around here somewhere, but I can't find it.
+1 for close or modifying the ticket with a better focus.
#5
@
12 years ago
What you describe seems plugin territorium. You can play with the shortcode and using taxonomies in them and then control the display with the filter 'post_gallery'. But everything you describe till now doesn't seem something that should be in core.
#6
@
12 years ago
- Keywords close removed
- Milestone Awaiting Review deleted
- Resolution set to worksforme
- Status changed from new to closed
- Version trunk deleted
#8
@
12 years ago
To me, this is the exact use case where having post to post relationships in core. In fact, I'm writing a plugin that would do this: the ability to images together in galleries that can then be used in multiple posts.
Basically, the old way of doing galleries was attaching media to posts via the posts_parent field of a post, except this was a one to many relationship; the post could have multiple images but the images only had one parent. The current way uses shortcode but the only way to use that gallery elsewhere would be to parse the content of that post or copy and paste the shortcode.
Using a posts relationship scheme like scrivu's Posts 2 Posts plugin, you could setup a many to many relationship with media and a gallery post type. The gallery post type could hold many images and the images could be attached to multiple galleries or posts or whatever you want. The galleries could them have their own single/archive/category pages or could be embedded in posts, widget areas, etc.
My inspiration for this is how tech news sites like theverge.com handle media galleries. They have a whole section of media galleries for products and events but those same galleries can be embedded into their news stories and articles. Because the galleries are their own entities and aren't specifically linked to one article, you can re-use them in multiple related articles if you so wished.
I think this would be an awesome feature for WP and using a P2P table to make this happen just makes sense.
Related: #14513
#9
follow-up:
↓ 10
@
12 years ago
Persistent galleries was something we considered in 3.5, but it is not something core should attempt for the time being. I strongly agree that this is currently plugin territory.
#10
in reply to:
↑ 9
@
12 years ago
Replying to nacin:
Persistent galleries was something we considered in 3.5, but it is not something core should attempt for the time being. I strongly agree that this is currently plugin territory.
I'm curious to the hurdles that came up with doing persistent galleries.
I have no clue what you are talking about. The title is about organizing/tagging but the example is about getting galleries.
I would say that this ticket is invalid since the gallery is a shortcode and there is no way to use a function for getting a gallery.
Your last sentence seems the old way of doing gallery. In 3.5 you can have multiple galleries and the media file doesn't have to be associated with the page/post