[wp-trac] [WordPress Trac] #18179: WP_Meta_Box

WordPress Trac wp-trac at lists.automattic.com
Wed Jul 20 14:00:19 UTC 2011


#18179: WP_Meta_Box
----------------------------+------------------
 Reporter:  koopersmith     |       Owner:
     Type:  task (blessed)  |      Status:  new
 Priority:  normal          |   Milestone:  3.3
Component:  Administration  |     Version:
 Severity:  normal          |  Resolution:
 Keywords:  has-patch       |
----------------------------+------------------

Comment (by hakre):

 I've added some example code which does show this. Aditionally I've moved
 the singleton logic from the meta box base class into the registry itself
 in case this makes sense.

 If you want to make extending classes of the base class to call the
 parents constructor class you can make use of the following methodology:

  * Make the base constructor final
  * Make the base constructor call an init() method of the same instance.
  * Make that init() method within the base class an abstract method.

 Extending classes then can initialize themselves inside the init() method
 instead of the constructor and must not take care any longer for
 initialization of the parent class.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/18179#comment:5>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list