[wp-trac] [WordPress Trac] #15000: add_meta_box() should accept array of post types
WordPress Trac
wp-trac at lists.automattic.com
Thu Sep 30 19:37:26 UTC 2010
#15000: add_meta_box() should accept array of post types
----------------------------+-----------------------------------------------
Reporter: coffee2code | Owner:
Type: enhancement | Status: closed
Priority: normal | Milestone:
Component: Administration | Version: 3.0.1
Severity: minor | Resolution: duplicate
Keywords: has-patch |
----------------------------+-----------------------------------------------
Comment(by coffee2code):
A roundabout solution presented there, but so it goes. A straightforward
foreach would be more concise:
{{{
foreach ( array( 'post', 'page', 'event' ) as $page )
add_meta_box( 'my-geo', 'Geolocation Info', array( &$this, 'geo_form'
), $page, 'side' );
}}}
--
Ticket URL: <http://core.trac.wordpress.org/ticket/15000#comment:2>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list