[wp-trac] [WordPress Trac] #16173: Make the Calendar widget support custom post types

WordPress Trac wp-trac at lists.automattic.com
Wed Aug 31 21:15:13 UTC 2011


#16173: Make the Calendar widget support custom post types
----------------------------------------+-----------------------------
 Reporter:  GautamGupta                 |       Owner:  GautamGupta
     Type:  enhancement                 |      Status:  accepted
 Priority:  normal                      |   Milestone:  Future Release
Component:  Widgets                     |     Version:  3.3
 Severity:  normal                      |  Resolution:
 Keywords:  gci has-patch dev-feedback  |
----------------------------------------+-----------------------------
Changes (by sushkov):

 * cc: sushkov (added)
 * keywords:  bbpress gci needs-patch => gci has-patch dev-feedback
 * version:  3.1 => 3.3


Comment:

 Attached a new version for this ticket.

 What changed:
 * added wpdb::prepare()
 * added proper support for filters and CPT namespaces
 * removed 3rd argument to ensure compatibility with older themes
 * added the class name of the current CPT to make sure designers can
 differentiate calendars

 To note, what would be really cool, is to be able to send an array of post
 types we want to fetch, though with wpdb::prepare() I couldn't find a way
 to escape an array (*cough-cough* another ticket?).

 The patch for widget can be added by request, though I would opt it be
 done in a different way but proposed for now: fetching and listing the
 `public` post types in a dropdown will reduce modifications across
 codebase.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/16173#comment:6>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list