Compare commits

...

22 Commits

Author SHA1 Message Date
ryan
a67b6501e7 Tag 3.3.1
git-svn-id: http://svn.automattic.com/wordpress/tags/3.3.1@19670 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-01-03 20:50:03 +00:00
nacin
bb7f5def49 15 bugs fixed in 3.3.1.
git-svn-id: http://svn.automattic.com/wordpress/branches/3.3@19669 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-01-03 20:45:03 +00:00
ryan
90ff07836f Fix header/message alignment in Press This. fixes #19725 for 3.3
git-svn-id: http://svn.automattic.com/wordpress/branches/3.3@19668 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-01-03 20:44:01 +00:00
ryan
db3aa34eb7 3.3.1 bump
git-svn-id: http://svn.automattic.com/wordpress/branches/3.3@19667 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-01-03 20:35:03 +00:00
ryan
7c048e745b Fix tabbing for comment reply and edit. fixes #19727 for 3.3
git-svn-id: http://svn.automattic.com/wordpress/branches/3.3@19666 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-01-03 20:29:17 +00:00
ryan
afc218c988 Bumpity bump
git-svn-id: http://svn.automattic.com/wordpress/branches/3.3@19661 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-01-03 18:35:03 +00:00
ryan
61c109e030 Fix widget count on dashboard to account for orphaned widgets. fixes #19553 for trunk
git-svn-id: http://svn.automattic.com/wordpress/branches/3.3@19660 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-01-03 18:31:52 +00:00
ryan
cad54bba34 Remove esc_js() as this content now gets json encoded rather than a straight echo. props ocean90. fixes #19644, for 3.3
git-svn-id: http://svn.automattic.com/wordpress/branches/3.3@19659 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-01-03 18:29:02 +00:00
ryan
1f28b09d74 Properly handle a blank nav menu custom URL when determining what page we're on. fixes #19699 for 3.3
git-svn-id: http://svn.automattic.com/wordpress/branches/3.3@19658 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-01-03 18:27:59 +00:00
nacin
056e32340f Revert half of [19639]. If the blog_upload_space site_option is '0', restore 50 as a default. see #19538 for 3.3.
git-svn-id: http://svn.automattic.com/wordpress/branches/3.3@19654 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-01-03 17:54:50 +00:00
ryan
77c7c21043 Bump some vers
git-svn-id: http://svn.automattic.com/wordpress/branches/3.3@19651 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-01-03 17:01:50 +00:00
ryan
9f6201cbf4 Trigger the wp_print_syles action from wp_print_styles() only when handles are not passed. Prevents front-end styles from leaking into the admin. Props nacin. see #19510 for 3.3
git-svn-id: http://svn.automattic.com/wordpress/branches/3.3@19650 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-01-02 22:34:31 +00:00
ryan
434b4605eb Immediately close a flyout when opening another one. Prevents brief occurrence of two flyouts at once. Props SergeyBiryukov. fixes #19575 for 3.3
git-svn-id: http://svn.automattic.com/wordpress/branches/3.3@19648 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-01-02 21:51:35 +00:00
ryan
c52e2c100d Only allow _multisite_ super admins to demote themselves on a site. props linuxologos, fixes #19684 for 3.3
git-svn-id: http://svn.automattic.com/wordpress/branches/3.3@19646 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-01-02 21:45:38 +00:00
ryan
8c7f681a75 Better checking for values for multisite upload limits. fixes #19538 for 3.3
git-svn-id: http://svn.automattic.com/wordpress/branches/3.3@19645 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-01-02 21:41:56 +00:00
ryan
c15548e05e Make sure that _render() is only called with a valid root object. As in, render() can only be validly called once and must not fail on the second call. props SergeyBiryukov, fixes #19642 for 3.3
git-svn-id: http://svn.automattic.com/wordpress/branches/3.3@19644 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-01-02 21:37:16 +00:00
ryan
61aef00dc4 An empty database prefix is not supported for multisite. <small>Add a sanity check anyway.</small> fixes #19566 for 3.3
git-svn-id: http://svn.automattic.com/wordpress/branches/3.3@19643 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-01-02 21:31:27 +00:00
nacin
f50c0c90cc Define json_encode() in load-scripts.php. fixes #19524 for 3.3.
git-svn-id: http://svn.automattic.com/wordpress/branches/3.3@19637 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-12-30 23:01:16 +00:00
azaozz
fd2cfdfcda Replace background image with CSS3 gradient in wp_die(), fixes #19701 for 3.3
git-svn-id: http://svn.automattic.com/wordpress/branches/3.3@19636 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-12-30 22:29:47 +00:00
ryan
b5bb8c72a8 Don't cast objects to int.
git-svn-id: http://svn.automattic.com/wordpress/branches/3.3@19634 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-12-30 19:34:59 +00:00
ryan
97ebc17ca8 Assign the full WP_User object to the userdata global. Props scribu. fixes #19595 for 3.3
git-svn-id: http://svn.automattic.com/wordpress/branches/3.3@19625 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-12-21 20:08:31 +00:00
ryan
c51dfe7bfe Branching 3.3
git-svn-id: http://svn.automattic.com/wordpress/branches/3.3@19591 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-12-12 22:22:04 +00:00
19 changed files with 85 additions and 34 deletions

