-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Image block dialogue missing "Mine", "Uploaded to this post", "Unattached" filters #19851
Comments
Shouldn't this be done in Core @jorgefilipecosta? |
Hi @epiqueras, the core provides the media library UI to this UI. I think The WordPress components that interact with the core media library are the place where we can address this issue. |
The way #8748 was fixed was by creating a custom modal. Shouldn't this be in the default modal exposed by Core? |
I'm not sure maybe the interface core exposes allows to enable these filters with just a flag. I will cc @joemcgill, @anthonyburchell in case they are able to provide some insights. |
Yeah for some context here on how things were before Gutenberg, here's a screenshot of the image block equivalent flow in Classic Editor (Add Media) : The changes to make this available in the image block flows would be similar to the changes in #8748. Worth noting, this would also need to be solved for inline images. |
@anthonyburchell @epiqueras Any fix on this? It seems still not touched and isn't assigned to anyone. |
related: #12753 |
Is this planned for anytime soon? |
Reported here as well: https://core.trac.wordpress.org/ticket/48797 |
"Uploaded to this post" is susch a time saver! This hasn't been solved still! :/ However, it doesn't appear when creating a "Gallery" block. On a single image it doesn't. I doesn't make much sense creating a gallery block for one image only... |
Any idea when this might be addressed? |
Yikes just came across this. Any way this can be fixed in the meantime? |
Hey, this filter seems to work for me. My conditions are a bit different, but you can probably adjust it to your needs. add_filter(
'ajax_query_attachments_args',
function ($query = []) {
$user_id = get_current_user_id();
if ($user_id && current_user_can('contributor')) {
$query['author'] = $user_id;
}
return $query;
},
10,
1
); |
It seems this issue has been resolved at However we confirm issue repeats again. Changing Theme to default. Image block dialogue missing Filter Media as "Mine", "Uploaded to this post", "Unattached" filters Any chance to check issue again? @dnnsjsk we could not applied your solution
my $query
returns as follow
What is the logic to add $query['author'] = $user_id; |
When inserting an image via an Image Block, the dropdown menu of filter options is missing from the Select or Upload Media window. This is exactly the same problem as the now-resolved issue 8748, except this one pertains to images inserted via the regular image block rather than the Featured Image dialog: https://github.com/WordPress/gutenberg/issues/8748
To Reproduce
Note that when inserting images via a Gallery Block, or via the Featured Image dialog, this filter dropdown menu DOES appear correctly. The Image Block should be made consistent with those.
Gutenberg Version 7.3.0
WP 5.3.2
How it looks now (screenshot from inserting image via Image Block:
### How it should look (screenshot from inserting Gallery or Featured Image):
The text was updated successfully, but these errors were encountered: