WordPress.org

Make WordPress Core

Changes between Version 4 and Version 5 of Ticket #32103, comment 23


Ignore:
Timestamp:
10/03/2015 02:33:43 PM (5 years ago)
Author:
wpweaver
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #32103, comment 23

    v4 v5  
    4141I find this an interesting example case of a problem with OO. And I literally wrote the book on OO (well, a book). Just FYI, I've been in CS for 40 years, including teaching CS at the university level for almost 20 years, and am building my theme as a sort of retirement activity. So I do find this particular problem a bit of an academic exercise.
    4242
    43 The solution, I think, would be to make the _filter_preview a static function, and check if the 'option_' . $this->id_data['base'] filter has been created already before adding a new one. Then there is just one filter, and one filter to call.
     43The solution, I think, would be to make the _filter_preview a static function, and check if the 'option_' . $this->id_data\['base'\] filter has been created already before adding a new one. Then there is just one filter, and one filter to call.