View File

@@ -8,7 +8,7 @@
<body>
<h1 id="logo">
<a href="http://wordpress.org/"><img alt="WordPress" src="wp-admin/images/wordpress-logo.png" width="250" height="68" /></a>
<br /> Version 3.3
<br /> Version 3.3.1
</h1>
<p style="text-align: center">Semantic Personal Publishing Platform</p>

View File

@@ -33,6 +33,14 @@ include( './admin-header.php' );
</a>
</h2>
<div class="changelog point-releases">
<h3><?php echo _n( 'Maintenance and Security Release', 'Maintenance and Security Releases', 1 ); ?></h3>
<p><?php printf( _n( '<strong>Version %1$s</strong> addressed a security issue and fixed %2$s bug.',
'<strong>Version %1$s</strong> addressed a security issue and fixed %2$s bugs.', 15 ), '3.3.1', number_format_i18n( 15 ) ); ?>
<?php printf( __( 'For more information, see <a href="%s">the release notes</a>.' ), 'http://codex.wordpress.org/Version_3.3.1' ); ?>
</p>
</div>
<div class="changelog">
<h3><?php _e( 'Easier Uploading' ); ?></h3>

View File

@@ -395,7 +395,7 @@ function wp_dashboard_right_now() {
$sidebars_widgets = wp_get_sidebars_widgets();
$num_widgets = 0;
foreach ( (array) $sidebars_widgets as $k => $v ) {
if ( 'wp_inactive_widgets' == $k )
if ( 'wp_inactive_widgets' == $k || 'orphaned_widgets' == substr( $k, 0, 16 ) )
continue;
if ( is_array($v) )
$num_widgets = $num_widgets + count($v);

View File

@@ -385,9 +385,11 @@ function get_upload_space_available() {
*/
function get_space_allowed() {
$space_allowed = get_option( 'blog_upload_space' );
if ( $space_allowed === false )
if ( ! is_numeric( $space_allowed ) )
$space_allowed = get_site_option( 'blog_upload_space' );
if ( empty( $space_allowed ) || !is_numeric( $space_allowed ) )
if ( empty( $space_allowed ) || ! is_numeric( $space_allowed ) )
$space_allowed = 50;
return $space_allowed;

View File

@@ -334,7 +334,7 @@ function wp_comment_reply($position = '1', $checkbox = false, $mode = 'single',
<div id="replycontainer">
<?php
$quicktags_settings = array( 'buttons' => 'strong,em,link,block,del,ins,img,ul,ol,li,code,spell,close' );
wp_editor( '', 'replycontent', array( 'media_buttons' => false, 'tinymce' => false, 'quicktags' => $quicktags_settings ) );
wp_editor( '', 'replycontent', array( 'media_buttons' => false, 'tinymce' => false, 'quicktags' => $quicktags_settings, 'tabindex' => 104 ) );
?>
</div>
@@ -1761,11 +1761,11 @@ final class WP_Internal_Pointers {
}
public static function pointer_wp330_toolbar() {
$content = '<h3>' . esc_js( __( 'New Feature: Toolbar' ) ). '</h3>';
$content .= '<p>' . esc_js( __( 'We&#8217;ve combined the admin bar and the old Dashboard header into one persistent toolbar. Hover over the toolbar items to see what&#8217;s new.' ) ) . '</p>';
$content = '<h3>' . __( 'New Feature: Toolbar' ) . '</h3>';
$content .= '<p>' . __( 'We&#8217;ve combined the admin bar and the old Dashboard header into one persistent toolbar. Hover over the toolbar items to see what&#8217;s new.' ) . '</p>';
if ( is_multisite() && is_super_admin() )
$content .= '<p>' .esc_js( __( 'Network Admin is now located in the My Sites menu.' ) ) . '</p>';
$content .= '<p>' . __( 'Network Admin is now located in the My Sites menu.' ) . '</p>';
WP_Internal_Pointers::print_js( 'wp330_toolbar', '#wpadminbar', array(
'content' => $content,
@@ -1779,8 +1779,8 @@ final class WP_Internal_Pointers {
* @since 3.3.0
*/
public static function pointer_wp330_media_uploader() {
$content = '<h3>' . esc_js( __( 'Updated Media Uploader' ) ) . '</h3>';
$content .= '<p>' . esc_js( __( 'The single media icon now launches the uploader for all file types, and the new drag and drop interface makes uploading a breeze.' ) ) . '</p>';
$content = '<h3>' . __( 'Updated Media Uploader' ) . '</h3>';
$content .= '<p>' . __( 'The single media icon now launches the uploader for all file types, and the new drag and drop interface makes uploading a breeze.' ) . '</p>';
WP_Internal_Pointers::print_js( 'wp330_media_uploader', '#content-add_media', array(
'content' => $content,
@@ -1794,8 +1794,8 @@ final class WP_Internal_Pointers {
* @since 3.3.0
*/
public static function pointer_wp330_saving_widgets() {
$content = '<h3>' . esc_js( __( 'New Feature: Saving Widgets' ) ) . '</h3>';
$content .= '<p>' . esc_js( __( 'If you change your mind and revert to your previous theme, we&#8217;ll put the widgets back the way you had them.' ) ) . '</p>';
$content = '<h3>' . __( 'New Feature: Saving Widgets' ) . '</h3>';
$content .= '<p>' . __( 'If you change your mind and revert to your previous theme, we&#8217;ll put the widgets back the way you had them.' ). '</p>';
WP_Internal_Pointers::print_js( 'wp330_saving_widgets', '#message2', array(
'content' => $content,

View File

@@ -406,7 +406,7 @@ function update_core($from, $to) {
$mysql_version = $wpdb->db_version();
$required_php_version = '5.2.4';
$required_mysql_version = '5.0';
$wp_version = '3.3';
$wp_version = '3.3.1';
$php_compat = version_compare( $php_version, $required_php_version, '>=' );
if ( file_exists( WP_CONTENT_DIR . '/db.php' ) && empty( $wpdb->is_mysql ) )
$mysql_compat = true;

View File

@@ -209,6 +209,7 @@ $(document).ready( function() {
else if ( m.css('marginTop') )
m.css({'marginTop':''});
menu.find('.wp-submenu').removeClass('sub-open');
m.addClass('sub-open');
},
out: function(){

File diff suppressed because one or more lines are too long

View File

@@ -92,6 +92,13 @@ function includes_url() {}
*/
function wp_guess_url() {}
if ( ! function_exists( 'json_encode' ) ) :
/**
* @ignore
*/
function json_encode() {}
endif;
function get_file($path) {
if ( function_exists('realpath') )

View File

@@ -314,6 +314,20 @@ var photostorage = false;
do_action('admin_print_scripts');
do_action('admin_head');
?>
<style type="text/css">
#message {
margin: 10px 0;
}
#title,
.press-this #wphead {
margin-left: 0;
margin-right: 0;
}
.rtl.press-this #header-logo,
.rtl.press-this #wphead h1 {
float: right;
}
</style>
<script type="text/javascript">
var wpActiveEditor = 'content';
@@ -444,7 +458,7 @@ var photostorage = false;
});
</script>
</head>
<body class="press-this wp-admin">
<body class="press-this wp-admin<?php if ( is_rtl() ) echo ' rtl'; ?>">
<form action="press-this.php?action=post" method="post">
<div id="poststuff" class="metabox-holder">
<div id="side-sortables" class="press-this-sidebar">

View File

@@ -100,10 +100,11 @@ case 'promote':
if ( ! current_user_can('promote_user', $id) )
wp_die(__('You can&#8217;t edit that user.'));
// The new role of the current user must also have the promote_users cap or be a super admin
if ( $id == $current_user->ID && ! is_super_admin() && ! $wp_roles->role_objects[ $_REQUEST['new_role'] ]->has_cap('promote_users') ) {
$update = 'err_admin_role';
continue;
// The new role of the current user must also have the promote_users cap or be a multisite super admin
if ( $id == $current_user->ID && ! $wp_roles->role_objects[ $_REQUEST['new_role'] ]->has_cap('promote_users')
&& ! ( is_multisite() && is_super_admin() ) ) {
$update = 'err_admin_role';
continue;
}
// If the user doesn't already belong to the blog, bail.

View File

@@ -487,10 +487,15 @@ class WP_User {
static function get_data_by( $field, $value ) {
global $wpdb;
if ( 'id' == $field )
if ( 'id' == $field ) {
// Make sure the value is numeric to avoid casting objects, for example,
// to int 1.
if ( ! is_numeric( $value ) )
return false;
$value = absint( $value );
else
} else {
$value = trim( $value );
}
if ( !$value )
return false;

View File

@@ -196,7 +196,8 @@ class WP_Admin_Bar {
public function render() {
$root = $this->_bind();
$this->_render( $root );
if ( $root )
$this->_render( $root );
}
final protected function _bind() {

View File

@@ -2896,6 +2896,13 @@ function _default_wp_die_handler( $message, $title = '', $args = array() ) {
-moz-box-sizing: content-box;
-webkit-box-sizing: content-box;
box-sizing: content-box;
background-color: #f5f5f5;
background-image: -ms-linear-gradient(top, #ffffff, #f2f2f2);
background-image: -moz-linear-gradient(top, #ffffff, #f2f2f2);
background-image: -o-linear-gradient(top, #ffffff, #f2f2f2);
background-image: -webkit-gradient(linear, left top, left bottom, from(#ffffff), to(#f2f2f2));
background-image: -webkit-linear-gradient(top, #ffffff, #f2f2f2);
background-image: linear-gradient(top, #ffffff, #f2f2f2);
}
.button:hover {
@@ -2903,13 +2910,15 @@ function _default_wp_die_handler( $message, $title = '', $args = array() ) {
border-color: #666;
}
.button {
background: #f2f2f2 url(<?php echo wp_guess_url(); ?>/wp-admin/images/white-grad.png) repeat-x scroll left top;
.button:active {
background-image: -ms-linear-gradient(top, #f2f2f2, #ffffff);
background-image: -moz-linear-gradient(top, #f2f2f2, #ffffff);
background-image: -o-linear-gradient(top, #f2f2f2, #ffffff);
background-image: -webkit-gradient(linear, left top, left bottom, from(#f2f2f2), to(#ffffff));
background-image: -webkit-linear-gradient(top, #f2f2f2, #ffffff);
background-image: linear-gradient(top, #f2f2f2, #ffffff);
}
.button:active {
background: #eee url(<?php echo wp_guess_url(); ?>/wp-admin/images/white-grad-active.png) repeat-x scroll left top;
}
<?php if ( 'rtl' == $text_direction ) : ?>
body { font-family: Tahoma, Arial; }
<?php endif; ?>

View File

@@ -18,10 +18,12 @@
* @return bool True on success, false on failure.
*/
function wp_print_styles( $handles = false ) {
do_action( 'wp_print_styles' );
if ( '' === $handles ) // for wp_head
$handles = false;
if ( ! $handles )
do_action( 'wp_print_styles' );
global $wp_styles;
if ( ! is_a( $wp_styles, 'WP_Styles' ) ) {
if ( ! did_action( 'init' ) )

View File

@@ -362,10 +362,11 @@ function _wp_menu_item_classes_by_context( &$menu_items ) {
} elseif ( 'custom' == $menu_item->object ) {
$_root_relative_current = untrailingslashit( $_SERVER['REQUEST_URI'] );
$current_url = ( is_ssl() ? 'https://' : 'http://' ) . $_SERVER['HTTP_HOST'] . $_root_relative_current;
$item_url = untrailingslashit( strpos( $menu_item->url, '#' ) ? substr( $menu_item->url, 0, strpos( $menu_item->url, '#' ) ) : $menu_item->url );
$raw_item_url = strpos( $menu_item->url, '#' ) ? substr( $menu_item->url, 0, strpos( $menu_item->url, '#' ) ) : $menu_item->url;
$item_url = untrailingslashit( $raw_item_url );
$_indexless_current = untrailingslashit( preg_replace( '/index.php$/', '', $current_url ) );
if ( in_array( $item_url, array( $current_url, $_indexless_current, $_root_relative_current ) ) ) {
if ( $raw_item_url && in_array( $item_url, array( $current_url, $_indexless_current, $_root_relative_current ) ) ) {
$classes[] = 'current-menu-item';
$menu_items[$key]->current = true;
$_anc_id = (int) $menu_item->db_id;

View File

@@ -61,7 +61,7 @@ function wp_default_scripts( &$scripts ) {
$scripts->add( 'utils', "/wp-admin/js/utils$suffix.js", false, '20101110' );
$scripts->add( 'common', "/wp-admin/js/common$suffix.js", array('jquery', 'hoverIntent', 'utils'), '20111130', 1 );
$scripts->add( 'common', "/wp-admin/js/common$suffix.js", array('jquery', 'hoverIntent', 'utils'), '20120102', 1 );
$scripts->localize( 'common', 'commonL10n', array(
'warnDelete' => __("You are about to permanently delete the selected items.\n 'Cancel' to stop, 'OK' to delete.")
) );

View File

@@ -696,7 +696,7 @@ function get_blogs_of_user( $user_id, $all = false ) {
foreach ( $keys as $key ) {
if ( 'capabilities' !== substr( $key, -12 ) )
continue;
if ( 0 !== strpos( $key, $wpdb->base_prefix ) )
if ( $wpdb->base_prefix && 0 !== strpos( $key, $wpdb->base_prefix ) )
continue;
$blog_id = str_replace( array( $wpdb->base_prefix, '_capabilities' ), '', $key );
if ( ! is_numeric( $blog_id ) )
@@ -931,7 +931,7 @@ function setup_userdata($for_user_id = '') {
else
$user = new WP_User($for_user_id);
$userdata = $user->data;
$userdata = $user;
$user_ID = (int) $user->ID;
$user_level = (int) isset($user->user_level) ? $user->user_level : 0;

View File

@@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '3.3';
$wp_version = '3.3.1';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.