Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 0d03283

Browse filesBrowse 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. git-svn-id: https://develop.svn.wordpress.org/trunk@61995 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 78ec1ff commit 0d03283
Copy full SHA for 0d03283

File tree

Expand file treeCollapse file tree

7 files changed

+12
-10
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

7 files changed

+12
-10
lines changed
Open diff view settings
Collapse file

‎src/wp-includes/category-template.php‎

Copy file name to clipboardExpand all lines: src/wp-includes/category-template.php
+2-2Lines 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 ) {
Collapse file

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

Copy file name to clipboardExpand all lines: src/wp-includes/class-wp-block-parser.php
+1-1Lines 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;
Collapse file

‎src/wp-includes/class-wp-widget.php‎

Copy file name to clipboardExpand all lines: src/wp-includes/class-wp-widget.php
+3-3Lines 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
}
Collapse file

‎src/wp-includes/functions.php‎

Copy file name to clipboardExpand all lines: src/wp-includes/functions.php
+2-1Lines 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
*
Collapse file

‎src/wp-includes/ms-blogs.php‎

Copy file name to clipboardExpand all lines: src/wp-includes/ms-blogs.php
+1-1Lines 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 ) {
Collapse file

‎src/wp-includes/ms-deprecated.php‎

Copy file name to clipboardExpand all lines: src/wp-includes/ms-deprecated.php
+2-1Lines 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 ) {
Collapse file

‎src/wp-includes/pluggable.php‎

Copy file name to clipboardExpand all lines: src/wp-includes/pluggable.php
+1-1Lines 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
*/

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.