Opened 5 months ago
Closed 4 months ago
#64317 closed defect (bug) (fixed)
Docs: Update the comment of the `wp_enqueue_classic_theme_styles()` function
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 7.0 | Priority: | normal |
| Severity: | normal | Version: | 6.4 |
| Component: | Themes | Keywords: | good-first-bug has-patch |
| Focuses: | Cc: |
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
@
5 months ago
- Keywords has-patch added
- Version set to trunk
Updates docblock to remove incorrect “in the frontend” reference.
This ticket was mentioned in PR #10565 on WordPress/wordpress-develop by @manhphucofficial.
5 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
@
4 months ago
- Milestone changed from Awaiting Review to 7.0
- Owner set to westonruter
- Status changed from new to 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:
4 months ago
#6
Suggested change applied. Let me know if anything else is needed.
@manhphucofficial commented on PR #10565:
4 months ago
#7
Suggested change applied. Thanks for the clarification!
Patch updates incorrect docblock description