Make WordPress Core

Opened 5 weeks ago

Last modified 12 hours ago

#65818 new task (blessed)

Coding Standards fixes for 7.2

Reported by: desrosj Owned by:
Priority: normal Milestone: 7.2
Component: General Version:
Severity: normal Keywords: has-patch has-unit-tests
Cc: Focuses:

Description

Previously:

Change History (65)

This ticket was mentioned in PR #13048 on WordPress/wordpress-develop by @mukesh27.


4 weeks ago
#1

  • Keywords has-patch has-unit-tests added

Trac ticket: https://core.trac.wordpress.org/ticket/65818

Changed unconventional comma operator to semicolon for better readability and conventional PHP style.

- echo 'Please make sure they are installed and enabled.' . PHP_EOL,
+ echo 'Please make sure they are installed and enabled.' . PHP_EOL;

While the comma operator is technically valid PHP syntax, using a semicolon is the conventional and more readable approach.

## Use of AI Tools

Use for drafting PR details

#2 @SergeyBiryukov
4 weeks ago

In 63300:

Coding Standards: Add missing semicolon for error message output in PHPUnit bootstrap.

Developed in https://github.com/WordPress/wordpress-develop/pull/13048.

Follow-up to r49535, r51581.

Props mukesh27.
See #65818.

@SergeyBiryukov commented on PR #13048:


4 weeks ago
#3

Thanks for the PR! Merged in r63300.

This ticket was mentioned in PR #13063 on WordPress/wordpress-develop by @mukesh27.


4 weeks ago
#4

Trac ticket: https://core.trac.wordpress.org/ticket/65818

The PHP inline documentation standards place @return immediately after the last @param tag, with no blank line between them:

/**
 * Summary.
 *
 * @since x.x.x
 *
 * @param string $var Description.
 * @return string Description.
 */

This corrects 44 docblocks across 33 files in src/wp-includes that used a line break between the two tags.

Documentation-only; no functional change.

## Use of AI Tools

AI assistance: Yes
Tool(s): Claude Code
Model(s): Claude Opus 5
Used for: I found a few occurrences myself, and Claude helped me identify the remaining ones and draft the PR.

#5 @SergeyBiryukov
4 weeks ago

In 63320:

Docs: Remove a blank line between @param and @return in core docblocks.

The PHP inline documentation standards place @return immediately after the last @param tag, with no blank line between them:

/**
 * Summary.
 *
 * @since x.x.x
 *
 * @param string $var Description.
 * @return string Description.
 */

This corrects 44 docblocks across 33 files in src/wp-includes that used a line break between the two tags.

Developed in https://github.com/WordPress/wordpress-develop/pull/13063.

Props mukesh27, dhruvang21.
See #65818, #65860.

This ticket was mentioned in PR #13119 on WordPress/wordpress-develop by @mukesh27.


4 weeks ago
#7

Trac ticket: https://core.trac.wordpress.org/ticket/65818

Follow-up to #13063 in which it covers core file changes.

The PHP inline documentation standards place @return immediately after the last @param tag, with no blank line between them:

/**
 * Summary.
 *
 * @param string $var Description.
 * @return string Description.
 */

This corrects 65 docblocks across 29 files in the PHPUnit test suite.

Documentation-only; no functional change in tests.

## Use of AI Tools

AI assistance: Yes
Tool(s): Claude Code
Model(s): Claude Opus 5
Used for: I found a few occurrences myself, and Claude helped me identify the remaining ones and draft the PR.

#8 @SergeyBiryukov
3 weeks ago

In 63333:

Docs: Remove a blank line between @param and @return in test docblocks.

The PHP inline documentation standards place @return immediately after the last @param tag, with no blank line between them:

/**
 * Summary.
 *
 * @param string $var Description.
 * @return string Description.
 */

This corrects 65 docblocks across 29 files in the PHPUnit test suite.

Developed in https://github.com/WordPress/wordpress-develop/pull/13119.

Follow-up to [63320].

Props mukesh27.
See #65818, #65860.

@SergeyBiryukov commented on PR #13119:


3 weeks ago
#9

Thanks for the PR! Merged in r63333.

This ticket was mentioned in PR #13263 on WordPress/wordpress-develop by @Soean.


3 weeks ago
#10

join() is an alias of implode(). Using the canonical function name is strongly recommended, as aliases may be deprecated or removed without (much) warning. This replaces the last three uses of the alias in actively maintained PHP code.

