#25448 closed defect (bug) (fixed)
Hook Docs (14): wp-admin/edit-tag-form.php
Reported by: | Japh | Owned by: | kpdesign |
---|---|---|---|
Milestone: | 3.9 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Taxonomy | Keywords: | has-patch commit |
Focuses: | docs | Cc: |
Description
Patch forthcoming.
Attachments (4)
Change History (19)
#2
@
11 years ago
Marking this as available on the master list
#4
@
11 years ago
Attached patch has docs for the following hooks in wp-admin/edit-tag-form.php:
Filters:
editable_slug
Actions:
edit_category_form_pre
edit_link_category_form_pre
edit_tag_form_pre
$taxonomy . '_pre_edit_form'
$taxonomy . '_term_edit_form_tag'
edit_category_form_fields
edit_link_category_form_fields
edit_tag_form_fields
$taxonomy . '_edit_form_fields'
edit_category_form
edit_link_category_form
edit_tag_form
$taxonomy . '_edit_form'
#6
@
11 years ago
- Keywords needs-patch added; has-patch removed
@nicolealleyinteractivecom: Thanks for the patch. :)
General:
- The following hooks are the "edit" versions of the corresponding "add" hooks in wp-admin/edit-tags.php:
edit_category_form_pre
(see add_category_form_pre)edit_link_category_form_pre
(see add_link_category_form_pre)edit_tag_form_pre
(see add_tag_form_pre){$taxonomy}_pre_edit_form
(see {$taxonomy}_pre_add_form)$taxonomy . '_term_edit_form_tag
(see {$taxonomy}_term_new_form_tag)edit_tag_form_fields
(see add_tag_form_fields)$taxonomy . '_edit_form_fields
(see {$taxonomy}_add_form_fields)edit_tag_form
(see add_tag_form)$taxonomy . '_edit_form'
(see {$taxonomy}_add_form)
- I would recommend looking at the corresponding doc blocks for those hooks in wp-admin/edit-tags.php, and model the edit version of the doc blocks here after them. Some of them have long descriptions, such as "The dynamic portion of the hook name, $taxonomy, refers to the taxonomy slug." that are applicable to the hooks here as well. For the back-compat hooks, remove the long description, and add the @deprecated line with the applicable "Use hook_name instead." text under @since.
- In short descriptions, capitalize the name of the form, e.g. edit category/Edit Category, edit link category/Edit Link Category, etc.
- Space out the do_action/apply_filters lines per the coding standards. For example:
do_action('edit_category_form_fields', $tag);
should be:do_action( 'edit_category_form_fields', $tag );
edit_category_form
and edit_link_category_form
:
- These are duplicate hooks, so you can replace the doc blocks with
/** This action is documented in wp-admin/edit-tags.php */
editable_slug
:
- Change the variable in the @param to a docs-specific variable, such as
$slug
.
edit_category_form_fields
and edit_link_category_form_fields
:
- Remove the long description, and add "@deprecated 3.0.0 Use $taxonomy_edit_form_fields instead." directly under @since.
$taxonomy . '_term_edit_form_tag
:
- @since should be 3.7.0 - this was a new hook introduced in #15261 (see 25034).
- Remove the @param line, as
$taxonomy
is part of the hook name.
Could you make these changes, and submit a new patch please?
Note: Don't check the box to overwrite your existing patch - if you use the same filename, Trac will automatically append a .2 to the name to prevent it from being overwritten.
#8
@
11 years ago
- Owner set to kpdesign
- Status changed from new to reviewing
- Summary changed from Hook Docs: wp-admin/edit-tag-form.php to Hook Docs (14): wp-admin/edit-tag-form.php
#9
@
11 years ago
25448.3.diff contains minor formatting and description fixes.
Ready for a second review and a recommendation.
#10
@
11 years ago
- Keywords commit added
- Milestone changed from Awaiting Review to 3.9
25448.diff is a fourth pass. I cleaned up some of the terminology as the "Edit Tag" form is actually just reused for all taxonomies. Also, $taxonomy
is a string, not an object.
Could use a once over for the fine details.
#11
@
11 years ago
25448.diff looks good. Recommend commit.
Are you still working on this file?