#25430 closed defect (bug) (fixed)
Hooks Docs: wp-admin/options-reading.php
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 3.7 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Inline Docs | Keywords: | needs-patch |
Focuses: | Cc: |
Description
First pass at inline docs for wp-admin/options-reading.php.
Attachments (5)
Change History (12)
#1
@
12 years ago
- Keywords needs-patch added; has-patch removed
- Owner set to DrewAPicture
- Status changed from new to reviewing
- Type changed from enhancement to defect (bug)
#2
@
12 years ago
Hi Drew. I've attached the updated patch with the long description added. I borrowed heavily from the original commit message!
This action is required in order to add additional values to the privacy options form. When called, the form's default radio buttons are converted to check boxes, and the 'Site Visibility' heading is changed to the more specific 'Search Engine Visibility.'
I suspect it may still require some editing, let me know. Thanks for your help. :)
#4
@
12 years ago
Looking at the long description in options-reading.patch, it's actually backwards. The default behavior is to show a checkbox, and if hooked, the action flips the form to radio buttons, opening the door for additional options to be added.
I reworked the language in 25430.diff. What do you think?
Hi Siobhan, thanks for the patch :)
So, this hook is kind of interesting because it mostly serves to provide backward-compatibility for adding additional-level privacy setting to the fieldset that used to live in the now-defunct options-privacy.php See #16416 for when those settings screens were consolidated.
And if you look at the current code, you'll notice that the section of the table that the action runs in is only displayed if that hook has a callback hooked to it.
The logic behind it is explained pretty well in the commit message for [21838]:
The reason I bring this up is that we should find a way to succinctly explain this behavior in the hook doc, probably using a long (but not too long!) description.
Also, in the future, could you please remember to generate patches from the WordPress root? :)