The three instances were introduced in 49200, 60704 and 61326, after the previous alias cleanups in 49193, 56616 and 57567.

## Scope

This brings the number of join() calls in actively maintained PHP code to zero. The following occurrences are deliberately left untouched:

  • src/wp-includes/atomlib.php — bundled third-party library (AtomLib by Elias Torres)
  • src/wp-includes/rss.php — bundled third-party library (MagpieRSS), deprecated since 3.0.0
  • src/wp-includes/class-json.php — bundled third-party library (Services_JSON), deprecated since 5.3.0
  • src/wp-admin/includes/deprecated.php — deprecated functions, kept as-is for historical accuracy
  • src/wp-includes/media-template.php — this is Array.prototype.join() in a JavaScript template, not PHP

Trac ticket: https://core.trac.wordpress.org/ticket/65818

#12 @SergeyBiryukov
2 weeks ago

In 63347:

Coding Standards: Replace remaining join() aliases with implode().

join() is an alias of implode(). Using the canonical function name is strongly recommended, as aliases may be deprecated or removed without (much) warning. This replaces the last three uses of the alias in actively maintained PHP code.

Developed in https://github.com/WordPress/wordpress-develop/pull/13263.

Follow-up to [49193], [49200], [56616], [57567], [60704], [61326].

Props Soean, mukesh27.
See #65818.

@SergeyBiryukov commented on PR #13263:


2 weeks ago
#13

Thanks for the PR! Merged in r63347.

#14 @SergeyBiryukov
2 weeks ago

In 63365:

Code Modernization: Use array_find() and array_find_key() where appropriate.

This commit replaces two foreach loops that return the first matching element (or its key) with the array_find() and array_find_key() functions.

WordPress core includes a polyfill for array_find() and array_find_key() on PHP < 8.4 as of WordPress 6.8, so the change works on every supported PHP version without raising the minimum requirement.

Developed in https://github.com/WordPress/wordpress-develop/pull/12273.

Follow-up to [59783].

Props Soean, apermo.
See #65818.

This ticket was mentioned in PR #13304 on WordPress/wordpress-develop by @Soean.


2 weeks ago
#15

The four object getters on WP_Customize_Manager: get_setting(), get_panel(), get_section() and get_control(), each spell out an isset() guard followed by return null. The null coalescing operator says the same thing in one line.

?? applies the same isset() semantics as the guard it replaces, and since the fallback here is null itself, both forms return the identical value in every case. This covers the complete set of same-shaped getters in the class.

Follow-up to [63378]

Trac ticket: https://core.trac.wordpress.org/ticket/65818

#16 @SergeyBiryukov
2 weeks ago

In 63395:

Code Quality: Remove redundant closure parameter in WP_User::has_cap().

This was originally added to avoid an ArgumentCountError from the array_all() polyfill, however, that is only raised for missing required arguments. Passing extra arguments to a closure is fine in PHP — they are ignored.

Follow-up to [62553].

Props Soean.
See #65818.

This ticket was mentioned in PR #13311 on WordPress/wordpress-develop by @mukesh27.


2 weeks ago
#17

The PHP inline documentation standards call for @param tags in a docblock to line up in columns — types, variable names, and descriptions each starting at the same offset — with wrapped descriptions indented to the description column:

/**
 * Summary.
 *
 * @since x.x.x
 *
 * @param string $var       Description.
 * @param bool   $other_var Description that wraps
 *                          onto a second line.
 */

This corrects 58 @param lines across 16 files in the block editor, block supports, and theme.json classes.

### Example

src/wp-admin/widgets-form-blocks.php — before:

* @param string $message The message being displayed.
 * @param bool   $installed Whether the Classic Widget plugin is installed.

after:

* @param string $message   The message being displayed.
 * @param bool   $installed Whether the Classic Widget plugin is installed.

<details>
<summary>Files changed (16)</summary>

  • src/wp-includes/blocks.php
  • src/wp-includes/blocks/accordion.php
  • src/wp-includes/blocks/heading.php
  • src/wp-includes/blocks/list.php
  • src/wp-includes/blocks/navigation-link.php
  • src/wp-includes/blocks/navigation.php
  • src/wp-includes/blocks/page-list.php
  • src/wp-includes/blocks/social-link.php
  • src/wp-includes/blocks/widget-group.php
  • src/wp-includes/block-supports/layout.php
  • src/wp-includes/block-supports/settings.php
  • src/wp-includes/block-template-utils.php
  • src/wp-includes/class-wp-theme-json.php
  • src/wp-includes/class-wp-theme-json-schema.php
  • src/wp-includes/style-engine/class-wp-style-engine-css-rules-store.php
  • src/wp-admin/widgets-form-blocks.php

