[wp-trac] [WordPress Trac] #30891: Unchecked property overloading is detrimental to OOP.

WordPress Trac noreply at wordpress.org
Sat Jan 10 21:58:21 UTC 2015


#30891: Unchecked property overloading is detrimental to OOP.
--------------------------+------------------
 Reporter:  aercolino     |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  4.2
Component:  General       |     Version:  4.0
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:
--------------------------+------------------

Comment (by wonderboymusic):

 In [changeset:"31133"]:
 {{{
 #!CommitTicketReference repository="" revision="31133"
 In `Custom_Background`:

 * In [28481], `$admin_header_callback` and `$admin_image_div_callback`
 were set to `private` based on their erroneous `@param` value
 * `$admin_header_callback` and `$admin_image_div_callback` are used as
 hook callbacks - as such, they must be `public`
 * In [28521] and [28524], magic methods were added for back-compat
 * Currently, there are 2 properties marked `private`, `$page` and
 `$updated` - `$page` is never used and `$updated` was added by me in
 [30186] during 4.1

 Set `$admin_header_callback` and `$admin_image_div_callback` to `public`.
 Remove the `$page` property - it duplicated the `$page` local var and is
 referenced/used nowhere.
 Remove the magic methods - they were beyond overkill and rendered moot by
 the above changes.

 See #30891.
 }}}

--
Ticket URL: <https://core.trac.wordpress.org/ticket/30891#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list