[wp-trac] [WordPress Trac] #31085: CPT selector to “Recent Posts” widget
WordPress Trac
noreply at wordpress.org
Wed Jan 21 16:19:55 UTC 2015
#31085: CPT selector to “Recent Posts” widget
-----------------------------------+------------------------------
Reporter: sippis | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Widgets | Version: trunk
Severity: normal | Resolution:
Keywords: has-patch 2nd-opinion | Focuses:
-----------------------------------+------------------------------
Changes (by sippis):
* keywords: => has-patch 2nd-opinion
Comment:
My first patch, be nice :p
Selector is displayed only if there is post types that are not built in
and those are public, it defaults to 'post' and also allows to choose that
or 'any' alongside CPT's.
Patch contains two new filters;
* `widget_posts_cpt_args` to change arguments passed for `get_post_types`
* `widget_posts_cpt_selector` if false, selector will not be displayed
Yes, most of users probably will not need this functionality and will get
confused when they see it. However, as a developer, it's annoying to
invent the wheel again every single time and make own widget for this
functionality when there is already good basic widget for recent posts.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/31085#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list