@@ 304-307 (lines=4) @@ | ||
301 | do_action( 'wpcom_json_api_output', 'help' ); |
|
302 | if ( 'json' === $help_content_type ) { |
|
303 | $docs = array(); |
|
304 | foreach ( $matching_endpoints as $matching_endpoint ) { |
|
305 | if ( $matching_endpoint[0]->is_publicly_documentable() || WPCOM_JSON_API__DEBUG ) |
|
306 | $docs[] = call_user_func( array( $matching_endpoint[0], 'generate_documentation' ) ); |
|
307 | } |
|
308 | return $this->output( 200, $docs ); |
|
309 | } else { |
|
310 | status_header( 200 ); |
|
@@ 311-314 (lines=4) @@ | ||
308 | return $this->output( 200, $docs ); |
|
309 | } else { |
|
310 | status_header( 200 ); |
|
311 | foreach ( $matching_endpoints as $matching_endpoint ) { |
|
312 | if ( $matching_endpoint[0]->is_publicly_documentable() || WPCOM_JSON_API__DEBUG ) |
|
313 | call_user_func( array( $matching_endpoint[0], 'document' ) ); |
|
314 | } |
|
315 | } |
|
316 | exit; |
|
317 | } |