Opened 8 years ago
Closed 7 years ago
#39130 closed task (blessed) (fixed)
Docblock improvements for 4.8
Reported by: | johnbillion | Owned by: | |
---|---|---|---|
Milestone: | 4.8 | Priority: | normal |
Severity: | normal | Version: | |
Component: | General | Keywords: | ongoing has-patch |
Focuses: | docs | Cc: |
Description
Follow-up to #37770.
Attachments (13)
Change History (26)
#3
@
8 years ago
Just to clarify some of the patches.
In 39130.5.patch the DocBlock is not found by the parser because it's a comment. This has the consequence that it's imported as a duplicate filter (without the parameters).
https://developer.wordpress.org/reference/hooks/image_size_names_choose-4/
In 39130.7.patch the @since
parameter is only picked up by the parser if there's only one space before it. Now it's displayed in the description section instead of the change log section.
https://developer.wordpress.org/reference/functions/wp_update_network_counts/
#6
@
8 years ago
These hooks should be documented:
load-page-new.php
in /wp-admin/admin.phpload-page.php
in /wp-admin/admin.phpload-categories.php
in /wp-admin/admin.phpload-edit-link-categories.php
in /wp-admin/admin.phpload-edit-tags.php
in /wp-admin/admin.phpheader_video_settings
in /wp-includes/theme.php
For the header_video_settings
filter there's this patch.
The actions in /wp-admin/admin.php
are deprecated but should still be documented because of this issue with the parser.
In the PHP Documentation Standards handbook we should make it more clear that DocBlocks start with a double asterisk (/**
) and should only be used for these elements. For all other inline documentation multi-line or single-line comments should be used. This is an example of wrong DocBlock usage that the parser picks up as a DocBlock and could potentially assign to a hook.
In 39530: