Make WordPress Core

Opened 5 months ago

Closed 4 months ago

#63692 closed defect (bug) (fixed)

Bundled Theme: Add missing PHPDoc Block for the action.

Reported by: viralsampat's profile viralsampat Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: 6.9 Priority: normal
Severity: minor Version:
Component: Bundled Theme Keywords: has-patch changes-requested
Focuses: docs Cc:

Description

Hello Team,

I reviewed the theme files and noticed the use of a PHPDoc block for the twentynineteen_scripts & twentyseventeen_scripts action hook in the Twenty Nineteen & Twenty Seventeen themes.

I think that it should be appropriate, as it helps with documentation and clarity.

Thanks,

Attachments (1)

63692.patch (1.1 KB) - added by viralsampat 5 months ago.
I have reviewed above mentioned issue and resolved it. Here, I have added its patch.

Download all attachments as: .zip

Change History (34)

@viralsampat
5 months ago

I have reviewed above mentioned issue and resolved it. Here, I have added its patch.

#1 @vladimiraus
5 months ago

  • Keywords changes-requested added; needs-testing removed
  • Severity changed from normal to minor
  • Version set to trunk

There is a difference between the function comment. Enqueues vs Enqueue: should make it consistent.

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


5 months ago
#2

Theme consistency in php doc.

#3 @vladimiraus
5 months ago

  • Keywords reporter-feedback added; changes-requested removed

Added merge request.

#4 @mukesh27
5 months ago

  • Keywords dev-feedback 2nd-opinion reporter-feedback removed
  • Milestone changed from Awaiting Review to 6.9
  • Version trunk deleted

Thanks for the PR!

It looks good to me.

Move to 6.9

#5 @mukesh27
5 months ago

  • Summary changed from Twenty Nineteen & Twenty Seventeen: Add PHPDoc Block for the twentynineteen_scripts & twentyseventeen_scripts action. to Bundled Theme: Add missing PHPDoc Block for the action.

#6 @SergeyBiryukov
5 months ago

In 60494:

Twenty Seventeen: Add missing @since tag for twentyseventeen_scripts().

Follow-up to [38833].

Props viralsampat, vladimiraus, mukesh27.
See #63692.

#7 @SergeyBiryukov
5 months ago

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

In 60495:

Twenty Nineteen: Add missing @since tag for twentynineteen_scripts().

Follow-up to [43808].

Props viralsampat, vladimiraus, mukesh27.
Fixes #63692.

#8 follow-up: @mukesh27
5 months ago

@SergeyBiryukov could you please commit changes for src/wp-content/themes/twentyfifteen/functions.php. The PR https://github.com/WordPress/wordpress-develop/pull/9294 have that changes.

#9 in reply to: ↑ 8 @SergeyBiryukov
5 months ago

Replying to mukesh27:

could you please commit changes for src/wp-content/themes/twentyfifteen/functions.php

I left that out for now, as those older themes are not super consistent with using third-person singular verbs in function descriptions, and there are at least 8 other instances of "Enqueue scripts" in various themes. So I think fixing just that one instance would not really add any consistency, see also twentyfifteen_block_editor_styles() for example.

Happy to reopen if someone is interested in updating all of those DocBlocks to use third-person singular verbs :)

Last edited 5 months ago by SergeyBiryukov (previous) (diff)

#10 @mukesh27
5 months ago

@vladimiraus Can you open separate PR?

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


5 months ago
#11

Third-person singular verbs update for themes.

#12 @vladimiraus
5 months ago

@SergeyBiryukov @mukesh27 PR is open.

#13 @vladimiraus
5 months ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

#14 @mukesh27
5 months ago

  • Keywords changes-requested added

#15 @SergeyBiryukov
5 months ago

In 60505:

Twenty Ten: Use third-person singular verbs for function descriptions.

Reference: PHP Documentation Standards: Documenting Tips.

Props vladimiraus, mukesh27, SergeyBiryukov.
See #63692.

#16 @SergeyBiryukov
5 months ago

In 60506:

Twenty Eleven: Use third-person singular verbs for function descriptions.

Reference: PHP Documentation Standards: Documenting Tips.

Props vladimiraus, mukesh27, SergeyBiryukov.
See #63692.

#17 @SergeyBiryukov
5 months ago

In 60507:

