[wp-trac] [WordPress Trac] #16173: Make the Calendar widget support custom post types
WordPress Trac
wp-trac at lists.automattic.com
Fri Sep 16 13:09:38 UTC 2011
#16173: Make the Calendar widget support custom post types
-------------------------------------------+--------------------------
Reporter: GautamGupta | Owner: GautamGupta
Type: enhancement | Status: accepted
Priority: normal | Milestone: 3.3
Component: Widgets | Version: 3.1
Severity: normal | Resolution:
Keywords: gci needs-testing needs-patch |
-------------------------------------------+--------------------------
Changes (by westi):
* keywords: gci has-patch dev-feedback needs-testing => gci needs-testing
needs-patch
Comment:
Notes from reviewing all the patches and ideas here:
* I'm not sure the core Calendar widget should gain CPT support at this
point. I think bbPress is probably more of a special case in CPT usage in
that it is doing something chronological - normal usage of CPT's would be
for other types of content that are not chronological.
* I like the improvements to get_calendar a lot and I don't have a
problem with adding CPT support to that as an API function.
Detailed review notes and feedback for get_calendar improvements in
16173.patch - these assume we keep support for CPTs in the function.
* the new cache key naming means that the cache is no longer cleared for
the post post_type and will require extra logistics for CPTs - we should
clear the cache for all CPTs on the correct hooks I guess
* With the patch applied I get no previous month link on my test site
(has no posts this month but some last month)
* We shouldn't rename the get_calendar filter - but rather pass extra
arguments to it so that a plugin can be CPT aware or use the old name for
posts and a new CPT specific name for other CPTs.
* We should probably switch to using wp_count_posts() for the have we got
any posts check rather than a direct SQL query.
* We should check if {{{$ak_title_separator}}} logic is still needed and
if so convert the checks to use the {{{$is_{browser}}}} variables
Going forward it would be good to see:
* An improved patch which resolves the above issues and doesn't support
CPTs
* An improved patch which resolves the above issues and does support CPTs
in get_calendar in a backward compatible manner - i.e. preserving filter
and cache key names.
I don't think we should do the widget at this time.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/16173#comment:9>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list