Add page options to edit/write page, remove the IE6 scrollbar hack (seems not to be needed any more), add the min-width to all admin pages, add the Page Options link to the end of the breadcrumbs
git-svn-id: https://develop.svn.wordpress.org/trunk@9063 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
119c6c8db6
commit
b6504f6aef
|
@ -10,25 +10,6 @@
|
||||||
if (!isset($_GET["page"])) require_once('admin.php');
|
if (!isset($_GET["page"])) require_once('admin.php');
|
||||||
wp_enqueue_script( 'wp-gears' );
|
wp_enqueue_script( 'wp-gears' );
|
||||||
|
|
||||||
$min_width_pages = array( 'post.php', 'post-new.php', 'page.php', 'page-new.php', 'widgets.php', 'comment.php', 'link.php' );
|
|
||||||
$the_current_page = preg_replace('|^.*/wp-admin/|i', '', $_SERVER['PHP_SELF']);
|
|
||||||
$ie6_no_scrollbar = true;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Append 'minwidth' to value.
|
|
||||||
*
|
|
||||||
* @param mixed $c
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
function add_minwidth($c) {
|
|
||||||
return $c . 'minwidth ';
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( in_array( $the_current_page, $min_width_pages ) ) {
|
|
||||||
$ie6_no_scrollbar = false;
|
|
||||||
add_filter( 'admin_body_class', 'add_minwidth' );
|
|
||||||
}
|
|
||||||
|
|
||||||
get_admin_page_title();
|
get_admin_page_title();
|
||||||
$title = wp_specialchars( strip_tags( $title ) );
|
$title = wp_specialchars( strip_tags( $title ) );
|
||||||
?>
|
?>
|
||||||
|
@ -50,9 +31,7 @@ wp_admin_css( 'css/ie' );
|
||||||
addLoadEvent = function(func) {if (typeof jQuery != "undefined") jQuery(document).ready(func); else if (typeof wpOnload!='function'){wpOnload=func;} else {var oldonload=wpOnload; wpOnload=function(){oldonload();func();}}};
|
addLoadEvent = function(func) {if (typeof jQuery != "undefined") jQuery(document).ready(func); else if (typeof wpOnload!='function'){wpOnload=func;} else {var oldonload=wpOnload; wpOnload=function(){oldonload();func();}}};
|
||||||
//]]>
|
//]]>
|
||||||
</script>
|
</script>
|
||||||
<?php if ( ($parent_file != 'link-manager.php') && ($parent_file != 'options-general.php') && $ie6_no_scrollbar ) : ?>
|
<?php
|
||||||
<style type="text/css">* html { overflow-x: hidden; }</style>
|
|
||||||
<?php endif;
|
|
||||||
|
|
||||||
$hook_suffixes = array();
|
$hook_suffixes = array();
|
||||||
|
|
||||||
|
@ -86,8 +65,18 @@ if ( 'index.php' == $pagenow ) {
|
||||||
} else {
|
} else {
|
||||||
$breadcrumb = '<a href="index.php">' . __('Dashboard') . '</a> › ' . $title;
|
$breadcrumb = '<a href="index.php">' . __('Dashboard') . '</a> › ' . $title;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$settings_pages = array( 'categories.php', 'edit.php', 'edit-comments.php', 'edit-form-advanced.php', 'edit-link-categories.php', 'edit-link-form.php', 'edit-page-form.php', 'edit-tags.php', 'link-manager.php', 'upload.php', 'users.php', 'edit-pages.php', 'post-new.php', 'post.php', 'page-new.php', 'page.php' );
|
||||||
?>
|
?>
|
||||||
<img id="logo50" src="images/logo50.png" alt="" /> <h1><?php if ( '' == get_bloginfo('name', 'display') ) echo ' '; else echo get_bloginfo('name', 'display'); ?> <a href="<?php echo trailingslashit( get_bloginfo('url') ); ?>" title="View site" id="view-site-link"><img src="<?php echo trailingslashit( bloginfo('wpurl') ) . 'wp-admin/images/new-window-icon.gif'; ?>" alt="View site" /></a><span id="breadcrumb"><?php echo $breadcrumb ?></span></h1>
|
|
||||||
|
<img id="logo50" src="images/logo50.png" alt="" /> <h1><?php if ( '' == get_bloginfo('name', 'display') ) echo ' '; else echo get_bloginfo('name', 'display'); ?> <a href="<?php echo trailingslashit( get_bloginfo('url') ); ?>" title="View site" id="view-site-link"><img src="<?php echo trailingslashit( bloginfo('wpurl') ) . 'wp-admin/images/new-window-icon.gif'; ?>" alt="" /></a>
|
||||||
|
<span id="breadcrumb"><?php echo $breadcrumb ?></span>
|
||||||
|
<?php if ( in_array( $pagenow, $settings_pages ) ) { ?>
|
||||||
|
<span id="edit-settings">
|
||||||
|
<a href="#edit_settings" id="show-settings-link" class="hide-if-no-js show-settings"><?php _e('Page Options') ?></a>
|
||||||
|
<a href="#edit_settings" id="hide-settings-link" class="show-settings" style="display:none;"><?php _e('Hide Options') ?></a>
|
||||||
|
</span>
|
||||||
|
<?php } ?></h1>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="user_info"><p><?php printf(__('Howdy, <a href="%1$s">%2$s</a>!'), 'profile.php', $user_identity) ?> <a href="<?php echo wp_logout_url() ?>" title="<?php _e('Log Out') ?>"><?php _e('Log Out'); ?></a></p></div>
|
<div id="user_info"><p><?php printf(__('Howdy, <a href="%1$s">%2$s</a>!'), 'profile.php', $user_identity) ?> <a href="<?php echo wp_logout_url() ?>" title="<?php _e('Log Out') ?>"><?php _e('Log Out'); ?></a></p></div>
|
||||||
|
@ -104,12 +93,3 @@ if ( $parent_file == 'options-general.php' ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
favorite_actions();
|
favorite_actions();
|
||||||
|
|
||||||
$settings_pages = array( 'categories.php', 'edit.php', 'edit-comments.php', 'edit-form-advanced.php', 'edit-link-categories.php', 'edit-link-form.php', 'edit-page-form.php', 'edit-tags.php', 'link-manager.php', 'upload.php', 'users.php', 'edit-pages.php', 'post-new.php' );
|
|
||||||
|
|
||||||
if ( in_array( $pagenow, $settings_pages ) ) { ?>
|
|
||||||
<div id="edit-settings">
|
|
||||||
<a href="#edit_settings" id="show-settings-link" class="hide-if-no-js show-settings"><?php _e('Page Options') ?></a>
|
|
||||||
<a href="#edit_settings" id="hide-settings-link" class="show-settings" style="display:none;"><?php _e('Hide Options') ?></a>
|
|
||||||
</div>
|
|
||||||
<?php } ?>
|
|
||||||
|
|
|
@ -239,7 +239,8 @@ div.dashboard-widget-submit input,
|
||||||
#rightnow a:hover, a:hover, .subsubsub a:hover, .subsubsub a.current:hover,
|
#rightnow a:hover, a:hover, .subsubsub a:hover, .subsubsub a.current:hover,
|
||||||
#login form .submit input:hover, div.dashboard-widget-submit input:hover,
|
#login form .submit input:hover, div.dashboard-widget-submit input:hover,
|
||||||
#edit-slug-buttons a.save:hover, #media-upload a.delete:hover,
|
#edit-slug-buttons a.save:hover, #media-upload a.delete:hover,
|
||||||
#media-upload a.del-link:hover, .ui-tabs-nav a:hover, #user_info a:hover {
|
#media-upload a.del-link:hover, .ui-tabs-nav a:hover, #user_info a:hover,
|
||||||
|
#edit-settings a.show-settings:hover {
|
||||||
color: #d54e21;
|
color: #d54e21;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -350,7 +351,7 @@ h3.dashboard-widget-title small a:hover {
|
||||||
color: #5a5a5a;
|
color: #5a5a5a;
|
||||||
}
|
}
|
||||||
|
|
||||||
#poststuff #edButtonPreview, #poststuff #edButtonHTML, #the-comment-list p.comment-author strong a, #media-upload a.del-link, #media-upload a.delete, .ui-sortable .postbox h3:hover span, a {
|
#poststuff #edButtonPreview, #poststuff #edButtonHTML, #the-comment-list p.comment-author strong a, #media-upload a.del-link, #media-upload a.delete, .ui-sortable .postbox h3:hover span, a, #edit-settings a.show-settings {
|
||||||
color: #2e7ca0;
|
color: #2e7ca0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -239,7 +239,8 @@ div.dashboard-widget-submit input,
|
||||||
#rightnow a:hover, a:hover, .subsubsub a:hover, .subsubsub a.current:hover,
|
#rightnow a:hover, a:hover, .subsubsub a:hover, .subsubsub a.current:hover,
|
||||||
#login form .submit input:hover, div.dashboard-widget-submit input:hover,
|
#login form .submit input:hover, div.dashboard-widget-submit input:hover,
|
||||||
#edit-slug-buttons a.save:hover, #media-upload a.delete:hover,
|
#edit-slug-buttons a.save:hover, #media-upload a.delete:hover,
|
||||||
#media-upload a.del-link:hover, .ui-tabs-nav a:hover, #user_info a:hover {
|
#media-upload a.del-link:hover, .ui-tabs-nav a:hover, #user_info a:hover,
|
||||||
|
#edit-settings a.show-settings:hover {
|
||||||
color: #d54e21;
|
color: #d54e21;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -348,7 +349,7 @@ h3.dashboard-widget-title small a:hover {
|
||||||
color: #333;
|
color: #333;
|
||||||
}
|
}
|
||||||
|
|
||||||
#adminmenu a, #adminmenu ul.wp-submenu a, #poststuff #edButtonPreview, #poststuff #edButtonHTML, #the-comment-list p.comment-author strong a, #media-upload a.del-link, #media-upload a.delete, .ui-tabs-nav a, .ui-sortable .postbox h3:hover span, a {
|
#adminmenu a, #adminmenu ul.wp-submenu a, #poststuff #edButtonPreview, #poststuff #edButtonHTML, #the-comment-list p.comment-author strong a, #media-upload a.del-link, #media-upload a.delete, .ui-tabs-nav a, .ui-sortable .postbox h3:hover span, a, #edit-settings a.show-settings {
|
||||||
color: #2583ad;
|
color: #2583ad;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -634,7 +634,6 @@ a#view-site-link {
|
||||||
}
|
}
|
||||||
|
|
||||||
#wphead #breadcrumb {
|
#wphead #breadcrumb {
|
||||||
position: absolute;
|
|
||||||
margin-top: 12px;
|
margin-top: 12px;
|
||||||
margin-left: 10px;
|
margin-left: 10px;
|
||||||
font: 16px "Lucida Grande", "Lucida Sans Unicode", Tahoma, Verdana, sans-serif;
|
font: 16px "Lucida Grande", "Lucida Sans Unicode", Tahoma, Verdana, sans-serif;
|
||||||
|
@ -1623,7 +1622,7 @@ td.post-title p {
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
|
|
||||||
body.minwidth {
|
body.wp-admin {
|
||||||
min-width: 785px;
|
min-width: 785px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2060,13 +2059,10 @@ a.togbox {
|
||||||
|
|
||||||
/* show/hide settings */
|
/* show/hide settings */
|
||||||
#edit-settings {
|
#edit-settings {
|
||||||
position: absolute;
|
margin-left: 20px;
|
||||||
right: 200px;
|
|
||||||
top: 46px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.show-settings {
|
#edit-settings a.show-settings {
|
||||||
display: block;
|
|
||||||
height: 18px;
|
height: 18px;
|
||||||
font-size: 11px;
|
font-size: 11px;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
|
@ -2074,6 +2070,10 @@ a.togbox {
|
||||||
padding: 3px 8px;
|
padding: 3px 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#edit-settings a.show-settings:hover {
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
#edit-settings-wrap h5 {
|
#edit-settings-wrap h5 {
|
||||||
padding: 10px 0 0 15px;
|
padding: 10px 0 0 15px;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
@ -2103,7 +2103,8 @@ a.togbox {
|
||||||
float: left;
|
float: left;
|
||||||
padding: 5px 3px;
|
padding: 5px 3px;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
width: 12em;
|
overflow: hidden;
|
||||||
|
width: 13em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.metabox-prefs label input {
|
.metabox-prefs label input {
|
||||||
|
|
Loading…
Reference in New Issue