[wp-trac] [WordPress Trac] #35990: Registering a custom post type should create a Recent CPT posts widget type
WordPress Trac
noreply at wordpress.org
Fri Jul 15 16:18:31 UTC 2022
#35990: Registering a custom post type should create a Recent CPT posts widget type
-----------------------------+--------------------------------
Reporter: ericlewis | Owner: (none)
Type: feature request | Status: closed
Priority: normal | Milestone:
Component: Widgets | Version:
Severity: normal | Resolution: reported-upstream
Keywords: | Focuses:
-----------------------------+--------------------------------
Changes (by desrosj):
* keywords: 2nd-opinion needs-patch =>
* status: new => closed
* resolution: => reported-upstream
Comment:
Now that all widgets are blocks and this widget has been ported to the
Latest Posts block, I'm going to close this one out as this is now
something that should be added to that block.
There [https://github.com/WordPress/gutenberg/issues/9013 is an issue
upstream to continue discussion].
If someone feels strongly that this should be added to the classic widget,
this can be reopened with a refreshed patch.
> Why not simply put in a drop-down <select> of available post types in
the main widget class? Then, add a either a filter hook for post types to
opt-in or an argument for register_post_type()?
I think I prefer this approach, but I don't think it needs to be opt-in.
As long as the default value is `post` then sites that added the widget
before this was introduced should continue to work as they always have.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/35990#comment:10>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list