[wp-hackers] New add_meta_box function
ozh at planetozh.com
Tue Feb 19 19:49:23 GMT 2008
On Feb 19, 2008 7:02 PM, Jennifer Hodgdon <yahgrp at poplarware.com> wrote:
> The problem is that add_meta_box is not defined yet when the plugin is
> loaded. Normally all the hooks in a plugin are added at that time,
> using add_filter and add_action in the main body of the plugin (i.e.
> not within a plugin function), but this doesn't work, because the file
> containing this function hasn't been loaded yet when the plugin is
> first loaded.
I played a bit with add_meta_box() to understand how it works and had
the same problem. So instead of hooking things in 'init' or
'plugins_loaded' I hooked them with 'admin_menu' -- at this time, the
http://FrenchFragFactory.net ~ Daily Quake News
http://planetOzh.com ~ Blog and WordPress Stuff
More information about the wp-hackers