Skip to content

Commit ba85fba

Browse files
committed
Fill in the @param types for the args for functions missing them in wp-admin/includes/deprecated.php (pour one out).
See #30224. git-svn-id: https://develop.svn.wordpress.org/trunk@30201 602fd350-edb4-49c9-b593-d223f7449a82
1 parent e4b0a71 commit ba85fba

4 files changed

Lines changed: 26 additions & 29 deletions

File tree

src/wp-admin/includes/deprecated.php

Lines changed: 22 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,9 @@ function get_udims( $width, $height ) {
8080
* @deprecated Use wp_category_checklist()
8181
* @see wp_category_checklist()
8282
*
83-
* @param unknown_type $default
84-
* @param unknown_type $parent
85-
* @param unknown_type $popular_ids
83+
* @param int $default
84+
* @param int $parent
85+
* @param array $popular_ids
8686
*/
8787
function dropdown_categories( $default = 0, $parent = 0, $popular_ids = array() ) {
8888
_deprecated_function( __FUNCTION__, '2.6', 'wp_category_checklist()' );
@@ -98,7 +98,7 @@ function dropdown_categories( $default = 0, $parent = 0, $popular_ids = array()
9898
* @deprecated Use wp_link_category_checklist()
9999
* @see wp_link_category_checklist()
100100
*
101-
* @param unknown_type $default
101+
* @param int $default
102102
*/
103103
function dropdown_link_categories( $default = 0 ) {
104104
_deprecated_function( __FUNCTION__, '2.6', 'wp_link_category_checklist()' );
@@ -130,12 +130,12 @@ function get_real_file_to_edit( $file ) {
130130
* @deprecated Use wp_dropdown_categories()
131131
* @see wp_dropdown_categories()
132132
*
133-
* @param unknown_type $currentcat
134-
* @param unknown_type $currentparent
135-
* @param unknown_type $parent
136-
* @param unknown_type $level
137-
* @param unknown_type $categories
138-
* @return unknown
133+
* @param int $currentcat
134+
* @param int $currentparent
135+
* @param int $parent
136+
* @param int $level
137+
* @param array $categories
138+
* @return bool|null
139139
*/
140140
function wp_dropdown_cats( $currentcat = 0, $currentparent = 0, $parent = 0, $level = 0, $categories = 0 ) {
141141
_deprecated_function( __FUNCTION__, '3.0', 'wp_dropdown_categories()' );
@@ -170,12 +170,11 @@ function wp_dropdown_cats( $currentcat = 0, $currentparent = 0, $parent = 0, $le
170170
* @param string $option_group A settings group name. Should correspond to a whitelisted option key name.
171171
* Default whitelisted option key names include "general," "discussion," and "reading," among others.
172172
* @param string $option_name The name of an option to sanitize and save.
173-
* @param unknown_type $sanitize_callback A callback function that sanitizes the option's value.
174-
* @return unknown
173+
* @param callable $sanitize_callback A callback function that sanitizes the option's value.
175174
*/
176175
function add_option_update_handler( $option_group, $option_name, $sanitize_callback = '' ) {
177176
_deprecated_function( __FUNCTION__, '3.0', 'register_setting()' );
178-
return register_setting( $option_group, $option_name, $sanitize_callback );
177+
register_setting( $option_group, $option_name, $sanitize_callback );
179178
}
180179

181180
/**
@@ -186,14 +185,13 @@ function add_option_update_handler( $option_group, $option_name, $sanitize_callb
186185
* @deprecated Use unregister_setting()
187186
* @see unregister_setting()
188187
*
189-
* @param unknown_type $option_group
190-
* @param unknown_type $option_name
191-
* @param unknown_type $sanitize_callback
192-
* @return unknown
188+
* @param string $option_group
189+
* @param string $option_name
190+
* @param callable $sanitize_callback
193191
*/
194192
function remove_option_update_handler( $option_group, $option_name, $sanitize_callback = '' ) {
195193
_deprecated_function( __FUNCTION__, '3.0', 'unregister_setting()' );
196-
return unregister_setting( $option_group, $option_name, $sanitize_callback );
194+
unregister_setting( $option_group, $option_name, $sanitize_callback );
197195
}
198196

199197
/**
@@ -336,7 +334,7 @@ class WP_User_Search {
336334
*
337335
* @since 2.1.0
338336
* @access private
339-
* @var unknown_type
337+
* @var mixed
340338
*/
341339
var $results;
342340

@@ -345,7 +343,7 @@ class WP_User_Search {
345343
*
346344
* @since 2.1.0
347345
* @access private
348-
* @var unknown_type
346+
* @var string
349347
*/
350348
var $search_term;
351349

@@ -390,7 +388,7 @@ class WP_User_Search {
390388
*
391389
* @since 2.1.0
392390
* @access private
393-
* @var unknown_type
391+
* @var int
394392
*/
395393
var $first_user;
396394

@@ -462,7 +460,7 @@ class WP_User_Search {
462460
*
463461
* @since 2.1.0
464462
* @access private
465-
* @var unknown_type
463+
* @var WP_Error
466464
*/
467465
var $search_errors;
468466

@@ -471,7 +469,7 @@ class WP_User_Search {
471469
*
472470
* @since 2.7.0
473471
* @access private
474-
* @var unknown_type
472+
* @var string
475473
*/
476474
var $paging_text;
477475

@@ -1128,8 +1126,7 @@ function wp_update_theme($theme, $feedback = '') {
11281126
* @since 2.0.0
11291127
* @deprecated 3.7.0
11301128
*
1131-
* @param unknown_type $id
1132-
* @return unknown
1129+
* @param int|bool $id
11331130
*/
11341131
function the_attachment_links( $id = false ) {
11351132
_deprecated_function( __FUNCTION__, '3.7' );

src/wp-admin/includes/media.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1712,7 +1712,7 @@ function media_upload_header() {
17121712
*
17131713
* @since 2.5.0
17141714
*
1715-
* @param unknown_type $errors
1715+
* @param array $errors
17161716
*/
17171717
function media_upload_form( $errors = null ) {
17181718
global $type, $tab, $is_IE, $is_opera;

src/wp-includes/class-IXR.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ function getXml()
151151
/**
152152
* Checks whether or not the supplied array is a struct or not
153153
*
154-
* @param unknown_type $array
154+
* @param array $array
155155
* @return boolean
156156
*/
157157
function isStruct($array)

src/wp-includes/rss.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -579,8 +579,8 @@ function _fetch_remote_file($url, $headers = "" ) {
579579
* @package External
580580
* @subpackage MagpieRSS
581581
*
582-
* @param unknown_type $resp
583-
* @return unknown
582+
* @param array $resp
583+
* @return MagpieRSS|bool
584584
*/
585585
function _response_to_rss ($resp) {
586586
$rss = new MagpieRSS( $resp->results );

0 commit comments

Comments
 (0)