[wp-trac] [WordPress Trac] #34093: New filter: `get_calendar_post_type` in get_calendar()

WordPress Trac noreply at wordpress.org
Mon Oct 3 23:40:17 UTC 2016


#34093: New filter: `get_calendar_post_type` in get_calendar()
------------------------------+------------------------------
 Reporter:  sebastian.pisula  |       Owner:
     Type:  enhancement       |      Status:  new
 Priority:  normal            |   Milestone:  Awaiting Review
Component:  General           |     Version:  trunk
 Severity:  normal            |  Resolution:
 Keywords:  has-patch         |     Focuses:
------------------------------+------------------------------
Changes (by dwainm):

 * version:   => trunk


Comment:

 Replying to [comment:4 swissspidy]:
 > Thanks for the ping, and sorry for missing it before!
 >
 > Implementation-wise it looks OK, just needs a bit of a cleanup
 eventually (e.g. the spacing is wrong).
 >
 > I wonder if we should go even one step further and allow passing an
 `$args` param to `get_calendar()`. That way you could configure the post
 type, whether it should `echo`, etc. all when calling the function. Of
 course it should be backwards compatible.
 >
 > Then, we could have 1 single `get_calendar_args` filter for these
 arguments instead of one only for the post type. That means we could use
 [attachment:34093-3.patch] to build upon.

 @swissspidy Please review the changes in 34093-5.diff. The code styling is
 updated along with the changes your requested.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/34093#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list