#28806 closed defect (bug) (fixed)
More complete and consistent @deprecated inline docs/tags
Reported by: | Alphawolf | Owned by: | DrewAPicture |
---|---|---|---|
Milestone: | 4.4 | Priority: | low |
Severity: | normal | Version: | |
Component: | General | Keywords: | has-patch |
Focuses: | docs | Cc: |
Description (last modified by )
Hey folks, I noticed some @deprecated
inline docs were inconsistent and/or incorrect for various functions so I went and did the following things:
- Changed the
@deprecated
inline tag(s) to follow the new inline docs standard written last year - Added version information if missing but known
- Added fourth parameter (what to use instead) to
_deprecated_function()
if missing but known - More consistent wording throughout the @deprecated inline docs
Patch attached.
ps. First patch (AFAIR). :)
Attachments (5)
Change History (30)
#1
@
10 years ago
- Keywords has-patch added
- Severity changed from normal to minor
- Type changed from defect (bug) to enhancement
#2
follow-up:
↓ 3
@
10 years ago
A few issues in 28806.3.diff:
- A second closing parenthesis is missing on line 957 of
/wp-admin/includes/deprecated.php
. deactivate_sitewide_plugin()
should be replaced withdeactivate_plugin()
, right now it is deprecated in favor of itself.- Some coding standards fixes in
/wp-includes/deprecated.php
. E.g.:* @deprecated 2.8.0 Use the_author_meta('description')
should bethe_author_meta( 'description' )
#3
in reply to:
↑ 2
;
follow-up:
↓ 4
@
10 years ago
Replying to jdgrimes:
- Some coding standards fixes in
/wp-includes/deprecated.php
. E.g.:* @deprecated 2.8.0 Use the_author_meta('description')
should bethe_author_meta( 'description' )
Some occurrences of _deprecated_function
did not meet the coding standards it seems (while some did throughout the code), e.g.
_deprecated_function( __FUNCTION__, '2.8', 'get_the_author_meta(\'description\')' );
which (among others) I changed to
_deprecated_function( __FUNCTION__, '2.8', 'get_the_author_meta( \'description\' )' );
Or did you only refer to the doc blocks? :)
#4
in reply to:
↑ 3
;
follow-up:
↓ 6
@
10 years ago
Replying to Alphawolf:
Or did you only refer to the doc blocks? :)
Yes, that's what I was meaning. :)
#7
in reply to:
↑ 6
;
follow-up:
↓ 8
@
10 years ago
Replying to Alphawolf:
Okay, so ignore the different notations of
_deprecated_function
's fourth parameter with some having whitespaces while others don't? :)
Yeah, I wouldn't change them. Except, maybe if there are any where you are editing the other parameters as well, you might change those. Usually we try to avoid changing things just for coding standards unless we're making other changes around it. So if you're editing that line anyway, you can clean up the spacing, but otherwise they will generally want to leave it be.
#8
in reply to:
↑ 7
@
10 years ago
Replying to jdgrimes:
Yeah, I wouldn't change them. Except, maybe if there are any where you are editing the other parameters as well, you might change those. Usually we try to avoid changing things just for coding standards unless we're making other changes around it. So if you're editing that line anyway, you can clean up the spacing, but otherwise they will generally want to leave it be.
Alright, will leave them be unless I changed the lines anways. New patch incoming soon. :)
Re-uploaded the patch with a few typos fixed.