mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 20:30:23 +00:00
Menu and plugin tweakage.
git-svn-id: https://develop.svn.wordpress.org/trunk@4049 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
+9
-3
@@ -30,12 +30,15 @@ wp_enqueue_script( 'fat' );
|
||||
|
||||
$editing = false;
|
||||
|
||||
require(ABSPATH . '/wp-admin/menu.php');
|
||||
|
||||
// Handle plugin admin pages.
|
||||
if (isset($_GET['page'])) {
|
||||
$plugin_page = stripslashes($_GET['page']);
|
||||
$plugin_page = plugin_basename($plugin_page);
|
||||
}
|
||||
|
||||
require(ABSPATH . '/wp-admin/menu.php');
|
||||
|
||||
// Handle plugin admin pages.
|
||||
if (isset($plugin_page)) {
|
||||
$page_hook = get_plugin_page_hook($plugin_page, $pagenow);
|
||||
|
||||
if ( $page_hook ) {
|
||||
@@ -64,6 +67,9 @@ if (isset($_GET['page'])) {
|
||||
|
||||
$importer = $_GET['import'];
|
||||
|
||||
if ( ! current_user_can('import') )
|
||||
wp_die(__('You are not allowed to import.'));
|
||||
|
||||
if ( validate_file($importer) ) {
|
||||
wp_die(__('Invalid importer.'));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user