[wp-trac] [WordPress Trac] #11007: plugin_basename() should allow to strip file extension
WordPress Trac
wp-trac at lists.automattic.com
Thu Sep 15 16:47:39 UTC 2011
#11007: plugin_basename() should allow to strip file extension
-------------------------+-----------------------------
Reporter: sirzooro | Owner: westi
Type: enhancement | Status: new
Priority: normal | Milestone: Future Release
Component: Plugins | Version: 2.8.4
Severity: normal | Resolution:
Keywords: has-patch |
-------------------------+-----------------------------
Changes (by sirzooro):
* keywords: has-patch reporter-feedback => has-patch
Comment:
I know about one case (wp-admin/admin.php:147):
`do_action('load-' . $page_hook);`
In order to use it for my plugin's setting page I had to use following
code:
{{{
add_action( 'load-settings_page_'.substr( plugin_basename( __FILE__ ), 0,
-4 ),
array( &$this, 'load_settings_page' ) );
}}}
--
Ticket URL: <http://core.trac.wordpress.org/ticket/11007#comment:3>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list