@@ -29,6 +29,8 @@ discard block |
||
29 | 29 | public $did_output = false; |
30 | 30 | |
31 | 31 | /** |
32 | + * @param string $method |
|
33 | + * @param string $post_body |
|
32 | 34 | * @return WPCOM_JSON_API instance |
33 | 35 | */ |
34 | 36 | static function init( $method = null, $url = null, $post_body = null, $return_new = false ) { |
@@ -333,6 +335,9 @@ discard block |
||
333 | 335 | return call_user_func_array( array( $endpoint, 'callback' ), $path_pieces ); |
334 | 336 | } |
335 | 337 | |
338 | + /** |
|
339 | + * @param integer $status_code |
|
340 | + */ |
|
336 | 341 | function output_early( $status_code, $response = null, $content_type = 'application/json' ) { |
337 | 342 | $exit = $this->exit; |
338 | 343 | $this->exit = false; |
@@ -527,6 +532,9 @@ discard block |
||
527 | 532 | return json_encode( $data ); |
528 | 533 | } |
529 | 534 | |
535 | + /** |
|
536 | + * @param string $needle |
|
537 | + */ |
|
530 | 538 | function ends_with( $haystack, $needle ) { |
531 | 539 | return $needle === substr( $haystack, -strlen( $needle ) ); |
532 | 540 | } |
@@ -554,6 +562,10 @@ discard block |
||
554 | 562 | } |
555 | 563 | |
556 | 564 | // Returns true if the specified blog ID is a restricted blog |
565 | + |
|
566 | + /** |
|
567 | + * @param integer $blog_id |
|
568 | + */ |
|
557 | 569 | function is_restricted_blog( $blog_id ) { |
558 | 570 | /** |
559 | 571 | * Filters all REST API access and return a 403 unauthorized response for all Restricted blog IDs. |
@@ -617,6 +629,7 @@ discard block |
||
617 | 629 | * The result is always output, never returned. |
618 | 630 | * |
619 | 631 | * @param string|null $error_code. Call with string to start the trapping. Call with null to stop. |
632 | + * @param string $error_code |
|
620 | 633 | */ |
621 | 634 | function trap_wp_die( $error_code = null ) { |
622 | 635 | // Stop trapping |
@@ -132,6 +132,9 @@ |
||
132 | 132 | return self::json_api( self::get_post_api_url( $post_id) ); |
133 | 133 | } |
134 | 134 | |
135 | + /** |
|
136 | + * @param string $url |
|
137 | + */ |
|
135 | 138 | static function json_api( $url, $method = 'GET' ) { |
136 | 139 | |
137 | 140 | require_once JETPACK__PLUGIN_DIR . 'class.json-api.php'; |
@@ -59,9 +59,7 @@ |
||
59 | 59 | * Get individual setting |
60 | 60 | * |
61 | 61 | * @param sting $name |
62 | - * @param string $type |
|
63 | 62 | * @param string or array $callback |
64 | - * @param boolean $is_constant |
|
65 | 63 | * @return value of the setting |
66 | 64 | */ |
67 | 65 | static function get( $name ) { |