-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Show result of admin_post_thumbnail_html filter in Featured Image panel #12742
Comments
Can we reinstate the filter that used to exist for this in the old editor? |
That would be a good start of course. I (original ticket author) didn't realize Gutenberg had stomped that filter. Definitely need that filter to continue working, as it's the only reason this ticket was allowed to get so stale. The point of the ticket was to create an easy-to-use API to register this information for display, like the description field that widgets and sidebars have. |
@joyously Can you make a new issue for that? |
No, as it's pretty much the conclusion from the Trac ticket discussion, so it's a big part of this issue. |
The Featured Image module in the Inspector is void of text, so it does require the user to have some sort of knowledge to interact successfully with it. Because of this reason, I'm for adding something to the module to help explain what a Feature Image is, or how it's used. Current Featured Image module |
In today's Design Team slack chat, we agreed that it would be great to get this filter implemented back. This would allow the themes to provide a Featured Image description. |
It would be nice to have the |
Any updates on this feature guys? Our users would really appreciate it. |
Does the editor.PostFeaturedImage filter fulfill what you're looking to do? The PR implementing this filter mentions that it acts like admin_post_thumbnail_html. More info at https://github.com/WordPress/gutenberg/blob/master/packages/editor/src/components/post-featured-image/README.md |
If that filter simply "acts like" a PHP filter, it's not the same thing as being a PHP filter. What should happen is the PHP filter that is documented and called by existing code should affect the new editor the same way it affects the old editor, without needing JS code to be added by the legacy plugin or theme in order to work. |
@joyously, agree here. I was just trying to use this documented filter before realizing it didn't work in Gutenberg. Our theme is set up to use Featured Images differently depending on settlings chosen in the customizer, so we need a PHP filter that can conditionally change the help text based on those selected settings. The Featured Image input is incredibly unclear on what it does, and is indeed confusing our clients. Is there any inertia to get this fixed? |
It seems like it would be pretty simple. Maybe if you ask in the #core-editor channel for someone to add this to the next milestone? |
@joyously Thanks! I will see about popping in there to get a feel for where they are. I wish I could work on this myself but am still way out of my depth with React. |
Closing this in favour of #30904. |
The other issue (30904) doesn't even mention anything about the PHP filter. |
My mistake. Let's keep #30904 for adding help text and this issue for respecting the existing Core filter. |
I believe the path forward is to use the Here's an example migration guide - https://github.com/danielbachhuber/gutenberg-migration-guide/blob/master/filter-admin-post-thumbnail-html.md. I think we can close this as "won't fix" and "has migration path." |
Why choose to make every theme or plugin add JS, when it would be better for core to do the migration instead? Why remove functionality that has been there for a long time and is still documented? |
I think this filter |
Because of this comment, I tested it on WP 6.1. That filter works fine in Classic editor, as does the setting and deleting the featured image. |
Ah, sorry. I was checking $screen-post_type in the filter but apparently the ajax call also applies the filter (where it is not set), which was causing a PHP warning. |
Has anyone found an answer to this question in 2023? WP vercion 6.2 |
Right now users do not understand where and how the uploaded Featured Image will be shown on the site
The area from where Featured Image is uploaded is very concise and does not have information on how the uploaded Featured Image will be used in the theme. This can cause confusion amongst the users who have not made their own theme. This issue can amplify if the uploaded image is used in different size through out the site and users will not test across the site and won't know how the image is appearing.
We can have short descriptions as suggested in the examples below to describe the behaviour of the uploaded Featured Image on the site.
Examples:
This ticket was created based on a very old ticket on Trac (https://core.trac.wordpress.org/ticket/13522)
The text was updated successfully, but these errors were encountered: