Opened 8 months ago
Closed 8 months ago
#64317 closed defect (bug) (fixed)
Docs: Update the comment of the `wp_enqueue_classic_theme_styles()` function
| Reported by: | wildworks | Owned by: | westonruter |
|---|---|---|---|
| Priority: | normal | Milestone: | 7.0 |
| Component: | Themes | Version: | 6.4 |
| Severity: | normal | Keywords: | good-first-bug has-patch |
| Cc: | Focuses: |
Description
Related to #61892
The wp_enqueue_classic_theme_styles() function is executed on both the editor and the front-end:
Therefore, the following function comment is misleading:
"Loads classic theme styles on classic themes in the frontend."
We should remove the "in the frontend." fron the comment.
Attachments (1)
Change History (9)
#1
@
8 months ago
- Keywords has-patch added
- Version → trunk
Updates docblock to remove incorrect “in the frontend” reference.
This ticket was mentioned in PR #10565 on WordPress/wordpress-develop by @manhphucofficial.
8 months ago
#2
This PR updates the docblock for wp_enqueue_classic_theme_styles() to remove
the incorrect “in the frontend” phrase.
The function is executed on both the editor and the front end.
#5
@
8 months ago
- Milestone Awaiting Review → 7.0
- Owner set to
- Status new → reviewing
I think the description might be further improved.
In r54687 the function changed so that it only enqueued in non-block themes. That is, it enqueued in classic and hybrid themes. Now, however, it's enqueueing only in themes that lack a theme.json, which would be exclusively classic non-hybrid themes. It uses wp_theme_has_theme_json() which “Checks whether a theme or its parent has a theme.json file.” Since the definition of "classic theme" often encompases hybrid themes, I think this can be more explicit. So instead of:
Loads classic theme styles on classic themes.
I think it should rather be:
Loads classic theme styles in themes which lack a theme.json file.
@manhphucofficial commented on PR #10565:
8 months ago
#6
Suggested change applied. Let me know if anything else is needed.
@manhphucofficial commented on PR #10565:
8 months ago
#7
Suggested change applied. Thanks for the clarification!
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Patch updates incorrect docblock description