Opened 8 years ago
Closed 7 years ago
#45445 closed defect (bug) (fixed)
Cron-related documentation incorrectly uses `@see` syntax in a number of places
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 5.1 | Priority: | low |
| Severity: | minor | Version: | 5.1 |
| Component: | Cron API | Keywords: | has-patch |
| Focuses: | docs | Cc: |
Description
Cron-related hooks committed and slated for 5.1 were introduced with docblocks that incorrectly use the @see syntax to reference hooks and functions. The incorrect uses were of the format {@see pre_unschedule_event}. This is ambiguous as to what is being referenced. Currently, the Code Reference would only try to link each of these to a function, assuming such a function exists.
In the case of hooks (which were the most common occurrences of this problem), the syntax should be {@see 'pre_unschedule_event'} (note the single quotes).
In the case of functions, something like {@see wp_get_schedules} should be {@see wp_get_schedules()}. However, it is not necessary to use the @see syntax when referencing functions, classes, or methods since they can be inferred (and are inferred and auto-linked by the Code Reference).
The documentation standards mention the use of @see for referencing hooks, but could stand to be more explicit about not needing to be used for functions, classes, or class methods.
These were introduced mostly from [43540] (but also [43050] and [43608]).
Related: #32656.
The attached patch fixes the hook references and removes explicit referencing of a few functions (all of which were added in the aforementioned commits).
Patch mentioned in ticket.