Skip to content

Commit a25478d

Browse files
committed
Docs: Correct lone @param null usages around some $deprecated vars.
Update incorrect uses of `null` as a single parameter type to be `mixed` instead, largely targeting `$deprecated` variable names. Pipe `|` a few `null`s with other valid types where appropriate. Add a missing empty new-line between the `_deprecated_file()` and `_deprecated_argument()` functions. See #64224. Built from https://develop.svn.wordpress.org/trunk@61995 git-svn-id: http://core.svn.wordpress.org/trunk@61277 1a063a9b-81f0-0310-95a4-ce76da25c4cd
1 parent cd5334b commit a25478d

8 files changed

Lines changed: 13 additions & 11 deletions

File tree

wp-includes/category-template.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1258,8 +1258,8 @@ function tag_description( $tag = 0 ) {
12581258
* @since 2.8.0
12591259
* @since 4.9.2 The `$taxonomy` parameter was deprecated.
12601260
*
1261-
* @param int $term Optional. Term ID. Defaults to the current term ID.
1262-
* @param null $deprecated Deprecated. Not used.
1261+
* @param int $term Optional. Term ID. Defaults to the current term ID.
1262+
* @param mixed $deprecated Not used.
12631263
* @return string Term description, if available.
12641264
*/
12651265
function term_description( $term = 0, $deprecated = null ) {

wp-includes/class-wp-block-parser.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ public function freeform( $inner_html ) {
318318
*
319319
* @internal
320320
* @since 5.0.0
321-
* @param null $length how many bytes of document text to output.
321+
* @param null|int $length How many bytes of document text to output.
322322
*/
323323
public function add_freeform( $length = null ) {
324324
$length = $length ? $length : strlen( $this->document ) - $this->offset;

wp-includes/class-wp-widget.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -546,9 +546,9 @@ public function form_callback( $widget_args = 1 ) {
546546
*
547547
* @since 2.8.0
548548
*
549-
* @param WP_Widget $widget The widget instance (passed by reference).
550-
* @param null $return Return null if new fields are added.
551-
* @param array $instance An array of the widget's settings.
549+
* @param WP_Widget $widget The widget instance (passed by reference).
550+
* @param null|string $return Default 'noform'. Return null if new fields are added.
551+
* @param array $instance An array of the widget's settings.
552552
*/
553553
do_action_ref_array( 'in_widget_form', array( &$this, &$return, $instance ) );
554554
}

wp-includes/functions.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2886,7 +2886,7 @@ function _wp_check_existing_file_names( $filename, $files ) {
28862886
* @since 2.0.0
28872887
*
28882888
* @param string $name Filename.
2889-
* @param null|string $deprecated Never used. Set to null.
2889+
* @param null|string $deprecated Not used. Set to null.
28902890
* @param string $bits File content
28912891
* @param string|null $time Optional. Time formatted in 'yyyy/mm'. Default null.
28922892
* @return array {
@@ -5853,6 +5853,7 @@ function _deprecated_file( $file, $version, $replacement = '', $message = '' ) {
58535853
wp_trigger_error( '', $message, E_USER_DEPRECATED );
58545854
}
58555855
}
5856+
58565857
/**
58575858
* Marks a function argument as deprecated and inform when it has been used.
58585859
*

wp-includes/ms-blogs.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -755,7 +755,7 @@ function update_archived( $id, $archived ) {
755755
* @param int $blog_id Blog ID.
756756
* @param string $pref Field name.
757757
* @param string $value Field value.
758-
* @param null $deprecated Not used.
758+
* @param mixed $deprecated Not used.
759759
* @return string|false $value
760760
*/
761761
function update_blog_status( $blog_id, $pref, $value, $deprecated = null ) {

wp-includes/ms-deprecated.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -694,6 +694,7 @@ function install_blog_defaults( $blog_id, $user_id ) {
694694
* Previously used in core to mark a user as spam or "ham" (not spam) in Multisite.
695695
*
696696
* @since 3.0.0
697+
* @since 3.0.2 Deprecated fourth argument.
697698
* @deprecated 5.3.0 Use wp_update_user()
698699
* @see wp_update_user()
699700
*
@@ -703,7 +704,7 @@ function install_blog_defaults( $blog_id, $user_id ) {
703704
* @param string $pref The column in the wp_users table to update the user's status
704705
* in (presumably user_status, spam, or deleted).
705706
* @param int $value The new status for the user.
706-
* @param null $deprecated Deprecated as of 3.0.2 and should not be used.
707+
* @param mixed $deprecated Not used.
707708
* @return int The initially passed $value.
708709
*/
709710
function update_user_status( $id, $pref, $value, $deprecated = null ) {

wp-includes/pluggable.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2263,7 +2263,7 @@ function wp_password_change_notification( $user ) {
22632263
* @since 4.6.0 The `$notify` parameter accepts 'user' for sending notification only to the user created.
22642264
*
22652265
* @param int $user_id User ID.
2266-
* @param null $deprecated Not used (argument deprecated).
2266+
* @param mixed $deprecated Not used.
22672267
* @param string $notify Optional. Type of notification that should happen. Accepts 'admin' or an empty
22682268
* string (admin only), 'user', or 'both' (admin and user). Default empty.
22692269
*/

wp-includes/version.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
*
1717
* @global string $wp_version
1818
*/
19-
$wp_version = '7.0-beta5-61994';
19+
$wp_version = '7.0-beta5-61995';
2020

2121
/**
2222
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.

0 commit comments

Comments
 (0)