Make WordPress Core

Opened 2 years ago

Closed 2 years ago

#56257 closed defect (bug) (fixed)

Wrong function description in `wp_is_theme_directory_ignored` docblock.

Reported by: audrasjb's profile audrasjb Owned by: audrasjb's profile audrasjb
Milestone: 6.1 Priority: low
Severity: normal Version: 6.0
Component: General Keywords: good-first-bug has-patch
Focuses: docs Cc:

Description

The description of wp_is_theme_directory_ignored() is not 100% accurate:

Filters theme directories that should be ignored during export.

This function doesn't filter theme directories, it rather determines whether a theme directory should be ignored during export.

https://developer.wordpress.org/reference/functions/wp_is_theme_directory_ignored/
https://github.com/WordPress/wordpress-develop/blob/trunk/src/wp-includes/block-template-utils.php#L896

Attachments (2)

56257.patch (513 bytes) - added by nareshbheda 2 years ago.
Here is the patch to improve docblock.
56257.2.patch (455 bytes) - added by nareshbheda 2 years ago.
Updated patch

Download all attachments as: .zip

Change History (7)

#1 @audrasjb
2 years ago

  • Version set to 6.0

@nareshbheda
2 years ago

Here is the patch to improve docblock.

#2 @nareshbheda
2 years ago

  • Keywords has-patch added; needs-patch removed

#3 @audrasjb
2 years ago

  • Keywords needs-refresh added

Hello @nareshbheda,

Thank you for the patch!

However, I think a better description would simply be:

Determines whether a theme directory should be ignored during export.

:-)

@nareshbheda
2 years ago

Updated patch

#4 @nareshbheda
2 years ago

  • Keywords needs-refresh removed

#5 @audrasjb
2 years ago

  • Owner set to audrasjb
  • Resolution set to fixed
  • Status changed from new to closed

In 53757:

Docs: Provide a more accurate description for wp_is_theme_directory_ignored().

This function doesn't filter theme directories, it rather determines whether a directory should be ignored during export.

Props audrasjb, nareshbheda.
Fixes #56257.
See #55646.

Note: See TracTickets for help on using tickets.