[wp-meta] [Making WordPress.org] #4852: Add ID to the API
Making WordPress.org
noreply at wordpress.org
Sun Nov 17 18:55:56 UTC 2019
#4852: Add ID to the API
-------------------------+--------------------
Reporter: casiepa | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone:
Component: General | Keywords:
-------------------------+--------------------
Please add also the ID of the taxonomy/category so it could be used by
external tools to submit a video to WordPress.tv (e.g. the submit-video
form needs the category IDs for WordCampTV, Europe, 2019)
The code to be changed is in /themes/wptv2/plugins/wordpresstv-rest
/wordpresstv-rest.php
Change
{{{
foreach ( $terms as $t ) {
$item = array(
'name' => $t->name,
'link' => get_term_link( $t ),
'api' => add_query_arg( $taxonomy_obj->query_var, $t->slug,
home_url( '/api/videos.json') ),
'videos' => $t->count,
);
}}}
to
{{{
foreach ( $terms as $t ) {
$item = array(
'id' => $t->term_id,
'name' => $t->name,
'link' => get_term_link( $t ),
'api' => add_query_arg( $taxonomy_obj->query_var, $t->slug,
home_url( '/api/videos.json') ),
'videos' => $t->count,
);
}}}
--
Ticket URL: <https://meta.trac.wordpress.org/ticket/4852>
Making WordPress.org <https://meta.trac.wordpress.org/>
Making WordPress.org
More information about the wp-meta
mailing list