Fix postbox title action links overlapping
git-svn-id: http://svn.automattic.com/wordpress/trunk@10061 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
420eef18f2
commit
00aa613c43
|
@ -79,8 +79,12 @@ div.postbox div.inside {
|
||||||
|
|
||||||
#dashboard-widgets h3 a {
|
#dashboard-widgets h3 a {
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
|
||||||
|
#dashboard-widgets h3 .postbox-title-action {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: 30px;
|
right: 30px;
|
||||||
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#dashboard-widgets h4 {
|
#dashboard-widgets h4 {
|
||||||
|
|
|
@ -115,12 +115,12 @@ function wp_add_dashboard_widget( $widget_id, $widget_name, $callback, $control_
|
||||||
$wp_dashboard_control_callbacks[$widget_id] = $control_callback;
|
$wp_dashboard_control_callbacks[$widget_id] = $control_callback;
|
||||||
if ( isset( $_GET['edit'] ) && $widget_id == $_GET['edit'] ) {
|
if ( isset( $_GET['edit'] ) && $widget_id == $_GET['edit'] ) {
|
||||||
list($url) = explode( '#', add_query_arg( 'edit', false ), 2 );
|
list($url) = explode( '#', add_query_arg( 'edit', false ), 2 );
|
||||||
$widget_name .= ' <a href="' . clean_url( $url ) . '">' . __( 'Cancel' ) . '</a>';
|
$widget_name .= ' <span class="postbox-title-action"><a href="' . clean_url( $url ) . '">' . __( 'Cancel' ) . '</a></span>';
|
||||||
add_meta_box( $widget_id, $widget_name, '_wp_dashboard_control_callback', 'dashboard', 'normal', 'core' );
|
add_meta_box( $widget_id, $widget_name, '_wp_dashboard_control_callback', 'dashboard', 'normal', 'core' );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
list($url) = explode( '#', add_query_arg( 'edit', $widget_id ), 2 );
|
list($url) = explode( '#', add_query_arg( 'edit', $widget_id ), 2 );
|
||||||
$widget_name .= ' <a href="' . clean_url( "$url#$widget_id" ) . '" class="edit-box open-box">' . __( 'Configure' ) . '</a>';
|
$widget_name .= ' <span class="postbox-title-action"><a href="' . clean_url( "$url#$widget_id" ) . '" class="edit-box open-box">' . __( 'Configure' ) . '</a></span>';
|
||||||
}
|
}
|
||||||
$side_widgets = array('dashboard_quick_press', 'dashboard_recent_drafts', 'dashboard_primary', 'dashboard_secondary');
|
$side_widgets = array('dashboard_quick_press', 'dashboard_recent_drafts', 'dashboard_primary', 'dashboard_secondary');
|
||||||
$location = 'normal';
|
$location = 'normal';
|
||||||
|
|
Loading…
Reference in New Issue