Make sure plugin is a file before loading. Props filosofo. fixes #5822
git-svn-id: http://svn.automattic.com/wordpress/trunk@6897 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
4d82268ee7
commit
9a74743b4c
|
@ -53,7 +53,7 @@ if (isset($plugin_page)) {
|
||||||
wp_die(__('Invalid plugin page'));
|
wp_die(__('Invalid plugin page'));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! file_exists(ABSPATH . PLUGINDIR . "/$plugin_page"))
|
if (! ( file_exists(ABSPATH . PLUGINDIR . "/$plugin_page") && is_file( ABSPATH . PLUGINDIR . "/$plugin_page") ) )
|
||||||
wp_die(sprintf(__('Cannot load %s.'), htmlentities($plugin_page)));
|
wp_die(sprintf(__('Cannot load %s.'), htmlentities($plugin_page)));
|
||||||
|
|
||||||
do_action('load-' . $plugin_page);
|
do_action('load-' . $plugin_page);
|
||||||
|
|
Loading…
Reference in New Issue