mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 09:37:42 +01:00
Widgets RTL CSS, and a few little widget bugfixes. Props Sewar. fixes #4185
git-svn-id: http://svn.automattic.com/wordpress/trunk@5324 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
44088f5463
commit
1f39b8dce7
@ -3,7 +3,6 @@ body {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#sbadmin #zones {
|
#sbadmin #zones {
|
||||||
width: <?php echo constant( 'WP_WIDGETS_WIDTH' ); ?>px;
|
|
||||||
-moz-user-select: none;
|
-moz-user-select: none;
|
||||||
-khtml-user-select: none;
|
-khtml-user-select: none;
|
||||||
user-select: none;
|
user-select: none;
|
||||||
@ -30,7 +29,6 @@ body {
|
|||||||
.dropzone ul {
|
.dropzone ul {
|
||||||
list-style-type: none;
|
list-style-type: none;
|
||||||
width: 240px;
|
width: 240px;
|
||||||
height: <?php echo constant( 'WP_WIDGETS_HEIGHT' ); ?>px;
|
|
||||||
float: left;
|
float: left;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
|
@ -14,10 +14,15 @@ function wp_widgets_admin_head() {
|
|||||||
define( 'WP_WIDGETS_WIDTH', 1 + 262 * ( count( $wp_registered_sidebars ) ) );
|
define( 'WP_WIDGETS_WIDTH', 1 + 262 * ( count( $wp_registered_sidebars ) ) );
|
||||||
define( 'WP_WIDGETS_HEIGHT', 35 * ( count( $wp_registered_widgets ) ) );
|
define( 'WP_WIDGETS_HEIGHT', 35 * ( count( $wp_registered_widgets ) ) );
|
||||||
?>
|
?>
|
||||||
|
<link rel="stylesheet" href="widgets.css?version=<?php bloginfo('version'); ?>" type="text/css" />
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
<?php include dirname( __FILE__ ) . '/widgets.css'; ?>
|
.dropzone ul { height: <?php echo constant( 'WP_WIDGETS_HEIGHT' ); ?>px; }
|
||||||
|
#sbadmin #zones { width: <?php echo constant( 'WP_WIDGETS_WIDTH' ); ?>px; }
|
||||||
</style>
|
</style>
|
||||||
|
<?php if ( ('rtl' == get_bloginfo('text_direction')) ) : ?>
|
||||||
|
<link rel="stylesheet" href="widgets-rtl.css?version=<?php bloginfo('version'); ?>" type="text/css" />
|
||||||
<?php
|
<?php
|
||||||
|
endif;
|
||||||
}
|
}
|
||||||
|
|
||||||
add_action( 'admin_head', 'wp_widgets_admin_head' );
|
add_action( 'admin_head', 'wp_widgets_admin_head' );
|
||||||
@ -219,7 +224,7 @@ if ( isset( $_POST['action'] ) ) {
|
|||||||
<div id="controls">
|
<div id="controls">
|
||||||
<?php foreach ( $wp_registered_widget_controls as $name => $widget ) { ?>
|
<?php foreach ( $wp_registered_widget_controls as $name => $widget ) { ?>
|
||||||
<div class="hidden" id="<?php echo $widget['id']; ?>control">
|
<div class="hidden" id="<?php echo $widget['id']; ?>control">
|
||||||
<span class="controlhandle"><?php echo $name; ?></span>
|
<span class="controlhandle"><?php echo $widget['name']; ?></span>
|
||||||
<span id="<?php echo $widget['id']; ?>closer" class="controlcloser">×</span>
|
<span id="<?php echo $widget['id']; ?>closer" class="controlcloser">×</span>
|
||||||
<div class="controlform">
|
<div class="controlform">
|
||||||
<?php call_user_func_array( $widget['callback'], $widget['params'] ); ?>
|
<?php call_user_func_array( $widget['callback'], $widget['params'] ); ?>
|
||||||
|
Loading…
Reference in New Issue
Block a user