</details>

This is a whitespace-only change: git diff -w against trunk is empty, so there is no functional change and no change to any generated documentation output beyond the alignment itself.

## Use of AI Tools

AI assistance: Yes
Tool(s): Claude Code
Model(s): Claude Opus 5
Used for: Grouping a single large docblock alignment branch into per-component pull requests, verifying that the split is whitespace-only and that the seven branches together reproduce the original diff line for line, and drafting this description. I reviewed the alignment changes before submitting.

This ticket was mentioned in PR #13312 on WordPress/wordpress-develop by @mukesh27.


2 weeks ago
#18

The PHP inline documentation standards call for @param tags in a docblock to line up in columns — types, variable names, and descriptions each starting at the same offset — with wrapped descriptions indented to the description column:

/**
 * Summary.
 *
 * @since x.x.x
 *
 * @param string $var       Description.
 * @param bool   $other_var Description that wraps
 *                          onto a second line.
 */

This corrects 17 @param lines across 7 files in the REST API.

### Example

src/wp-includes/rest-api/class-wp-rest-server.php — before:

* @param int $options             JSON encoding options {@see json_encode()}.
 * @param WP_REST_Request $request Current request object.

after:

* @param int             $options JSON encoding options {@see json_encode()}.
 * @param WP_REST_Request $request Current request object.

<details>
<summary>Files changed (7)</summary>

  • src/wp-includes/rest-api.php
  • src/wp-includes/rest-api/class-wp-rest-server.php
  • src/wp-includes/rest-api/endpoints/class-wp-rest-abilities-v1-categories-controller.php
  • src/wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php
  • src/wp-includes/rest-api/endpoints/class-wp-rest-menu-items-controller.php
  • src/wp-includes/rest-api/endpoints/class-wp-rest-revisions-controller.php
  • src/wp-includes/rest-api/endpoints/class-wp-rest-widget-types-controller.php

</details>

This is a whitespace-only change: git diff -w against trunk is empty, so there is no functional change and no change to any generated documentation output beyond the alignment itself.

## Use of AI Tools

AI assistance: Yes
Tool(s): Claude Code
Model(s): Claude Opus 5
Used for: Grouping a single large docblock alignment branch into per-component pull requests, verifying that the split is whitespace-only and that the seven branches together reproduce the original diff line for line, and drafting this description. I reviewed the alignment changes before submitting.

This ticket was mentioned in PR #13313 on WordPress/wordpress-develop by @mukesh27.


2 weeks ago
#19

The PHP inline documentation standards call for @param tags in a docblock to line up in columns — types, variable names, and descriptions each starting at the same offset — with wrapped descriptions indented to the description column:

/**
 * Summary.
 *
 * @since x.x.x
 *
 * @param string $var       Description.
 * @param bool   $other_var Description that wraps
 *                          onto a second line.
 */

This corrects 23 @param lines across 10 files in the upgrade/install, plugins, and themes code.

### Example

src/wp-admin/includes/class-wp-automatic-updater.php — before:

* @param bool $checkout  Whether a VCS checkout was discovered at `$context`
 *                        or ABSPATH, or anywhere higher.
 * @param string $context The filesystem context (a path) against which
 *                        filesystem status should be checked.

after:

* @param bool   $checkout Whether a VCS checkout was discovered at `$context`
 *                         or ABSPATH, or anywhere higher.
 * @param string $context  The filesystem context (a path) against which
 *                         filesystem status should be checked.

<details>
<summary>Files changed (10)</summary>

  • src/wp-admin/includes/upgrade.php
  • src/wp-admin/includes/class-wp-automatic-updater.php
  • src/wp-admin/includes/class-wp-site-health-auto-updates.php
  • src/wp-admin/includes/plugin.php
  • src/wp-admin/includes/plugin-install.php
  • src/wp-admin/includes/theme.php
  • src/wp-includes/theme.php
  • src/wp-includes/class-wp-theme.php
  • src/wp-content/themes/twentytwelve/functions.php
  • src/wp-content/themes/twentyfourteen/functions.php

</details>

