|
@@ 294-297 (lines=4) @@
|
| 291 |
|
do_action( 'wpcom_json_api_output', 'help' ); |
| 292 |
|
if ( 'json' === $help_content_type ) { |
| 293 |
|
$docs = array(); |
| 294 |
|
foreach ( $matching_endpoints as $matching_endpoint ) { |
| 295 |
|
if ( $matching_endpoint[0]->is_publicly_documentable() || WPCOM_JSON_API__DEBUG ) |
| 296 |
|
$docs[] = call_user_func( array( $matching_endpoint[0], 'generate_documentation' ) ); |
| 297 |
|
} |
| 298 |
|
return $this->output( 200, $docs ); |
| 299 |
|
} else { |
| 300 |
|
status_header( 200 ); |
|
@@ 301-304 (lines=4) @@
|
| 298 |
|
return $this->output( 200, $docs ); |
| 299 |
|
} else { |
| 300 |
|
status_header( 200 ); |
| 301 |
|
foreach ( $matching_endpoints as $matching_endpoint ) { |
| 302 |
|
if ( $matching_endpoint[0]->is_publicly_documentable() || WPCOM_JSON_API__DEBUG ) |
| 303 |
|
call_user_func( array( $matching_endpoint[0], 'document' ) ); |
| 304 |
|
} |
| 305 |
|
} |
| 306 |
|
exit; |
| 307 |
|
} |