[wp-meta] [Making WordPress.org] #2850: Introducing a custom taxonomy "groups" for the speakers shortcode

Making WordPress.org noreply at wordpress.org
Tue Jun 6 19:58:47 UTC 2017


#2850: Introducing a custom taxonomy "groups" for the speakers shortcode
-------------------------------------+---------------------------
 Reporter:  Kau-Boy                  |       Owner:  coreymckrill
     Type:  enhancement              |      Status:  accepted
 Priority:  normal                   |   Milestone:
Component:  WordCamp Site & Plugins  |  Resolution:
 Keywords:  dev-feedback has-patch   |
-------------------------------------+---------------------------

Comment (by coreymckrill):

 I think this is a good idea. Here are some suggestions for the patch:

 * When I was looking at the patch in the context of the whole file, I
 noticed some legacy code that was restricting the `track` parameter for
 the speakers shortcode to a particular site. I removed the restriction,
 and also added some sanitization for it in r5545. I recommend you do some
 similar sanitizing for the `group` parameter, since it is also a comma
 separated list of term slugs.
 * Also, I think the `tax_query` is in the wrong place. Your patch adds it
 to the args for a query of sessions, which happens before the query that
 gets the speakers. Since this is for a taxonomy that applies to speakers,
 I suspect `tax_query` should be included in the args for that query
 instead.
 * I can imagine speaker groups being useful for other contexts outside of
 the shortcode. With this in mind, I think the taxonomy should probably be
 included in REST API responses. Take a look at the register parameters for
 the `wcb_sponsor_level` taxonomy for an example.
 * `group` is a very generic term. Despite the fact that the organizer
 teams taxonomy also uses the extremely generic `team` for its `rewrite`
 and `query_var`, I think we should namespace `group` at least a little
 bit. How about `speaker_group` instead?

--
Ticket URL: <https://meta.trac.wordpress.org/ticket/2850#comment:2>
Making WordPress.org <https://meta.trac.wordpress.org/>
Making WordPress.org


More information about the wp-meta mailing list