@@ -248,7 +248,7 @@ discard block |
||
248 | 248 | * @access public |
249 | 249 | * |
250 | 250 | * @param WP_REST_Request $request Request object. |
251 | - * @return WP_Error|stdClass $prepared_attachment Post object. |
|
251 | + * @return string $prepared_attachment Post object. |
|
252 | 252 | */ |
253 | 253 | protected function prepare_item_for_database( $request ) { |
254 | 254 | $prepared_attachment = parent::prepare_item_for_database( $request ); |
@@ -483,7 +483,7 @@ discard block |
||
483 | 483 | * @since 4.7.0 |
484 | 484 | * @access protected |
485 | 485 | * |
486 | - * @param array $data Supplied file data. |
|
486 | + * @param string $data Supplied file data. |
|
487 | 487 | * @param array $headers HTTP headers from the request. |
488 | 488 | * @return array|WP_Error Data from wp_handle_sideload(). |
489 | 489 | */ |
@@ -1002,7 +1002,7 @@ |
||
1002 | 1002 | * @since 4.7.0 |
1003 | 1003 | * @access protected |
1004 | 1004 | * |
1005 | - * @param string|int $comment_approved comment status. |
|
1005 | + * @param string $comment_approved comment status. |
|
1006 | 1006 | * @return string Comment status. |
1007 | 1007 | */ |
1008 | 1008 | protected function prepare_status_response( $comment_approved ) { |
@@ -179,7 +179,7 @@ |
||
179 | 179 | * @access public |
180 | 180 | * |
181 | 181 | * @param WP_REST_Request $request Request object. |
182 | - * @return WP_Error|object The prepared item, or WP_Error object on failure. |
|
182 | + * @return WP_Error The prepared item, or WP_Error object on failure. |
|
183 | 183 | */ |
184 | 184 | protected function prepare_item_for_database( $request ) { |
185 | 185 | return new WP_Error( 'invalid-method', sprintf( __( "Method '%s' not implemented. Must be overridden in subclass." ), __METHOD__ ), array( 'status' => 405 ) ); |
@@ -1061,7 +1061,7 @@ discard block |
||
1061 | 1061 | * @access protected |
1062 | 1062 | * |
1063 | 1063 | * @param string $post_status Post status. |
1064 | - * @param object $post_type Post type. |
|
1064 | + * @param WP_Post_Type|null $post_type Post type. |
|
1065 | 1065 | * @return string|WP_Error Post status or WP_Error if lacking the proper permission. |
1066 | 1066 | */ |
1067 | 1067 | protected function handle_status_param( $post_status, $post_type ) { |
@@ -1201,7 +1201,7 @@ discard block |
||
1201 | 1201 | * @since 4.7.0 |
1202 | 1202 | * @access protected |
1203 | 1203 | * |
1204 | - * @param object|string $post_type Post type name or object. |
|
1204 | + * @param WP_Post_Type|null $post_type Post type name or object. |
|
1205 | 1205 | * @return bool Whether the post type is allowed in REST. |
1206 | 1206 | */ |
1207 | 1207 | protected function check_is_post_type_allowed( $post_type ) { |
@@ -307,7 +307,7 @@ |
||
307 | 307 | * @since 4.8.0 |
308 | 308 | * |
309 | 309 | * @param array $location Should contain 'latitude' and 'longitude' indexes. |
310 | - * @return bool|string false on failure, or a string on success. |
|
310 | + * @return string|false false on failure, or a string on success. |
|
311 | 311 | */ |
312 | 312 | protected function get_events_transient_key( $location ) { |
313 | 313 | $key = false; |
@@ -153,7 +153,7 @@ |
||
153 | 153 | * |
154 | 154 | * @param string $file |
155 | 155 | * @param string $contents |
156 | - * @param bool|int $mode |
|
156 | + * @param string|boolean $mode |
|
157 | 157 | * @return bool |
158 | 158 | */ |
159 | 159 | public function put_contents($file, $contents, $mode = false ) { |
@@ -384,7 +384,7 @@ |
||
384 | 384 | * @ignore |
385 | 385 | * @param resource $img Image resource. |
386 | 386 | * @param float|int $angle Image rotation angle, in degrees. |
387 | - * @return resource|false GD image resource, false otherwise. |
|
387 | + * @return resource GD image resource, false otherwise. |
|
388 | 388 | */ |
389 | 389 | function _rotate_image_resource($img, $angle) { |
390 | 390 | _deprecated_function( __FUNCTION__, '3.5.0', 'WP_Image_Editor::rotate()' ); |
@@ -780,7 +780,7 @@ |
||
780 | 780 | * @global int $wp_db_version The version number of the database. |
781 | 781 | * @global string $pagenow |
782 | 782 | * |
783 | - * @return false False if the current user is not a super admin. |
|
783 | + * @return false|null False if the current user is not a super admin. |
|
784 | 784 | */ |
785 | 785 | function site_admin_notice() { |
786 | 786 | global $wp_db_version, $pagenow; |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | * @param bool $markup Optional. If the returned data should have HTML markup applied. |
52 | 52 | * Default true. |
53 | 53 | * @param bool $translate Optional. If the returned data should be translated. Default true. |
54 | - * @return array { |
|
54 | + * @return string { |
|
55 | 55 | * Plugin data. Values will be empty if not supplied by the plugin. |
56 | 56 | * |
57 | 57 | * @type string $Name Name of the plugin. Should be unique. |
@@ -188,7 +188,7 @@ discard block |
||
188 | 188 | * @since 2.8.0 |
189 | 189 | * |
190 | 190 | * @param string $plugin Path to the main plugin file from plugins directory. |
191 | - * @return array List of files relative to the plugin root. |
|
191 | + * @return string[] List of files relative to the plugin root. |
|
192 | 192 | */ |
193 | 193 | function get_plugin_files($plugin) { |
194 | 194 | $plugin_file = WP_PLUGIN_DIR . '/' . $plugin; |
@@ -767,7 +767,7 @@ discard block |
||
767 | 767 | * |
768 | 768 | * @global WP_Filesystem_Base $wp_filesystem |
769 | 769 | * |
770 | - * @param array $plugins List of plugins to delete. |
|
770 | + * @param string[] $plugins List of plugins to delete. |
|
771 | 771 | * @param string $deprecated Deprecated. |
772 | 772 | * @return bool|null|WP_Error True on success, false is $plugins is empty, WP_Error on failure. |
773 | 773 | * Null if filesystem credentials are required to proceed. |
@@ -985,7 +985,7 @@ discard block |
||
985 | 985 | * @since 2.7.0 |
986 | 986 | * |
987 | 987 | * @param string $plugin Path to the main plugin file from plugins directory. |
988 | - * @return true True if a plugin's uninstall.php file has been found and included. |
|
988 | + * @return boolean|null True if a plugin's uninstall.php file has been found and included. |
|
989 | 989 | */ |
990 | 990 | function uninstall_plugin($plugin) { |
991 | 991 | $file = plugin_basename($plugin); |
@@ -1505,6 +1505,7 @@ discard block |
||
1505 | 1505 | * @global array $_wp_real_parent_file |
1506 | 1506 | * @global array $_wp_menu_nopriv |
1507 | 1507 | * @global array $_wp_submenu_nopriv |
1508 | + * @return string |
|
1508 | 1509 | */ |
1509 | 1510 | function get_admin_page_parent( $parent = '' ) { |
1510 | 1511 | global $parent_file, $menu, $submenu, $pagenow, $typenow, |