Bundled Themes: Revert some documentation changes to use third-person singular verbs.

These are inline comments, not function descriptions.

Reference: PHP Documentation Standards: Documenting Tips.

Follow-up to [60505], [60506].

See #63692.

#18 @SergeyBiryukov
5 months ago

In 60508:

Twenty Twelve: Use third-person singular verbs for function descriptions.

Reference: PHP Documentation Standards: Documenting Tips.

Props vladimiraus, mukesh27, SergeyBiryukov.
See #63692.

#19 @SergeyBiryukov
5 months ago

In 60509:

Twenty Ten: Use third-person singular verbs for some more function descriptions.

Reference: PHP Documentation Standards: Documenting Tips.

Follow-up to [60505], [60507].

See #63692.

#20 @SergeyBiryukov
5 months ago

In 60513:

Twenty Eleven: Use third-person singular verbs for some more function descriptions.

Reference: PHP Documentation Standards: Documenting Tips.

Follow-up to [60506], [60507].

See #63692.

#21 @SergeyBiryukov
5 months ago

In 60514:

Twenty Twelve: Use third-person singular verbs for some more function descriptions.

Reference: PHP Documentation Standards: Documenting Tips.

Follow-up to [60508].

See #63692.

#22 @SergeyBiryukov
5 months ago

In 60515:

Twenty Thirteen: Use third-person singular verbs for function descriptions.

Reference: PHP Documentation Standards: Documenting Tips.

Props vladimiraus, mukesh27, SergeyBiryukov.
See #63692.

#23 @SergeyBiryukov
5 months ago

In 60519:

Twenty Fourteen: Use third-person singular verbs for function descriptions.

Reference: PHP Documentation Standards: Documenting Tips.

Props vladimiraus, mukesh27, SergeyBiryukov.
See #63692.

#24 @SergeyBiryukov
4 months ago

In 60521:

Twenty Fifteen: Use third-person singular verbs for function descriptions.

Reference: PHP Documentation Standards: Documenting Tips.

Props vladimiraus, mukesh27, SergeyBiryukov.
See #63692.

#25 @SergeyBiryukov
4 months ago

In 60527:

Twenty Sixteen: Use third-person singular verbs for function descriptions.

Reference: PHP Documentation Standards: Documenting Tips.

Props vladimiraus, mukesh27, SergeyBiryukov.
See #63692.

#26 @SergeyBiryukov
4 months ago

In 60533:

Twenty Seventeen: Use third-person singular verbs for function descriptions.

Reference: PHP Documentation Standards: Documenting Tips.

Props vladimiraus, mukesh27, SergeyBiryukov.
See #63692.

#27 @SergeyBiryukov
4 months ago

In 60535:

Twenty Nineteen: Use third-person singular verbs for function descriptions.

Reference: PHP Documentation Standards: Documenting Tips.

Props vladimiraus, mukesh27, SergeyBiryukov.
See #63692.

#28 @SergeyBiryukov
4 months ago

In 60536:

Twenty Twenty: Use third-person singular verbs for function descriptions.

Reference: PHP Documentation Standards: Documenting Tips.

Props vladimiraus, mukesh27, SergeyBiryukov.
See #63692.

#29 @SergeyBiryukov
4 months ago

In 60537:

Twenty Twenty-One: Use third-person singular verbs for function descriptions.

Reference: PHP Documentation Standards: Documenting Tips.

Props vladimiraus, mukesh27, SergeyBiryukov.
See #63692.

#30 @SergeyBiryukov
4 months ago

In 60538:

Twenty Twenty-Two: Use third-person singular verbs for function descriptions.

Reference: PHP Documentation Standards: Documenting Tips.

Props vladimiraus, mukesh27, SergeyBiryukov.
See #63692.

#31 @SergeyBiryukov
4 months ago

In 60610:

Twenty Twenty-Four: Use third-person singular verbs for function descriptions.

Reference: PHP Documentation Standards: Documenting Tips.

Props vladimiraus, mukesh27, SergeyBiryukov.
See #63692.

@SergeyBiryukov commented on PR #9305:


4 months ago
#32

Thanks for the PR! Merged in r60505, r60506, r60508, r60515, r60519, r60521, r60527, r60533, r60535, r60536, r60537, r60538, and r60610.

#33 @SergeyBiryukov
4 months ago

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