This is a whitespace-only change: git diff -w against trunk is empty, so there is no functional change and no change to any generated documentation output beyond the alignment itself.

## Use of AI Tools

AI assistance: Yes
Tool(s): Claude Code
Model(s): Claude Opus 5
Used for: Grouping a single large docblock alignment branch into per-component pull requests, verifying that the split is whitespace-only and that the seven branches together reproduce the original diff line for line, and drafting this description. I reviewed the alignment changes before submitting.

This ticket was mentioned in PR #13314 on WordPress/wordpress-develop by @mukesh27.


2 weeks ago
#20

The PHP inline documentation standards call for @param tags in a docblock to line up in columns — types, variable names, and descriptions each starting at the same offset — with wrapped descriptions indented to the description column:

/**
 * Summary.
 *
 * @since x.x.x
 *
 * @param string $var       Description.
 * @param bool   $other_var Description that wraps
 *                          onto a second line.
 */

This corrects 19 @param lines across 7 files in the users and multisite code.

### Example

src/wp-admin/user-edit.php — before:

* @param bool    $enable      Whether to display the capabilities. Default true.
 * @param WP_User $profile_user The current WP_User object.

after:

* @param bool    $enable       Whether to display the capabilities. Default true.
 * @param WP_User $profile_user The current WP_User object.

<details>
<summary>Files changed (7)</summary>

  • src/wp-includes/user.php
  • src/wp-includes/ms-functions.php
  • src/wp-includes/class-wp-session-tokens.php
  • src/wp-includes/sitemaps/providers/class-wp-sitemaps-users.php
  • src/wp-admin/includes/user.php
  • src/wp-admin/user-edit.php
  • src/wp-admin/user-new.php

</details>

This is a whitespace-only change: git diff -w against trunk is empty, so there is no functional change and no change to any generated documentation output beyond the alignment itself.

## Use of AI Tools

AI assistance: Yes
Tool(s): Claude Code
Model(s): Claude Opus 5
Used for: Grouping a single large docblock alignment branch into per-component pull requests, verifying that the split is whitespace-only and that the seven branches together reproduce the original diff line for line, and drafting this description. I reviewed the alignment changes before submitting.

This ticket was mentioned in PR #13315 on WordPress/wordpress-develop by @mukesh27.


2 weeks ago
#21

The PHP inline documentation standards call for @param tags in a docblock to line up in columns — types, variable names, and descriptions each starting at the same offset — with wrapped descriptions indented to the description column:

/**
 * Summary.
 *
 * @since x.x.x
 *
 * @param string $var       Description.
 * @param bool   $other_var Description that wraps
 *                          onto a second line.
 */

This corrects 23 @param lines across 11 files in the posts, comments, taxonomy, and media APIs.

### Example

src/wp-admin/comment.php — before:

* @param string $location The URI the user will be redirected to.
 * @param int $comment_id The ID of the comment being edited.

after:

* @param string $location   The URI the user will be redirected to.
 * @param int    $comment_id The ID of the comment being edited.

<details>
<summary>Files changed (11)</summary>

  • src/wp-includes/comment.php
  • src/wp-includes/comment-template.php
  • src/wp-admin/comment.php
  • src/wp-includes/post.php
  • src/wp-includes/post-template.php
  • src/wp-includes/taxonomy.php
  • src/wp-includes/meta.php
  • src/wp-includes/media.php
  • src/wp-admin/includes/media.php
  • src/wp-includes/class-wp-image-editor.php
  • src/wp-admin/includes/post.php

</details>

This is a whitespace-only change: git diff -w against trunk is empty, so there is no functional change and no change to any generated documentation output beyond the alignment itself.

## Use of AI Tools

AI assistance: Yes
Tool(s): Claude Code
Model(s): Claude Opus 5
Used for: Grouping a single large docblock alignment branch into per-component pull requests, verifying that the split is whitespace-only and that the seven branches together reproduce the original diff line for line, and drafting this description. I reviewed the alignment changes before submitting.

This ticket was mentioned in PR #13316 on WordPress/wordpress-develop by @mukesh27.


2 weeks ago
#22

The PHP inline documentation standards call for @param tags in a docblock to line up in columns — types, variable names, and descriptions each starting at the same offset — with wrapped descriptions indented to the description column:

/**
 * Summary.
 *
 * @since x.x.x
 *
 * @param string $var       Description.
 * @param bool   $other_var Description that wraps
 *                          onto a second line.
 */

