@@ -1404,7 +1404,7 @@ |
||
1404 | 1404 | /** |
1405 | 1405 | * Migration routine for moving safecss from wp_options to wp_posts to support revisions |
1406 | 1406 | * |
1407 | - * @return void |
|
1407 | + * @return false|null |
|
1408 | 1408 | */ |
1409 | 1409 | static function upgrade() { |
1410 | 1410 | $css = get_option( 'safecss' ); |
@@ -93,14 +93,24 @@ |
||
93 | 93 | * So that we can test. |
94 | 94 | */ |
95 | 95 | |
96 | + /** |
|
97 | + * @param string $class |
|
98 | + * @param string $method |
|
99 | + */ |
|
96 | 100 | public function method_exists( $class, $method ) { |
97 | 101 | return method_exists( $class, $method ); |
98 | 102 | } |
99 | 103 | |
104 | + /** |
|
105 | + * @param string $class |
|
106 | + */ |
|
100 | 107 | public function class_exists( $class ) { |
101 | 108 | return class_exists( $class ); |
102 | 109 | } |
103 | 110 | |
111 | + /** |
|
112 | + * @param string $function |
|
113 | + */ |
|
104 | 114 | public function function_exists( $function ) { |
105 | 115 | return function_exists( $function ); |
106 | 116 | } |
@@ -163,7 +163,7 @@ |
||
163 | 163 | /** |
164 | 164 | * Iterates through expected items ( plugins or themes ) and compares them to actual results. |
165 | 165 | * |
166 | - * @param $items 'plugin' or 'theme' |
|
166 | + * @param string $items 'plugin' or 'theme' |
|
167 | 167 | */ |
168 | 168 | private function log_items( $items ) { |
169 | 169 | if ( ! isset( $this->expected[ $items ] ) ) { |
@@ -153,6 +153,7 @@ discard block |
||
153 | 153 | /** |
154 | 154 | * Get attachment images for a specified post and return them. Also make sure |
155 | 155 | * their dimensions are at or above a required minimum. |
156 | + * @param integer $post_id |
|
156 | 157 | */ |
157 | 158 | static function from_attachment( $post_id, $width = 200, $height = 200 ) { |
158 | 159 | $images = array(); |
@@ -545,7 +546,6 @@ discard block |
||
545 | 546 | * resized and cropped image. |
546 | 547 | * |
547 | 548 | * @param string $src |
548 | - * @param int $dimension |
|
549 | 549 | * @return string Transformed image URL |
550 | 550 | */ |
551 | 551 | static function fit_image_url( $src, $width, $height ) { |
@@ -8,7 +8,7 @@ |
||
8 | 8 | * @param string $url_orig Original URL. |
9 | 9 | * @param array $url_info Pieces of original URL. |
10 | 10 | * |
11 | - * @return bool |
|
11 | + * @return false|string |
|
12 | 12 | */ |
13 | 13 | function jetpack_no_qtranslate_rest_url_redirect( $url_lang, $url_orig, $url_info ) { |
14 | 14 | if ( false !== strpos( $url_info['wp-path'], 'wp-json/jetpack' ) ) { |
@@ -63,6 +63,7 @@ |
||
63 | 63 | /** |
64 | 64 | * Updates user data |
65 | 65 | * |
66 | + * @param integer $user_id |
|
66 | 67 | * @return array |
67 | 68 | */ |
68 | 69 | public function update_user( $user_id, $blog_id ) { |
@@ -115,6 +115,11 @@ discard block |
||
115 | 115 | } |
116 | 116 | |
117 | 117 | // /sites/%s/taxonomies/%s/terms/new -> $blog_id, $taxonomy |
118 | + |
|
119 | + /** |
|
120 | + * @param string $path |
|
121 | + * @param string $taxonomy |
|
122 | + */ |
|
118 | 123 | function new_term( $path, $blog_id, $taxonomy ) { |
119 | 124 | $args = $this->query_args(); |
120 | 125 | $input = $this->input(); |
@@ -160,6 +165,12 @@ discard block |
||
160 | 165 | } |
161 | 166 | |
162 | 167 | // /sites/%s/taxonomies/%s/terms/slug:%s -> $blog_id, $taxonomy, $slug |
168 | + |
|
169 | + /** |
|
170 | + * @param string $path |
|
171 | + * @param string $slug |
|
172 | + * @param string $taxonomy |
|
173 | + */ |
|
163 | 174 | function update_term( $path, $blog_id, $slug, $taxonomy ) { |
164 | 175 | $tax = get_taxonomy( $taxonomy ); |
165 | 176 | if ( ! current_user_can( $tax->cap->edit_terms ) ) { |
@@ -208,6 +219,12 @@ discard block |
||
208 | 219 | } |
209 | 220 | |
210 | 221 | // /sites/%s/taxonomies/%s/terms/slug:%s/delete -> $blog_id, $taxonomy, $slug |
222 | + |
|
223 | + /** |
|
224 | + * @param string $path |
|
225 | + * @param string $slug |
|
226 | + * @param string $taxonomy |
|
227 | + */ |
|
211 | 228 | function delete_term( $path, $blog_id, $slug, $taxonomy ) { |
212 | 229 | $term = get_term_by( 'slug', $slug, $taxonomy ); |
213 | 230 | $tax = get_taxonomy( $taxonomy ); |
@@ -214,6 +214,11 @@ discard block |
||
214 | 214 | |
215 | 215 | // /sites/%s/posts/new -> $blog_id |
216 | 216 | // /sites/%s/posts/%d -> $blog_id, $post_id |
217 | + |
|
218 | + /** |
|
219 | + * @param string $path |
|
220 | + * @param integer $post_id |
|
221 | + */ |
|
217 | 222 | function write_post( $path, $blog_id, $post_id ) { |
218 | 223 | global $wpdb; |
219 | 224 | |
@@ -890,6 +895,10 @@ discard block |
||
890 | 895 | } |
891 | 896 | |
892 | 897 | // /sites/%s/posts/%d/delete -> $blog_id, $post_id |
898 | + |
|
899 | + /** |
|
900 | + * @param string $path |
|
901 | + */ |
|
893 | 902 | function delete_post( $path, $blog_id, $post_id ) { |
894 | 903 | $post = get_post( $post_id ); |
895 | 904 | if ( !$post || is_wp_error( $post ) ) { |
@@ -929,6 +938,10 @@ discard block |
||
929 | 938 | } |
930 | 939 | |
931 | 940 | // /sites/%s/posts/%d/restore -> $blog_id, $post_id |
941 | + |
|
942 | + /** |
|
943 | + * @param string $path |
|
944 | + */ |
|
932 | 945 | function restore_post( $path, $blog_id, $post_id ) { |
933 | 946 | $args = $this->query_args(); |
934 | 947 | $post = get_post( $post_id ); |
@@ -949,6 +962,10 @@ discard block |
||
949 | 962 | return $this->get_post_by( 'ID', $post->ID, $args['context'] ); |
950 | 963 | } |
951 | 964 | |
965 | + /** |
|
966 | + * @param boolean $delete_featured_image |
|
967 | + * @param string $featured_image |
|
968 | + */ |
|
952 | 969 | protected function parse_and_set_featured_image( $post_id, $delete_featured_image, $featured_image ) { |
953 | 970 | if ( $delete_featured_image ) { |
954 | 971 | delete_post_thumbnail( $post_id ); |
@@ -201,7 +201,7 @@ |
||
201 | 201 | * should be notified, overriding the site setting. |
202 | 202 | * |
203 | 203 | * @param int $comment_id Comment ID. |
204 | - * @return true Always returns true. |
|
204 | + * @return boolean Always returns true. |
|
205 | 205 | */ |
206 | 206 | function wp_notify_moderator( $comment_id ) { |
207 | 207 | global $wpdb; |