sal/class.json-api-post-base.php 1 location
|
@@ 93-97 (lines=5) @@
|
90 |
|
public function get_tags() { |
91 |
|
$tags = array(); |
92 |
|
$terms = wp_get_post_tags( $this->post->ID ); |
93 |
|
foreach ( $terms as $term ) { |
94 |
|
if ( !empty( $term->name ) ) { |
95 |
|
$tags[$term->name] = $this->format_taxonomy( $term, 'post_tag', 'display' ); |
96 |
|
} |
97 |
|
} |
98 |
|
return (object) $tags; |
99 |
|
} |
100 |
|
|
json-endpoints/class.wpcom-json-api-post-endpoint.php 1 location
|
@@ 387-391 (lines=5) @@
|
384 |
|
case 'tags' : |
385 |
|
$response[$key] = array(); |
386 |
|
$terms = wp_get_post_tags( $post->ID ); |
387 |
|
foreach ( $terms as $term ) { |
388 |
|
if ( !empty( $term->name ) ) { |
389 |
|
$response[$key][$term->name] = $this->format_taxonomy( $term, 'post_tag', 'display' ); |
390 |
|
} |
391 |
|
} |
392 |
|
$response[$key] = (object) $response[$key]; |
393 |
|
break; |
394 |
|
case 'categories': |