This corrects 19 @param lines across 13 files in the administration screens.

### Example

src/wp-admin/includes/class-wp-community-events.php — before:

* @param int        $user_id       WP user ID.
 * @param false|array $user_location {

after:

* @param int         $user_id       WP user ID.
 * @param false|array $user_location {

<details>
<summary>Files changed (13)</summary>

  • src/wp-admin/includes/class-wp-list-table.php
  • src/wp-admin/includes/class-wp-posts-list-table.php
  • src/wp-admin/includes/class-wp-terms-list-table.php
  • src/wp-admin/includes/list-table.php
  • src/wp-admin/includes/template.php
  • src/wp-admin/includes/class-wp-internal-pointers.php
  • src/wp-admin/includes/class-wp-community-events.php
  • src/wp-includes/class-wp-admin-bar.php
  • src/wp-includes/class-walker-nav-menu.php
  • src/wp-includes/class-walker-page.php
  • src/wp-includes/class-wp-customize-manager.php
  • src/wp-includes/customize/class-wp-customize-selective-refresh.php
  • src/wp-includes/widgets.php

</details>

This is a whitespace-only change: git diff -w against trunk is empty, so there is no functional change and no change to any generated documentation output beyond the alignment itself.

## Use of AI Tools

AI assistance: Yes
Tool(s): Claude Code
Model(s): Claude Opus 5
Used for: Grouping a single large docblock alignment branch into per-component pull requests, verifying that the split is whitespace-only and that the seven branches together reproduce the original diff line for line, and drafting this description. I reviewed the alignment changes before submitting.

This ticket was mentioned in PR #13317 on WordPress/wordpress-develop by @mukesh27.


2 weeks ago
#23

The PHP inline documentation standards call for @param tags in a docblock to line up in columns — types, variable names, and descriptions each starting at the same offset — with wrapped descriptions indented to the description column:

/**
 * Summary.
 *
 * @since x.x.x
 *
 * @param string $var       Description.
 * @param bool   $other_var Description that wraps
 *                          onto a second line.
 */

This corrects 38 @param lines across 16 files in the general core APIs.

### Example

src/wp-includes/class-wp-fatal-error-handler.php — before:

* @param array $args Associative array of arguments passed to `wp_die()`. By default these contain a
 *                    'response' key, and optionally 'link_url' and 'link_text' keys.
 * @param array $error Error information retrieved from `error_get_last()`.

after:

* @param array $args  Associative array of arguments passed to `wp_die()`. By default these contain a
 *                     'response' key, and optionally 'link_url' and 'link_text' keys.
 * @param array $error Error information retrieved from `error_get_last()`.

<details>
<summary>Files changed (16)</summary>

  • src/wp-includes/functions.php
  • src/wp-includes/load.php
  • src/wp-includes/class-wp-fatal-error-handler.php
  • src/wp-includes/class-wp-hook.php
  • src/wp-includes/cron.php
  • src/wp-includes/formatting.php
  • src/wp-includes/general-template.php
  • src/wp-includes/link-template.php
  • src/wp-includes/option.php
  • src/wp-includes/embed.php
  • src/wp-includes/class-wp-oembed.php
  • src/wp-includes/class-wp-http-requests-hooks.php
  • src/wp-includes/pomo/mo.php
  • src/wp-includes/pomo/translations.php
  • src/wp-includes/functions.wp-scripts.php
  • src/wp-admin/includes/file.php

</details>

This is a whitespace-only change: git diff -w against trunk is empty, so there is no functional change and no change to any generated documentation output beyond the alignment itself.

## Use of AI Tools

AI assistance: Yes
Tool(s): Claude Code
Model(s): Claude Opus 5
Used for: Grouping a single large docblock alignment branch into per-component pull requests, verifying that the split is whitespace-only and that the seven branches together reproduce the original diff line for line, and drafting this description. I reviewed the alignment changes before submitting.

#25 @wildworks
13 days ago

Regarding 7.2, I was wondering if we could reconsider the introduction of the WordPress-Docs ruleset. This might allow us to automatically fix some of the manual work.

  • The WordPress-Docs ruleset was previously attempted but discontinued. However, with the help of AI, we should be able to fix all errors. See #50744.
  • Gutenberg previously had the WordPress-Docs ruleset, but it was removed to align with the core. If we can introduce this ruleset into the core, we might be able to revive it in Gutenberg as well. See https://github.com/WordPress/gutenberg/pull/56982.

@mukesh27 commented on PR #13311:


12 days ago
#27

The files in src/wp-includes/blocks/ should not be updated.

Reverted.

#28 @SergeyBiryukov
11 days ago

In 63411:

Code Modernization: Use the null coalescing operator in WP_Customize_Manager.

The four object getters in WP_Customize_Manager: get_setting(), get_panel(), get_section(), and get_control(), each spell out an isset() guard followed by return null. The null coalescing operator says the same thing in one line.

?? applies the same isset() semantics as the guard it replaces, and since the fallback here is null itself, both forms return the identical value in every case. This covers the complete set of same-shaped getters in the class.

Developed in https://github.com/WordPress/wordpress-develop/pull/13304.

Follow-up to r63378.

Props Soean, mukesh27.
See #65818.

@SergeyBiryukov commented on PR #13304:


11 days ago
#29

Thanks for the PR! Merged in r63411.

#30 @SergeyBiryukov
10 days ago

In 63427:

Code Modernization: Use is_iterable() instead of manual array or Traversable checks.

PHP offers is_iterable() for the “array or Traversable” test that is otherwise written as a compound condition:

// Before
if ( is_array( $value ) || $value instanceof Traversable ) {

// After
if ( is_iterable( $value ) ) {

This replaces that idiom where it occurs.

Why this is safe

is_iterable() returns true for arrays and for objects implementing Traversable, and false for everything else, the same set the compound condition described, with no edge cases in between. It has been available since PHP 7.1, and WordPress currently requires PHP 7.4 or greater, so no compatibility shim is needed. Only the conditions themselves change; no surrounding logic is touched.

Developed in https://github.com/WordPress/wordpress-develop/pull/13016.

Follow-up to r61700.

Props Soean.
See #65818.

#31 @SergeyBiryukov
8 days ago

In 63453:

Code Modernization: Use array_all() in WP_Widget_Media_Gallery::has_content().

This replaces a manual foreach loop with the array_all() function, which expresses the same intent — return true only if every attachment ID resolves to a post of type attachment — without the loop-and-early-return boilerplate.

WordPress core includes a polyfill for array_all() on PHP < 8.4 as of WordPress 6.8, so the change works on every supported PHP version without raising the minimum requirement.

Developed in https://github.com/WordPress/wordpress-develop/pull/12609.

Follow-up to r62553.

Props Soean, mukesh27.
See #65818.

#32 @SergeyBiryukov
7 days ago

In 63485:

Code Quality: Remove redundant parent_post_type property from template autosaves controller.

The WP_REST_Template_Autosaves_Controller class redeclared a private $parent_post_type property and assigned it in its constructor. Both were dead code. The parent class WP_REST_Autosaves_Controller already declares and sets this property, and because it is declared private, the child class's copy could never be accessed by the parent's methods, nor was it ever read anywhere within the child class itself. The result was confusing property shadowing without any functional purpose.

This change removes the duplicate property declaration and the corresponding assignment in the constructor. Since the property was never read in the child class and was effectively a separate, unused storage slot, there is no change in runtime behavior.

Developed in https://github.com/WordPress/wordpress-develop/pull/12295.

Follow-up to r56819.

Props Soean.
See #65818.

#33 @westonruter
7 days ago

In 63486:

Build/Test Tools: Regenerate PHPStan baselines for property.onlyWritten.

The sole property.onlyWritten error identified by PHPStan was fixed without the baselines being regenerated.

Follow-up to r63485.

See #65817, #65818.

#34 @wildworks
7 days ago

In 63491:

Docs: Align @param tag columns in general core API docblocks.

Aligns @param tag columns in docblocks across the general core APIs per the PHP inline documentation standards.

Developed in: https://github.com/WordPress/wordpress-develop/pull/13317

Props mukesh27, wildworks.
See #65818.

#36 @wildworks
7 days ago

In 63492:

Docs: Align @param tag columns in administration docblocks.

Aligns @param tag columns in docblocks across the administration screens per the PHP inline documentation standards.

Developed in: https://github.com/WordPress/wordpress-develop/pull/13316

Props mukesh27, wildworks.
See #65818.

#38 @wildworks
7 days ago

In 63493:

Docs: Align @param tag columns in REST API docblocks.

Aligns @param tag columns in docblocks across the REST API per the PHP inline documentation standards.

Developed in: https://github.com/WordPress/wordpress-develop/pull/13312

Props mukesh27, wildworks.
See #65818.

#40 @wildworks
7 days ago

In 63494:

Docs: Align @param tag columns in upgrade, plugin, and theme docblocks.

Aligns @param tag columns in docblocks across the upgrade, plugin, and theme code per the PHP inline documentation standards.

Developed in: https://github.com/WordPress/wordpress-develop/pull/13313

Props mukesh27, wildworks.
See #65818.

#42 @wildworks
7 days ago

In 63495:

Docs: Align @param tag columns in block editor docblocks.

Aligns @param tag columns in docblocks across the block editor per the PHP inline documentation standards.

Developed in: https://github.com/WordPress/wordpress-develop/pull/13311

Props mukesh27, wildworks.
See #65818.

#44 @wildworks
7 days ago

In 63496:

Docs: Align @param tag columns in users and multisite docblocks.

Aligns @param tag columns in docblocks across the users and multisite code per the PHP inline documentation standards.

Developed in: https://github.com/WordPress/wordpress-develop/pull/13314

Props mukesh27, wildworks.
See #65818.

#46 @wildworks
7 days ago

In 63497:

Docs: Align @param tag columns in post, comment, taxonomy, and media docblocks.

Aligns @param tag columns in docblocks across the posts, comments, taxonomy, and media APIs per the PHP inline documentation standards.

Developed in: https://github.com/WordPress/wordpress-develop/pull/13315

Props mukesh27, wildworks.
See #65818.

#52 @wildworks
4 days ago

In 63527:

Docs: Align @param tag columns in block-supports and theme tests.

Aligns @param tag columns in docblocks across the block supports and theme.json test files per the PHP inline documentation standards.

Developed in: https://github.com/WordPress/wordpress-develop/pull/13414

Props mukesh27, wildworks.
See #65818.

#54 @wildworks
4 days ago

In 63528:

Docs: Align @param tag columns in Style Engine docblocks.

Aligns @param tag columns in docblocks across the Style Engine per the PHP inline documentation standards.

Developed in: https://github.com/WordPress/wordpress-develop/pull/13415

Props mukesh27, wildworks.
See #65818.

#56 @wildworks
4 days ago

In 63529:

Docs: Align @param and @return tags in block editor-related code.

Aligns @param and @return tags in docblocks across block editor-related code per the PHP inline documentation standards.

Developed in: https://github.com/WordPress/wordpress-develop/pull/13416

Props mukesh27, wildworks.
See #65818.

This ticket was mentioned in PR #13483 on WordPress/wordpress-develop by @mukesh27.


18 hours ago
#59

Trac ticket: https://core.trac.wordpress.org/ticket/65818

Corrects "continuing form earlier output" to "continuing from earlier output" in the $last_offset parameter description.

Documentation only, no functional change.

## Use of AI Tools

AI assistance: Yes
Tool(s): Claude Code
Model(s): Claude Opus 5
Used for: Drafting the PR, drafting this description. I have reviewed the change and take responsibility for it.

This ticket was mentioned in PR #13484 on WordPress/wordpress-develop by @mukesh27.


18 hours ago
#60

Trac ticket: https://core.trac.wordpress.org/ticket/65818

## Use of AI Tools
N/A

This ticket was mentioned in PR #13487 on WordPress/wordpress-develop by @mukesh27.


17 hours ago
#61

Trac ticket: https://core.trac.wordpress.org/ticket/65818

Replaces the $array[ array_key_last( $array ) ] in WP_Block_Parser::add_inner_block() with a direct call to array_last().

## Use of AI Tools
N/A

#62 @wildworks
16 hours ago

In 63599:

Docs: Add missing blank line after @since in block parser

The PHP inline documentation standards require a blank line between the @since tag and the following @param/@return tags.

Developed in: https://github.com/WordPress/wordpress-develop/pull/13482

Props mukesh27, wildworks.
See #65818.

#64 @wildworks
13 hours ago

In 63601:

Code Modernization: Use null coalescing operator in WP_Block_Parser

Two methods used a ternary that treats a falsy value as not provided even though the parameters accept 0 as valid input, so this switches to the null coalescing operator, which tests only for null.

Developed in: https://github.com/WordPress/wordpress-develop/pull/13484

Props mukesh27, wildworks.
See #65818.

Note: See TracTickets for help on using tickets.