Opened 10 years ago
Closed 10 years ago
#30483 closed defect (bug) (fixed)
Improve inline documentation in wp-admin/includes/ms.php
Reported by: | dustyf | Owned by: | |
---|---|---|---|
Milestone: | 4.1 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Networks and Sites | Keywords: | has-patch |
Focuses: | docs, multisite | Cc: |
Description
Multiple functions are missing docblocks in wp-admin/includes/ms.php and others are missing parameters and descriptions. This ticket is to add docblocks where necessary and improve those that are in place.
Attachments (4)
Change History (12)
#2
@
10 years ago
- Focuses multisite added
- Milestone changed from Awaiting Review to Future Release
- Version changed from 4.0.1 to trunk
Great stuff @dustyf, thanks!
Notes:
- All
@param
docs should have the type included (e.g@param type $var Description.
). If the parameter is optional, this should be indicated as well. It looks like many of them are complete, but several are missing this data. @param
docs should also be space aligned when multiple exists. Again, it looks like many are there, but a few are still misaligned.update_user_status()
should probably be anint
return type as it returns the$value
it was passed.refresh_user_details()
could be clarified to show thatfalse
is returned if a user ID does not exist.
@DrewAPicture may have more feedback as well.
#3
@
10 years ago
Thanks, jeremyfelt. I'll be updating this. I should have caught some of it on my first pass.
#4
@
10 years ago
Looking good. Maybe one more revision:
In 30483.2.diff:
- L299: Missing
@global ...
(2x) - L487: Typo
- L530: missing type
- L607:
@access private
maybe? - L647: missing type
- L708: missing
@global ...
- L914+915: Alignment
Inline comments in PRs on GH are sooo much easier.
#6
@
10 years ago
- Version trunk deleted
Hi Dusty, thanks for the patches. I've made some adjustments in 30483.4.diff, namely:
- Line-wrapping at ~80 characters whenever possible
- Some functions had optional parameters that weren't documented as such in the new DocBlocks
- The syntax for
@global
tags is@global type $variable Description.
- In descriptions other than the summary (formerly 'short description'), any inline code should be backtick-escaped and function/hook/class/method references linked with inline
@see
tags. See the Other Descriptions section of the standard for more on those tags
Note: See
TracTickets for help on using
tickets.
Adds docblocks for functions missing them. Fixes missed parameters, descriptions, and some formatting.