Make WordPress Core

Opened 7 months ago

Closed 7 weeks ago

#62281 closed task (blessed) (fixed)

Docblock improvements for WP 6.8

Reported by: desrosj's profile desrosj Owned by:
Milestone: 6.8 Priority: normal
Severity: normal Version:
Component: General Keywords: has-patch
Focuses: coding-standards Cc:

Description

Previously:

Change History (30)

#1 @SergeyBiryukov
7 months ago

In 59291:

Docs: Adjust comments about set_time_limit() per the documentation standards.

Includes splitting long comments into multiple lines and moving a few comments above the function_exists() check for more consistent placement.

Follow-up to [59039], [59288].

See #62281.

#2 @SergeyBiryukov
7 months ago

In 59333:

Docs: Correct @param tag in untrailingslashit() to match the parameter name.

Follow-up to [54927].

Props justlevine.
See #52217, #62281.

#3 @SergeyBiryukov
7 months ago

In 59334:

Docs: Correct @param type in fix_phpmailer_messageid().

Follow-up to [48033].

Props justlevine.
See #52217, #62281.

#4 @SergeyBiryukov
6 months ago

In 59336:

Docs: Add missing void to DocBlock @return types.

This commit adds missing void return types to (parent) methods that can explicitly return void as one of their conditional paths.

Addressed methods:

  • WP_Privacy_Requests_Table::column_status()
  • WP_Recovery_Mode::handle_error()
  • WP_Widget::form() — unlike the others, it's the child classes that return void when the method is correctly implemented.

Note: @return void (where void is the single type returned) should not be used outside the default bundled themes and the PHP compatibility shims included in WordPress Core, as per the documentation standards.

Follow-up to [30382], [42967], [43256], [44973], [45448].

Props justlevine.
See #52217, #62281.

#5 @johnbillion
6 months ago

In 59405:

Docs: Correct the spelling of silicon in the local development environment readme.

See #62281

This ticket was mentioned in Slack in #core by jonsurrell. View the logs.


5 months ago

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


5 months ago
#7

  • Keywords has-patch added

The `script_module_data_{$module_id}` filter documentation is truncated.. It seems that the example tag is not processed and instead ends the description section of the documentation.

Change the examples for this filter to use Example: and an indented code block. This seems to work in other places:

https://github.com/WordPress/wordpress-develop/blob/b6f639737c5fa722dd5a80f0ad94e48c67c37ffd/src/wp-includes/functions.php#L7514-L7525

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

#8 @SergeyBiryukov
5 months ago

In 59505:

Docs: Correct formatting for script module data filter documentation examples.

Follow-up to [58579].

Props jonsurrell.
See #62281.

@SergeyBiryukov commented on PR #7990:


5 months ago
#9

Thanks for the PR! Merged in r59505.

#10 @audrasjb
5 months ago

In 59549:

Docs: Docblock improvements in .

Props shailu25.
Fixes #62730.
See #62281.

#11 @audrasjb
4 months ago

In 59702:

Docs: Various Docblock fixes in wp-includes/widgets.php, as per WP Docs standards;

Props ankitpatel1578, sabernhardt.
Fixes #62859.
See #62281.

#12 @audrasjb
4 months ago

In 59704:

Docs: Improve @return docblock section for get_category().

This changeset adds more details on the WP_Term returned by get_category() as it contains additional backwards compatible aliases for the era before WP 4.4 and 2.3.

Props apermo, audrasjb.
Fixes #62842.
See #62281.

#13 @audrasjb
4 months ago

In 59734:

Docs: Improve docblock for rest_menu_read_access filter.

Follow-up to [59718].

See #62281, #54304.

#14 @SergeyBiryukov
3 months ago

In 59756:

Docs: Correct DocBlock formatting for the_password_form filter.

Follow-up to [59736], [59737].

See #62281.

#15 @audrasjb
3 months ago

In 59785:

Docs: Various Docblock fixes in wp-includes/class-wp-customize-control.php, as per WP Docs standards;

See #62281.

#16 @audrasjb
3 months ago

In 59787:

Docs: Fix Docblock parameters indentation for wp_determine_option_autoload_value(), as per WP Docs standards.

See #62281.

#17 @SergeyBiryukov
3 months ago

In 59829:

Docs: Correct formatting for get_the_date and get_the_time DocBlocks.

Follow-up to [53000].

See #62281.

#18 @SergeyBiryukov
3 months ago

In 59836:

Docs: Correct the type for the_modified_date filter parameter.

Due to concatenation directly above, this value can only be a string.

Follow-up to [28130], [48929].

See #62281.

#19 @johnbillion
3 months ago

In 59861:

Docs: Various improvements to inline documentation.

See #62281

#20 @SergeyBiryukov
3 months ago

In 59864:

Docs: Correct DocBlock formatting for wp_check_comment_disallowed_list().

Follow-up to [6553], [48121], [48575].

See #62281.

#21 @johnbillion
3 months ago

In 59865:

Docs: Various improvements to inline documentation.

See #62281

#22 @SergeyBiryukov
3 months ago

In 59871:

Docs: Correct the type for transition_comment_status action parameters.

By the time this hook runs, the $new_status and $old_status values can only be a string.

Follow-up to [26491].

See #62281.

#23 @SergeyBiryukov
3 months ago

In 59882:

Docs: Correct the type for ::prepare_status_response() parameter in WP_REST_Comments_Controller.

The accepted value is WP_Comment::$comment_approved, which is documented as a string.

Follow-up to [38832], [33891], [39015], [59805], [59871].

See #62281.

#24 @johnbillion
3 months ago

In 59896:

Docs: Various improvements to inline documentation.

See #62281

#25 @johnbillion
2 months ago

In 59927:

Docs: Various improvements to inline documentation.

See #62281

#26 @audrasjb
2 months ago

In 59940:

Docs: Update $network_id parameter type to int|null in Network Option methods.

Props maikelraow, im3dabasia1, audrasjb, mukesh27.
Fixes #62735.
See #62281.

#27 @SergeyBiryukov
2 months ago

In 59952:

Docs: Clarify the backward compatibility reference in get_calendar() DocBlock.

Includes adjusting the @since note for the get_calendar filter, as the reference is only relevant for the function DocBlock.

Follow-up to [59908].

See #62281.

#28 @SergeyBiryukov
2 months ago

In 59979:

Docs: Correct formatting for some inline comments in unit tests.

Follow-up to [54111], [56714], [58182], [59630], [59817], [59966].

See #62281.

#29 @desrosj
7 weeks ago

I've gone and opened #63166 for 6.9. If any additional changes are required for 6.8, we can reopen this.

#30 @desrosj
7 weeks ago

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.