mirror of
https://github.com/WordPress/WordPress.git
synced 2024-11-01 00:10:36 +01:00
Create Tools screen. fixes #8361
git-svn-id: http://svn.automattic.com/wordpress/trunk@9929 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
2349f73659
commit
7138d5af58
@ -60,8 +60,8 @@ if (isset($plugin_page)) {
|
||||
if( ! $page_hook = get_plugin_page_hook($plugin_page, $pagenow) ) {
|
||||
$page_hook = get_plugin_page_hook($plugin_page, $plugin_page);
|
||||
// backwards compatibility for plugins using add_management_page
|
||||
if ( empty( $page_hook ) && 'edit.php' == $pagenow && '' != get_plugin_page_hook($plugin_page, 'import.php') ) {
|
||||
wp_redirect('import.php?page=' . $plugin_page);
|
||||
if ( empty( $page_hook ) && 'edit.php' == $pagenow && '' != get_plugin_page_hook($plugin_page, 'tools.php') ) {
|
||||
wp_redirect('tool.php?page=' . $plugin_page);
|
||||
exit;
|
||||
}
|
||||
}
|
||||
@ -112,7 +112,7 @@ if (isset($plugin_page)) {
|
||||
include(ABSPATH . "wp-admin/import/$importer.php");
|
||||
}
|
||||
|
||||
$parent_file = 'import.php';
|
||||
$parent_file = 'tools.php';
|
||||
$submenu_file = 'import.php';
|
||||
$title = __('Import');
|
||||
|
||||
|
@ -1587,7 +1587,7 @@ form p.submit a.cancel:hover {
|
||||
background: transparent url(../images/icons32.png) no-repeat -600px -5px;
|
||||
}
|
||||
|
||||
#icon-import,
|
||||
#icon-tools,
|
||||
#icon-admin {
|
||||
background: transparent url(../images/icons32.png) no-repeat -432px -5px;
|
||||
}
|
||||
|
@ -10,6 +10,7 @@
|
||||
require_once ('admin.php');
|
||||
$title = __('Import');
|
||||
require_once ('admin-header.php');
|
||||
$parent_file = 'tools.php';
|
||||
?>
|
||||
|
||||
<div class="wrap">
|
||||
|
@ -625,7 +625,7 @@ function add_submenu_page( $parent, $page_title, $menu_title, $access_level, $fi
|
||||
* @return unknown
|
||||
*/
|
||||
function add_management_page( $page_title, $menu_title, $access_level, $file, $function = '' ) {
|
||||
return add_submenu_page( 'import.php', $page_title, $menu_title, $access_level, $file, $function );
|
||||
return add_submenu_page( 'tools.php', $page_title, $menu_title, $access_level, $file, $function );
|
||||
}
|
||||
|
||||
function add_options_page( $page_title, $menu_title, $access_level, $file, $function = '' ) {
|
||||
@ -1032,4 +1032,4 @@ function settings_fields($option_group) {
|
||||
wp_nonce_field("$option_group-options");
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
|
@ -83,12 +83,11 @@ if ( current_user_can('edit_users') ) {
|
||||
$submenu['profile.php'][5] = array(__('Your Profile'), 'read', 'profile.php');
|
||||
}
|
||||
|
||||
$menu[45] = array( __('Tools'), 'manage_options', 'import.php', '', 'menu-top', 'menu-tools', 'div' );
|
||||
$submenu['import.php'][5] = array( __('Import'), 'import', 'import.php' );
|
||||
$submenu['import.php'][10] = array( __('Export'), 'import', 'export.php' );
|
||||
if ( ! $is_opera )
|
||||
$submenu['import.php'][20] = array( __('Turbo'), 'read', 'turbo.php' );
|
||||
$submenu['import.php'][30] = array( __('Upgrade'), 'install_plugins', 'update-core.php');
|
||||
$menu[45] = array( __('Tools'), 'manage_options', 'tools.php', '', 'menu-top', 'menu-tools', 'div' );
|
||||
$submenu['tools.php'][5] = array( __('Tools'), 'read', 'tools.php' );
|
||||
$submenu['tools.php'][10] = array( __('Import'), 'import', 'import.php' );
|
||||
$submenu['tools.php'][15] = array( __('Export'), 'import', 'export.php' );
|
||||
$submenu['tools.php'][20] = array( __('Upgrade'), 'install_plugins', 'update-core.php');
|
||||
|
||||
$menu[50] = array( __('Settings'), 'manage_options', 'options-general.php', '', 'menu-top', 'menu-settings', 'div' );
|
||||
$submenu['options-general.php'][10] = array(__('General'), 'manage_options', 'options-general.php');
|
||||
|
@ -126,9 +126,6 @@ wp_dropdown_categories(array('hide_empty' => 0, 'name' => 'default_email_categor
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
<h3><?php _e('Press This') ?></h3>
|
||||
<p><?php _e('Drag-and-drop the following link to your bookmarks bar or right click it and add it to your favorites for a posting shortcut.') ?> <a href="<?php echo htmlspecialchars( get_shortcut_link() ); ?>" title="<?php echo attribute_escape(__('Press This')) ?>"><?php _e('Press This') ?></a></p>
|
||||
|
||||
<?php do_settings_sections('writing'); ?>
|
||||
|
||||
<p class="submit">
|
||||
|
@ -9,16 +9,19 @@
|
||||
/** WordPress Administration Bootstrap */
|
||||
require_once('admin.php');
|
||||
|
||||
$title = __('Turbo');
|
||||
$title = __('Tools');
|
||||
wp_enqueue_script( 'wp-gears' );
|
||||
|
||||
require_once('admin-header.php');
|
||||
|
||||
screen_icon();
|
||||
?>
|
||||
<h2><?php echo wp_specialchars( $title ); ?></h2>
|
||||
<?php
|
||||
if ( ! $is_opera ) {
|
||||
?>
|
||||
<div id="gears-info-box" class="wrap">
|
||||
<?php screen_icon(); ?>
|
||||
<h2><?php echo wp_specialchars( $title ); ?></h2>
|
||||
<h3><?php _e('Turbo'); ?></h3>
|
||||
|
||||
<img src="images/gear.png" title="Gear" alt="" class="gears-img" />
|
||||
<div id="gears-msg1">
|
||||
@ -78,6 +81,10 @@ if ( ! $is_opera ) {
|
||||
<?php } else {
|
||||
_e('Turbo is not available for your browser.');
|
||||
}
|
||||
?>
|
||||
<h3><?php _e('Press This') ?></h3>
|
||||
<p><?php _e('Drag-and-drop the following link to your bookmarks bar or right click it and add it to your favorites for a posting shortcut.') ?> <a href="<?php echo htmlspecialchars( get_shortcut_link() ); ?>" title="<?php echo attribute_escape(__('Press This')) ?>"><?php _e('Press This') ?></a></p>
|
||||
|
||||
<?php
|
||||
include('admin-footer.php');
|
||||
?>
|
Loading…
Reference in New Issue
Block a user