Opened 14 years ago
Closed 14 years ago
#16682 closed enhancement (wontfix)
Actually set visibility keywords on methods and properties
Reported by: | scribu | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | General | Keywords: | php5 has-patch |
Focuses: | Cc: |
Description
There are a lot classes in WP with the @access private
comment, but without the actual keyword in the code, due to the previous PHP 4 compatiblity requirement.
This should be fixed.
Attachments (2)
Change History (14)
#3
@
14 years ago
I think good initial candidates for this are the WP_List_Table classes and the WP_Widget class, since they're relatively new.
#4
@
14 years ago
So, the guideline is: new code yes. old code no.
That leaves WP_List_Table classes and WP_Admin_Bar.
Will have to check the Fluency Admin plugin as well as others to see what we can reasonably mark as private in WP_Admin_Bar.
#5
@
14 years ago
More for reference (or as a starting point) that patch adds private, protected, or public to every class variable and method that had one specified with @access php doc. I did skip libraries that we don't maintain (like simplepress, phpmailer, atomlib, etc).
#7
@
14 years ago
Yes, I did most of it earlier today just because I was curious whether things would catastrophically break. I finished it up after the meeting, and figured why not at least upload it. I suppose I could apply the patch to another trunk checkout and then revert the files we don't want patched and create another patch from that.
#8
@
14 years ago
The new patch should be good. WP_Admin_Bar doesn't actually have any @access specifications, so I suppose we could set them all to public if we want.
#11
@
14 years ago
- Milestone changed from 3.2 to Future Release
Didn't get tested before freeze. Next time.
#12
@
14 years ago
- Milestone Future Release deleted
- Resolution set to wontfix
- Status changed from reviewing to closed
WP_Admin_Bar doesn't have any @access specifications, the list table classes are private in their entirety to undergo a near-future re-architecture where this will surely be considered, and we decided not to touch existing classes for compatibility reasons. So closing as wontfix.
Westi says: small patches welcome