summaryrefslogtreecommitdiffstats
path: root/wp-admin
diff options
context:
space:
mode:
Diffstat (limited to 'wp-admin')
-rw-r--r--wp-admin/async-upload.php4
-rw-r--r--wp-admin/comment.php4
-rw-r--r--wp-admin/css/media.css20
-rw-r--r--wp-admin/css/widgets-rtl.css9
-rw-r--r--wp-admin/css/widgets.css28
-rw-r--r--wp-admin/edit-comments.php2
-rw-r--r--wp-admin/includes/dashboard.php4
-rw-r--r--wp-admin/includes/media.php13
-rw-r--r--wp-admin/includes/upgrade.php9
-rw-r--r--wp-admin/includes/widgets.php3
-rw-r--r--wp-admin/js/link.js3
-rw-r--r--wp-admin/js/media-upload.js35
-rw-r--r--wp-admin/js/widgets.js8
-rw-r--r--wp-admin/media.php2
-rw-r--r--wp-admin/menu.php2
-rw-r--r--wp-admin/plugins.php4
-rw-r--r--wp-admin/update.php2
-rw-r--r--wp-admin/user-edit.php2
-rw-r--r--wp-admin/widgets.php2
19 files changed, 107 insertions, 49 deletions
diff --git a/wp-admin/async-upload.php b/wp-admin/async-upload.php
index 1a37dce..c1c0f0d 100644
--- a/wp-admin/async-upload.php
+++ b/wp-admin/async-upload.php
@@ -15,7 +15,7 @@ if ( empty($_COOKIE[AUTH_COOKIE]) && !empty($_REQUEST['auth_cookie']) )
unset($current_user);
require_once('admin.php');
-header('Content-Type: text/plain');
+header('Content-Type: text/plain; charset=' . get_option('blog_charset'));
if ( !current_user_can('upload_files') )
wp_die(__('You do not have permission to upload files.'));
@@ -26,6 +26,8 @@ if ( ($id = intval($_REQUEST['attachment_id'])) && $_REQUEST['fetch'] ) {
exit;
}
+check_admin_referer('media-form');
+
$id = media_handle_upload('async-upload', $_REQUEST['post_id']);
if (is_wp_error($id)) {
echo '<div id="media-upload-error">'.wp_specialchars($id->get_error_message()).'</div>';
diff --git a/wp-admin/comment.php b/wp-admin/comment.php
index 6691456..4aa9749 100644
--- a/wp-admin/comment.php
+++ b/wp-admin/comment.php
@@ -193,10 +193,6 @@ case 'approvecomment' :
wp_set_comment_status( $comment->comment_ID, 'approve' );
- if ( true == get_option('comments_notify') )
- wp_notify_postauthor( $comment->comment_ID );
-
-
if ( '' != wp_get_referer() && false == $noredir )
wp_redirect( wp_get_referer() );
else
diff --git a/wp-admin/css/media.css b/wp-admin/css/media.css
index c77a069..7d46c1c 100644
--- a/wp-admin/css/media.css
+++ b/wp-admin/css/media.css
@@ -196,6 +196,11 @@ abbr.required {
#media-upload .media-upload-form p {
margin: 0 1em 1em 0;
}
+
+#media-upload .media-upload-form p.ml-submit {
+ padding: 1em 0;
+}
+
#media-upload p.help {
font-style: italic;
font-weight: normal;
@@ -240,3 +245,18 @@ abbr.required {
margin-bottom: 1em;
height: 3em;
}
+
+#media-upload #filter {
+ width: 623px;
+}
+
+#media-upload #filter .subsubsub {
+ margin: 8px 0;
+}
+
+#filter .tablenav select {
+ border-style:solid;
+ border-width:1px;
+ padding:2px;
+ vertical-align:top;
+}
diff --git a/wp-admin/css/widgets-rtl.css b/wp-admin/css/widgets-rtl.css
index 89ff4b6..ece02b5 100644
--- a/wp-admin/css/widgets-rtl.css
+++ b/wp-admin/css/widgets-rtl.css
@@ -38,13 +38,12 @@ li.widget-list-control-item h4.widget-title a, #dragHelper li.widget-list-contro
left:1em;
}
-li.widget-list-control-item div.widget-control {
- padding:0 0 0 10px;
-}
ul.widget-control-list div.widget-control-actions {
margin-right:0;
margin-left:-10px;
}
-ul.widget-control-list .widget-title {
- text-align:right;
+ul.widget-control-list h4.widget-title,
+#dragHelper h4.widget-title {
+ text-align: right;
+ padding: 0.4em 0.8em 0.4em 2.5em;
}
diff --git a/wp-admin/css/widgets.css b/wp-admin/css/widgets.css
index 5d044cf..baeb851 100644
--- a/wp-admin/css/widgets.css
+++ b/wp-admin/css/widgets.css
@@ -74,7 +74,6 @@ ul#widget-list li.widget-list-item div.widget-description {
font-size: 11px;
}
-
ul#widget-list li.widget-list-item ul.widget-control-info {
display: none;
}
@@ -91,27 +90,26 @@ ul.widget-control-list {
padding: 0 1em;
}
-ul.widget-control-list li {
- position: relative;
-}
-
div#current-widgets p.submit {
padding: 1em;
}
li.widget-list-control-item {
- margin: 0 0 1em;
+ margin: 1em 0;
-moz-border-radius: 3px;
-khtml-border-radius: 3px;
-webkit-border-radius: 3px;
border-radius: 3px;
}
-li.widget-list-control-item h4, #dragHelper li.widget-list-control-item h4, li.widget-sortable h4 {
+li.widget-list-control-item h4,
+#dragHelper li.widget-list-control-item h4,
+li.widget-sortable h4 {
margin: 0;
- padding: 0.4em 2.5em 0.4em 0.8em;
cursor: move;
font-size: 13px;
+ padding: 0.4em 2.5em 0.4em 0.8em;
+ position: relative;
-moz-border-radius: 3px;
-khtml-border-radius: 3px;
-webkit-border-radius: 3px;
@@ -143,16 +141,16 @@ li.widget-list-control-item h4.widget-title a,
}
li.widget-list-control-item h4.widget-title a:hover {
-
text-decoration: none;
border-bottom: none;
}
li.widget-list-control-item div.widget-control {
display: none;
- margin: 1em;
- padding: 0 10px 0 7px; /* Correction for padding, margin, border of inputs */
+ padding: 15px;
font-size: 11px;
+ position: relative;
+ background-color: #CFEBF7;
}
li.widget-list-control-item div.widget-control p {
@@ -161,15 +159,9 @@ li.widget-list-control-item div.widget-control p {
}
ul.widget-control-list div.widget-control-actions {
- margin-right: -10px; /* Correction for padding, margin, border of inputs */
- margin-left: -6px;
border-top-width: 1px;
border-top-style: solid;
- padding: 0.5em 0 0.8em;
-}
-
-ul.widget-control-list .widget-title {
-
+ padding: 0.5em 0 0;
}
.widget-control-edit {
diff --git a/wp-admin/edit-comments.php b/wp-admin/edit-comments.php
index bc62681..c756efe 100644
--- a/wp-admin/edit-comments.php
+++ b/wp-admin/edit-comments.php
@@ -97,7 +97,7 @@ if ( isset( $_GET['approved'] ) || isset( $_GET['deleted'] ) || isset( $_GET['sp
<?php
$status_links = array();
$num_comments = wp_count_comments();
-$stati = array('moderated' => sprintf(__ngettext('Awaiting Moderation (%s)', 'Awaiting Moderation (%s)', $num_comments->moderated), "<span class='comment-count'>$num_comments->moderated</span>"), 'approved' => _c('Approved|plural'));
+$stati = array('moderated' => sprintf(__ngettext('Awaiting Moderation (%s)', 'Awaiting Moderation (%s)', number_format_i18n($num_comments->moderated) ), "<span class='comment-count'>" . number_format_i18n($num_comments->moderated) . "</span>"), 'approved' => _c('Approved|plural'));
$class = ( '' === $comment_status ) ? ' class="current"' : '';
$status_links[] = "<li><a href=\"edit-comments.php\"$class>".__('Show All Comments')."</a>";
foreach ( $stati as $status => $label ) {
diff --git a/wp-admin/includes/dashboard.php b/wp-admin/includes/dashboard.php
index ea88ee4..97fd26a 100644
--- a/wp-admin/includes/dashboard.php
+++ b/wp-admin/includes/dashboard.php
@@ -23,7 +23,9 @@ function wp_dashboard_setup() {
/* Register Widgets and Controls */
// Recent Comments Widget
- if ( current_user_can( 'moderate_comments' ) && $mod_comments = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->comments WHERE comment_approved = '0'") ) {
+ $mod_comments = wp_count_comments();
+ $mod_comments = $mod_comments->moderated;
+ if ( current_user_can( 'moderate_comments' ) && $mod_comments ) {
$notice = sprintf( __ngettext( '%d comment awaiting moderation', '%d comments awaiting moderation', $mod_comments ), $mod_comments );
$notice = "<a href='edit-comments.php?comment_status=moderated'>$notice</a>";
} else {
diff --git a/wp-admin/includes/media.php b/wp-admin/includes/media.php
index be70d92..0fb84bb 100644
--- a/wp-admin/includes/media.php
+++ b/wp-admin/includes/media.php
@@ -55,7 +55,7 @@ function get_image_send_to_editor($id, $alt, $title, $align, $url='', $rel = fal
$rel = $rel ? ' rel="attachment wp-att-'.attribute_escape($id).'"' : '';
if ( $url )
- $html = "<a href='".attribute_escape($url)."'$rel>$html</a>";
+ $html = '<a href="' . clean_url($url) . "\"$rel>$html</a>";
$html = apply_filters( 'image_send_to_editor', $html, $id, $alt, $title, $align, $url, $size );
@@ -180,7 +180,7 @@ add_action( 'media_buttons', 'media_buttons' );
function media_buttons_head() {
$siteurl = get_option('siteurl');
echo "<style type='text/css' media='all'>
- @import '{$siteurl}/wp-includes/js/thickbox/thickbox.css?1';
+ @import '{$siteurl}/wp-includes/js/thickbox/thickbox.css?ver=20080430';
div#TB_title {
background-color: #222222;
color: #cfcfcf;
@@ -188,6 +188,9 @@ echo "<style type='text/css' media='all'>
div#TB_title a, div#TB_title a:visited {
color: #cfcfcf;
}
+ #TB_window {
+ top: 20px;
+ }
</style>\n";
}
@@ -791,6 +794,7 @@ jQuery(function($){
post_params : {
"post_id" : "<?php echo $post_id; ?>",
"auth_cookie" : "<?php echo $_COOKIE[AUTH_COOKIE]; ?>",
+ "_wpnonce" : "<?php echo wp_create_nonce('media-form'); ?>",
"type" : "<?php echo $type; ?>",
"tab" : "<?php echo $tab; ?>",
"short" : "1"
@@ -815,6 +819,7 @@ jQuery(function($){
//-->
</script>
+
<div id="flash-upload-ui">
<?php do_action('pre-flash-upload-ui'); ?>
<p><input id="flash-browse-button" type="button" value="<?php echo attribute_escape( __( 'Choose files to upload' ) ); ?>" class="button" /></p>
@@ -959,7 +964,6 @@ function media_upload_library_form($errors) {
<input type="submit" value="<?php echo attribute_escape( __( 'Search Media' ) ); ?>" class="button" />
</div>
-<p>
<ul class="subsubsub">
<?php
$type_links = array();
@@ -991,7 +995,6 @@ echo implode(' | </li>', $type_links) . '</li>';
unset($type_links);
?>
</ul>
-</p>
<div class="tablenav">
@@ -1066,8 +1069,10 @@ jQuery(function($){
<div id="media-items">
<?php echo get_media_items(null, $errors); ?>
</div>
+<p class="ml-submit">
<input type="submit" class="button savebutton" name="save" value="<?php echo attribute_escape( __( 'Save all changes' ) ); ?>" />
<input type="hidden" name="post_id" id="post_id" value="<?php echo (int) $post_id; ?>" />
+</p>
</form>
<?php
}
diff --git a/wp-admin/includes/upgrade.php b/wp-admin/includes/upgrade.php
index 94bdbd3..800a86d 100644
--- a/wp-admin/includes/upgrade.php
+++ b/wp-admin/includes/upgrade.php
@@ -205,6 +205,9 @@ function upgrade_all() {
if ( $wp_current_db_version < 7796 )
upgrade_251();
+ if ( $wp_current_db_version < 7935 )
+ upgrade_252();
+
maybe_disable_automattic_widgets();
$wp_rewrite->flush_rules();
@@ -747,6 +750,12 @@ function upgrade_251() {
update_option('secret', wp_generate_password(64));
}
+function upgrade_252() {
+ global $wpdb;
+
+ $wpdb->query("UPDATE $wpdb->users SET user_activation_key = ''");
+}
+
// The functions we use to actually do stuff
// General
diff --git a/wp-admin/includes/widgets.php b/wp-admin/includes/widgets.php
index 641f80f..09936b7 100644
--- a/wp-admin/includes/widgets.php
+++ b/wp-admin/includes/widgets.php
@@ -227,6 +227,7 @@ function wp_widget_control( $sidebar_args ) {
if ( empty($sidebar_args['_display']) || 'template' != $sidebar_args['_display'] )
echo $sidebar_args['before_widget'];
?>
+ <div class="widget-top">
<h4 class="widget-title"><?php echo $widget_title ?>
<?php if ( $edit ) : ?>
@@ -239,7 +240,7 @@ function wp_widget_control( $sidebar_args ) {
<?php endif; ?>
- </h4>
+ </h4></div>
<div class="widget-control"<?php if ( $edit ) echo ' style="display: block;"'; ?>>
diff --git a/wp-admin/js/link.js b/wp-admin/js/link.js
index cfc0f94..2b3fa65 100644
--- a/wp-admin/js/link.js
+++ b/wp-admin/js/link.js
@@ -1,4 +1,7 @@
jQuery(document).ready( function() {
+ // close postboxes that should be closed
+ jQuery('.if-js-closed').removeClass('if-js-closed').addClass('closed');
+
jQuery('#link_name').focus();
// postboxes
add_postbox_toggles('link');
diff --git a/wp-admin/js/media-upload.js b/wp-admin/js/media-upload.js
index b8c615d..506faf8 100644
--- a/wp-admin/js/media-upload.js
+++ b/wp-admin/js/media-upload.js
@@ -1,12 +1,39 @@
// send html to the post editor
function send_to_editor(h) {
- var win = window.opener ? window.opener : window.dialogArguments;
- if ( !win )
- win = top;
+ var win = window.dialogArguments || opener || parent || top;
+
tinyMCE = win.tinyMCE;
if ( typeof tinyMCE != 'undefined' && ( ed = tinyMCE.getInstanceById('content') ) && !ed.isHidden() ) {
tinyMCE.selectedInstance.getWin().focus();
tinyMCE.execCommand('mceInsertContent', false, h);
} else
win.edInsertContent(win.edCanvas, h);
-} \ No newline at end of file
+}
+
+// thickbox settings
+jQuery(function($) {
+ tb_position = function() {
+ var tbWindow = $('#TB_window');
+ var width = $(window).width();
+ var H = $(window).height();
+ var W = ( 720 < width ) ? 720 : width;
+
+ if ( tbWindow.size() ) {
+ tbWindow.width( W - 50 ).height( H - 45 );
+ $('#TB_iframeContent').width( W - 50 ).height( H - 75 );
+ tbWindow.css({marginLeft: '-' + parseInt((( W - 50 ) / 2),10) + 'px'});
+ };
+
+ return $('a.thickbox').each( function() {
+ var href = $(this).attr('href');
+ if ( ! href ) return;
+ href = href.replace(/&width=[0-9]+/g, '');
+ href = href.replace(/&height=[0-9]+/g, '');
+ $(this).attr( 'href', href + '&width=' + ( W - 80 ) + '&height=' + ( H - 85 ) );
+ });
+ };
+
+ $(window).resize( function() { tb_position() } );
+ $(document).ready( function() { tb_position() } );
+});
+
diff --git a/wp-admin/js/widgets.js b/wp-admin/js/widgets.js
index 4eb37ee..b42812f 100644
--- a/wp-admin/js/widgets.js
+++ b/wp-admin/js/widgets.js
@@ -13,12 +13,12 @@ jQuery(function($) {
if ( t.is(':visible') ) {
if ( disableFields ) { t.find( ':input:enabled' ).not( '[name="widget-id[]"], [name*="[submit]"]' ).attr( 'disabled', 'disabled' ); }
li.css( 'marginLeft', 0 );
- t.siblings('h4').children('a').text( widgetsL10n.edit );
+ t.siblings('div').children('h4').children('a').text( widgetsL10n.edit );
} else {
t.find( ':disabled' ).attr( 'disabled', '' ); // always enable on open
if ( width > 250 )
li.css( 'marginLeft', ( width - 250 ) * -1 );
- t.siblings('h4').children('a').text( widgetsL10n.cancel );
+ t.siblings('div').children('h4').children('a').text( widgetsL10n.cancel );
}
t.toggle();
} : function() {
@@ -28,12 +28,12 @@ jQuery(function($) {
if ( disableFields ) { t.find( ':input:enabled' ).not( '[name="widget-id[]"], [name*="[submit]"]' ).attr( 'disabled', 'disabled' ); }
if ( width > 250 )
li.animate( { marginLeft: 0 } );
- t.siblings('h4').children('a').text( widgetsL10n.edit );
+ t.siblings('div').children('h4').children('a').text( widgetsL10n.edit );
} else {
t.find( ':disabled' ).attr( 'disabled', '' ); // always enable on open
if ( width > 250 )
li.animate( { marginLeft: ( width - 250 ) * -1 } );
- t.siblings('h4').children('a').text( widgetsL10n.cancel );
+ t.siblings('div').children('h4').children('a').text( widgetsL10n.cancel );
}
t.animate( { height: 'toggle' } );
};
diff --git a/wp-admin/media.php b/wp-admin/media.php
index 2508810..03b3749 100644
--- a/wp-admin/media.php
+++ b/wp-admin/media.php
@@ -92,7 +92,7 @@ case 'edit' :
<?php wp_original_referer_field(true, 'previous'); ?>
<?php wp_nonce_field('media-form'); ?>
</p>
-
+</form>
</div>
diff --git a/wp-admin/menu.php b/wp-admin/menu.php
index 3db528f..81f9b33 100644
--- a/wp-admin/menu.php
+++ b/wp-admin/menu.php
@@ -23,7 +23,7 @@ else
$awaiting_mod = wp_count_comments();
$awaiting_mod = $awaiting_mod->moderated;
$menu[15] = array(__('Design'), 'switch_themes', 'themes.php');
-$menu[20] = array( sprintf( __('Comments %s'), "<span id='awaiting-mod' class='count-$awaiting_mod'><span class='comment-count'>$awaiting_mod</span></span>" ), 'edit_posts', 'edit-comments.php');
+$menu[20] = array( sprintf( __('Comments %s'), "<span id='awaiting-mod' class='count-$awaiting_mod'><span class='comment-count'>" . number_format_i18n($awaiting_mod) . "</span></span>" ), 'edit_posts', 'edit-comments.php');
$menu[30] = array(__('Settings'), 'manage_options', 'options-general.php');
$menu[35] = array(__('Plugins'), 'activate_plugins', 'plugins.php');
if ( current_user_can('edit_users') )
diff --git a/wp-admin/plugins.php b/wp-admin/plugins.php
index 1cd1a89..8e6b707 100644
--- a/wp-admin/plugins.php
+++ b/wp-admin/plugins.php
@@ -93,11 +93,11 @@ if (empty($plugins)) {
$inactive = get_option('deactivated_plugins');
if ( !empty($active) ) {
?>
- <a class="button-secondary" href="<?php echo wp_nonce_url('plugins.php?action=deactivate-all', 'deactivate-all'); ?>" class="delete"><?php _e('Deactivate All Plugins'); ?></a>
+ <a class="button-secondary delete" href="<?php echo wp_nonce_url('plugins.php?action=deactivate-all', 'deactivate-all'); ?>"><?php _e('Deactivate All Plugins'); ?></a>
<?php
} elseif ( empty($active) && !empty($inactive) ) {
?>
- <a class="button-secondary" href="<?php echo wp_nonce_url('plugins.php?action=reactivate-all', 'reactivate-all'); ?>" class="delete"><?php _e('Reactivate Plugins'); ?></a>
+ <a class="button-secondary delete" href="<?php echo wp_nonce_url('plugins.php?action=reactivate-all', 'reactivate-all'); ?>"><?php _e('Reactivate Plugins'); ?></a>
<?php
} // endif active/inactive plugin check
?>
diff --git a/wp-admin/update.php b/wp-admin/update.php
index 34e9380..be95102 100644
--- a/wp-admin/update.php
+++ b/wp-admin/update.php
@@ -22,7 +22,7 @@ function request_filesystem_credentials($form_post, $type = '', $error = false)
$credentials['hostname'] = defined('FTP_HOST') ? FTP_HOST : (!empty($_POST['hostname']) ? $_POST['hostname'] : $credentials['hostname']);
$credentials['username'] = defined('FTP_USER') ? FTP_USER : (!empty($_POST['username']) ? $_POST['username'] : $credentials['username']);
$credentials['password'] = defined('FTP_PASS') ? FTP_PASS : (!empty($_POST['password']) ? $_POST['password'] : $credentials['password']);
- $credentials['ssl'] = defined('FTP_SSL') ? FTP_SSL : (!empty($_POST['ssl']) ? $_POST['ssl'] : $credentials['ssl']);
+ $credentials['ssl'] = defined('FTP_SSL') ? FTP_SSL : ( isset($_POST['ssl']) ? $_POST['ssl'] : $credentials['ssl']);
if ( ! $error && !empty($credentials['password']) && !empty($credentials['username']) && !empty($credentials['hostname']) ) {
$stored_credentials = $credentials;
diff --git a/wp-admin/user-edit.php b/wp-admin/user-edit.php
index 8ee9c05..b01c3a8 100644
--- a/wp-admin/user-edit.php
+++ b/wp-admin/user-edit.php
@@ -171,7 +171,7 @@ include ('admin-header.php');
<th scope="row"><?php _e('Admin Color Scheme')?></th>
<td>
<?php
-$current_color = get_user_option('admin_color');
+$current_color = get_user_option('admin_color', $user_id);
if ( empty($current_color) )
$current_color = 'fresh';
foreach ( $_wp_admin_css_colors as $color => $color_info ): ?>
diff --git a/wp-admin/widgets.php b/wp-admin/widgets.php
index 83264e4..5e4659e 100644
--- a/wp-admin/widgets.php
+++ b/wp-admin/widgets.php
@@ -134,7 +134,9 @@ if ( isset($_GET['add']) && $_GET['add'] ) {
<ul class="widget-control-list">
<li class="widget-list-control-item">
+ <div class="widget-top">
<h4 class="widget-title"><?php echo $control['name']; ?></h4>
+ </div>
<div class="widget-control" style="display: block;">
<?php
call_user_func_array( $control_callback, $control['params'] );