[wp-trac] [WordPress Trac] #15536: Introduce register_plugin
WordPress Trac
wp-trac at lists.automattic.com
Mon Nov 22 09:20:31 UTC 2010
#15536: Introduce register_plugin
-------------------------+--------------------------------------------------
Reporter: filosofo | Owner: filosofo
Type: enhancement | Status: new
Priority: normal | Milestone: Future Release
Component: Plugins | Version:
Severity: normal | Keywords: has-patch, close
-------------------------+--------------------------------------------------
Changes (by westi):
* keywords: has-patch => has-patch, close
Comment:
Why?
Plugins can just do the same thing without us adding extra code:
{{{
class MyPlugin {
function action_plugins_loaded() {
add_action('admin_menu', array('MyPlugin',
'action_admin_menu'));
load_plugin_textdomain('my-plugin', false,
dirname(plugin_basename(__FILE__)) . '/lang');
}
}
add_action('plugins_loaded', array('MyPlugin','action_plugins_loaded'));
}}}
We have a perfectly good api for this already!
--
Ticket URL: <http://core.trac.wordpress.org/ticket/15536#comment:1>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list