From: Edward Z. Yang Date: Tue, 11 Sep 2012 08:03:39 +0000 (+0200) Subject: WordPress 3.4.2-scripts X-Git-Tag: wordpress-3.4.2-scripts X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/commitdiff_plain/refs/tags/wordpress-3.4.2-scripts?hp=e059c33afecf52580f31b53393d6a95d08aaef35 WordPress 3.4.2-scripts Signed-off-by: Edward Z. Yang --- diff --git a/readme.html b/readme.html index 49ae944a..d5998ba6 100644 --- a/readme.html +++ b/readme.html @@ -8,7 +8,7 @@

WordPress -
Version 3.4.1 +
Version 3.4.2

Semantic Personal Publishing Platform

diff --git a/wp-admin/about.php b/wp-admin/about.php index 4ffd837e..9b3624af 100644 --- a/wp-admin/about.php +++ b/wp-admin/about.php @@ -34,7 +34,12 @@ include( ABSPATH . 'wp-admin/admin-header.php' );
-

+

+

Version %1$s addressed some security issues and fixed %2$s bug.', + 'Version %1$s addressed some security issues and fixed %2$s bugs.', 20 ), '3.4.2', number_format_i18n( 20 ) ); ?> + the release notes.' ), 'http://codex.wordpress.org/Version_3.4.2' ); ?> +

+

Version %1$s addressed some security issues and fixed %2$s bug.', 'Version %1$s addressed some security issues and fixed %2$s bugs.', 21 ), '3.4.1', number_format_i18n( 21 ) ); ?> the release notes.' ), 'http://codex.wordpress.org/Version_3.4.1' ); ?> diff --git a/wp-admin/includes/class-wp-ms-themes-list-table.php b/wp-admin/includes/class-wp-ms-themes-list-table.php index 9fc3251d..abbf6a02 100644 --- a/wp-admin/includes/class-wp-ms-themes-list-table.php +++ b/wp-admin/includes/class-wp-ms-themes-list-table.php @@ -293,7 +293,7 @@ class WP_MS_Themes_List_Table extends WP_List_Table { } if ( current_user_can('edit_themes') ) - $actions['edit'] = '' . __('Edit') . ''; + $actions['edit'] = '' . __('Edit') . ''; if ( ! $allowed && current_user_can( 'delete_themes' ) && ! $this->is_site_themes && $theme_key != get_option( 'stylesheet' ) && $theme_key != get_option( 'template' ) ) $actions['delete'] = '' . __( 'Delete' ) . ''; diff --git a/wp-admin/includes/class-wp-plugins-list-table.php b/wp-admin/includes/class-wp-plugins-list-table.php index a1ce53ab..101491ce 100644 --- a/wp-admin/includes/class-wp-plugins-list-table.php +++ b/wp-admin/includes/class-wp-plugins-list-table.php @@ -90,7 +90,9 @@ class WP_Plugins_List_Table extends WP_List_Table { foreach ( (array) $plugins['all'] as $plugin_file => $plugin_data ) { // Filter into individual sections - if ( ! $screen->is_network && is_plugin_active_for_network( $plugin_file ) ) { + if ( is_multisite() && ! $screen->is_network && is_network_only_plugin( $plugin_file ) ) { + unset( $plugins['all'][ $plugin_file ] ); + } elseif ( ! $screen->is_network && is_plugin_active_for_network( $plugin_file ) ) { unset( $plugins['all'][ $plugin_file ] ); } elseif ( ( ! $screen->is_network && is_plugin_active( $plugin_file ) ) || ( $screen->is_network && is_plugin_active_for_network( $plugin_file ) ) ) { diff --git a/wp-admin/includes/class-wp-themes-list-table.php b/wp-admin/includes/class-wp-themes-list-table.php index 003d1ab0..f6ca8a57 100644 --- a/wp-admin/includes/class-wp-themes-list-table.php +++ b/wp-admin/includes/class-wp-themes-list-table.php @@ -128,7 +128,7 @@ class WP_Themes_List_Table extends WP_List_Table { $activate_link = wp_nonce_url( "themes.php?action=activate&template=" . urlencode( $template ) . "&stylesheet=" . urlencode( $stylesheet ), 'switch-theme_' . $stylesheet ); $preview_link = esc_url( add_query_arg( - array( 'preview' => 1, 'template' => $template, 'stylesheet' => $stylesheet, 'preview_iframe' => true, 'TB_iframe' => 'true' ), + array( 'preview' => 1, 'template' => urlencode( $template ), 'stylesheet' => urlencode( $stylesheet ), 'preview_iframe' => true, 'TB_iframe' => 'true' ), home_url( '/' ) ) ); $actions = array(); diff --git a/wp-admin/includes/class-wp-upgrader.php b/wp-admin/includes/class-wp-upgrader.php index c70ef66b..846cbe5f 100644 --- a/wp-admin/includes/class-wp-upgrader.php +++ b/wp-admin/includes/class-wp-upgrader.php @@ -1507,14 +1507,14 @@ class Theme_Installer_Skin extends WP_Upgrader_Skin { $preview_link = add_query_arg( array( 'preview' => 1, - 'template' => $template, - 'stylesheet' => $stylesheet, + 'template' => urlencode( $template ), + 'stylesheet' => urlencode( $stylesheet ), ), trailingslashit( get_home_url() ) ); $activate_link = add_query_arg( array( 'action' => 'activate', - 'template' => $template, - 'stylesheet' => $stylesheet, + 'template' => urlencode( $template ), + 'stylesheet' => urlencode( $stylesheet ), ), admin_url('themes.php') ); $activate_link = wp_nonce_url( $activate_link, 'switch-theme_' . $stylesheet ); @@ -1571,14 +1571,14 @@ class Theme_Upgrader_Skin extends WP_Upgrader_Skin { $preview_link = add_query_arg( array( 'preview' => 1, - 'template' => $template, - 'stylesheet' => $stylesheet, + 'template' => urlencode( $template ), + 'stylesheet' => urlencode( $stylesheet ), ), trailingslashit( get_home_url() ) ); $activate_link = add_query_arg( array( 'action' => 'activate', - 'template' => $template, - 'stylesheet' => $stylesheet, + 'template' => urlencode( $template ), + 'stylesheet' => urlencode( $stylesheet ), ), admin_url('themes.php') ); $activate_link = wp_nonce_url( $activate_link, 'switch-theme_' . $stylesheet ); diff --git a/wp-admin/includes/meta-boxes.php b/wp-admin/includes/meta-boxes.php index 18dc7c2a..fde0af8c 100644 --- a/wp-admin/includes/meta-boxes.php +++ b/wp-admin/includes/meta-boxes.php @@ -688,7 +688,7 @@ function link_categories_meta_box($link) {

diff --git a/wp-admin/includes/update-core.php b/wp-admin/includes/update-core.php index 2e383ddf..392bb571 100644 --- a/wp-admin/includes/update-core.php +++ b/wp-admin/includes/update-core.php @@ -477,7 +477,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.4.1'; + $wp_version = '3.4.2'; $php_compat = version_compare( $php_version, $required_php_version, '>=' ); if ( file_exists( WP_CONTENT_DIR . '/db.php' ) && empty( $wpdb->is_mysql ) ) $mysql_compat = true; @@ -680,7 +680,7 @@ function _copy_dir($from, $to, $skip_list = array() ) { function _redirect_to_about_wordpress( $new_version ) { global $wp_version, $pagenow, $action; - if ( version_compare( $wp_version, '3.4-RC1', '>=' ) ) + if ( version_compare( $wp_version, '3.5-alpha', '>=' ) ) return; // Ensure we only run this on the update-core.php page. wp_update_core() could be called in other contexts. @@ -695,12 +695,17 @@ function _redirect_to_about_wordpress( $new_version ) { // See do_core_upgrade() show_message( __('WordPress updated successfully') ); - show_message( '' . sprintf( __( 'Welcome to WordPress %1$s. You will be redirected to the About WordPress screen. If not, click here.' ), $new_version, esc_url( self_admin_url( 'about.php?updated' ) ) ) . '' ); - show_message( '' . sprintf( __( 'Welcome to WordPress %1$s. Learn more.' ), $new_version, esc_url( self_admin_url( 'about.php?updated' ) ) ) . '' ); + + $js_message = __( 'Welcome to WordPress %1$s. You will be redirected to the About WordPress screen. If not, click here.' ); + $js_message = str_replace( '"%s"', '"%2$s"', $js_message ); // in lieu of breaking the string. + + // self_admin_url() won't exist when upgrading from <= 3.0, so relative URLs are intentional. + show_message( '' . sprintf( $js_message, $new_version, 'about.php?updated' ) . '' ); + show_message( '' . sprintf( __( 'Welcome to WordPress %1$s. Learn more.' ), $new_version, 'about.php?updated' ) . '' ); echo '
'; ?> ' . __( 'Welcome to your WordPress Dashboard! This is the screen you will see when you log in to your site, and gives you access to all the site management features of WordPress. You can get help for any screen by clicking the Help tab in the upper corner.' ) . '

'; -get_current_screen()->add_help_tab( array( +// Not using chaining here, so as to be parseable by PHP4. +$screen = get_current_screen(); + +$screen->add_help_tab( array( 'id' => 'overview', 'title' => __( 'Overview' ), 'content' => $help, @@ -43,7 +48,7 @@ get_current_screen()->add_help_tab( array( $help = '

' . __('The left-hand navigation menu provides links to all of the WordPress administration screens, with submenu items displayed on hover. You can minimize this menu to a narrow icon strip by clicking on the Collapse Menu arrow at the bottom.') . '

'; $help .= '

' . __('Links in the Toolbar at the top of the screen connect your dashboard and the front end of your site, and provide access to your profile and helpful WordPress information.') . '

'; -get_current_screen()->add_help_tab( array( +$screen->add_help_tab( array( 'id' => 'help-navigation', 'title' => __('Navigation'), 'content' => $help, @@ -54,7 +59,7 @@ $help .= '

' . __('Screen Options - Use the Screen Options ta $help .= '

' . __('Drag and Drop - To rearrange the boxes, drag and drop by clicking on the title bar of the selected box and releasing when you see a gray dotted-line rectangle appear in the location you want to place the box.') . '

'; $help .= '

' . __('Box Controls - Click the title bar of the box to expand or collapse it. In addition, some box have configurable content, and will show a “Configure” link in the title bar if you hover over it.') . '

'; -get_current_screen()->add_help_tab( array( +$screen->add_help_tab( array( 'id' => 'help-layout', 'title' => __('Layout'), 'content' => $help, @@ -78,7 +83,7 @@ if ( ! is_multisite() && current_user_can( 'install_plugins' ) ) if ( current_user_can( 'edit_theme_options' ) ) $help .= '

' . __('Welcome - Shows links for some of the most common tasks when setting up a new site.') . '

'; -get_current_screen()->add_help_tab( array( +$screen->add_help_tab( array( 'id' => 'help-content', 'title' => __('Content'), 'content' => $help, @@ -86,7 +91,7 @@ get_current_screen()->add_help_tab( array( unset( $help ); -get_current_screen()->set_help_sidebar( +$screen->set_help_sidebar( '

' . __( 'For more information:' ) . '

' . '

' . __( 'Documentation on Dashboard' ) . '

' . '

' . __( 'Support Forums' ) . '

' diff --git a/wp-admin/js/customize-controls.dev.js b/wp-admin/js/customize-controls.dev.js index c37e43bd..900ab13c 100644 --- a/wp-admin/js/customize-controls.dev.js +++ b/wp-admin/js/customize-controls.dev.js @@ -220,10 +220,6 @@ }; }); - // Select a tab - this.selected = this.tabs[ panels.first().data('customizeTab') ]; - this.selected.both.addClass('library-selected'); - // Bind tab switch events this.library.children('ul').on( 'click', 'li', function( event ) { var id = $(this).data('customizeTab'), @@ -255,6 +251,18 @@ this.tabs.uploaded.both.addClass('hidden'); } + // Select a tab + panels.each( function() { + var tab = control.tabs[ $(this).data('customizeTab') ]; + + // Select the first visible tab. + if ( ! tab.link.hasClass('hidden') ) { + control.selected = tab; + tab.both.addClass('library-selected'); + return false; + } + }); + this.dropdownInit(); }, success: function( attachment ) { diff --git a/wp-admin/js/customize-controls.js b/wp-admin/js/customize-controls.js index 76c3b15b..a0742161 100644 --- a/wp-admin/js/customize-controls.js +++ b/wp-admin/js/customize-controls.js @@ -1 +1 @@ -(function(a,c){var b=wp.customize;b.Setting=b.Value.extend({initialize:function(g,f,d){var e;b.Value.prototype.initialize.call(this,f,d);this.id=g;this.transport=this.transport||"refresh";this.bind(this.preview)},preview:function(){switch(this.transport){case"refresh":return this.previewer.refresh();case"postMessage":return this.previewer.send("setting",[this.id,this()])}}});b.Control=b.Class.extend({initialize:function(i,e){var g=this,d,h,f;this.params={};c.extend(this,e||{});this.id=i;this.selector="#customize-control-"+i.replace("]","").replace("[","-");this.container=c(this.selector);f=c.map(this.params.settings,function(j){return j});b.apply(b,f.concat(function(){var j;g.settings={};for(j in g.params.settings){g.settings[j]=b(g.params.settings[j])}g.setting=g.settings["default"]||null;g.ready()}));g.elements=[];d=this.container.find("[data-customize-setting-link]");h={};d.each(function(){var k=c(this),j;if(k.is(":radio")){j=k.prop("name");if(h[j]){return}h[j]=true;k=d.filter('[name="'+j+'"]')}b(k.data("customizeSettingLink"),function(m){var l=new b.Element(k);g.elements.push(l);l.sync(m);l.set(m())})})},ready:function(){},dropdownInit:function(){var e=this,d=this.container.find(".dropdown-status"),f=this.params,g=function(h){if(typeof h==="string"&&f.statuses&&f.statuses[h]){d.html(f.statuses[h]).show()}else{d.hide()}};this.container.on("click",".dropdown",function(h){h.preventDefault();e.container.toggleClass("open")});this.setting.bind(g);g(this.setting())}});b.ColorControl=b.Control.extend({ready:function(){var g=this,f,e,d,h,i;f=/^#([A-Fa-f0-9]{3}){0,2}$/;e=this.container.find(".dropdown-content");d=new b.Element(this.container.find(".color-picker-hex"));i=function(j){e.css("background",j);g.farbtastic.setColor(j)};this.farbtastic=c.farbtastic(this.container.find(".farbtastic-placeholder"),g.setting.set);d.sync(this.setting).validate=function(j){return f.test(j)?j:null};this.setting.bind(i);i(this.setting());this.dropdownInit()}});b.UploadControl=b.Control.extend({ready:function(){var d=this;this.params.removed=this.params.removed||"";this.success=c.proxy(this.success,this);this.uploader=c.extend({container:this.container,browser:this.container.find(".upload"),dropzone:this.container.find(".upload-dropzone"),success:this.success},this.uploader||{});if(this.uploader.supported){if(d.params.context){d.uploader.param("post_data[context]",this.params.context)}d.uploader.param("post_data[theme]",b.settings.theme.stylesheet)}this.uploader=new wp.Uploader(this.uploader);this.remover=this.container.find(".remove");this.remover.click(function(e){d.setting.set(d.params.removed);e.preventDefault()});this.removerVisibility=c.proxy(this.removerVisibility,this);this.setting.bind(this.removerVisibility);this.removerVisibility(this.setting.get())},success:function(d){this.setting.set(d.url)},removerVisibility:function(d){this.remover.toggle(d!=this.params.removed)}});b.ImageControl=b.UploadControl.extend({ready:function(){var e=this,d;this.uploader={init:function(f){var h,g;if(this.supports.dragdrop){return}h=e.container.find(".upload-fallback");g=h.children().detach();this.browser.detach().empty().append(g);h.append(this.browser).show()}};b.UploadControl.prototype.ready.call(this);this.thumbnail=this.container.find(".preview-thumbnail img");this.thumbnailSrc=c.proxy(this.thumbnailSrc,this);this.setting.bind(this.thumbnailSrc);this.library=this.container.find(".library");this.tabs={};d=this.library.find(".library-content");this.library.children("ul").children("li").each(function(){var g=c(this),h=g.data("customizeTab"),f=d.filter('[data-customize-tab="'+h+'"]');e.tabs[h]={both:g.add(f),link:g,panel:f}});this.selected=this.tabs[d.first().data("customizeTab")];this.selected.both.addClass("library-selected");this.library.children("ul").on("click","li",function(g){var h=c(this).data("customizeTab"),f=e.tabs[h];g.preventDefault();if(f.link.hasClass("library-selected")){return}e.selected.both.removeClass("library-selected");e.selected=f;e.selected.both.addClass("library-selected")});this.library.on("click","a",function(f){var g=c(this).data("customizeImageValue");if(g){e.setting.set(g);f.preventDefault()}});if(this.tabs.uploaded){this.tabs.uploaded.target=this.library.find(".uploaded-target");if(!this.tabs.uploaded.panel.find(".thumbnail").length){this.tabs.uploaded.both.addClass("hidden")}}this.dropdownInit()},success:function(d){b.UploadControl.prototype.success.call(this,d);if(this.tabs.uploaded&&this.tabs.uploaded.target.length){this.tabs.uploaded.both.removeClass("hidden");d.element=c('').data("customizeImageValue",d.url).append('').appendTo(this.tabs.uploaded.target)}},thumbnailSrc:function(d){if(/^(https?:)?\/\//.test(d)){this.thumbnail.prop("src",d).show()}else{this.thumbnail.hide()}}});b.defaultConstructor=b.Setting;b.control=new b.Values({defaultConstructor:b.Control});b.PreviewFrame=b.Messenger.extend({sensitivity:2000,initialize:function(g,f){var e=c.Deferred(),d=this;e.promise(this);this.container=g.container;this.signature=g.signature;c.extend(g,{channel:b.PreviewFrame.uuid()});b.Messenger.prototype.initialize.call(this,g,f);this.add("previewUrl",g.previewUrl);this.query=c.extend(g.query||{},{customize_messenger_channel:this.channel()});this.run(e)},run:function(e){var d=this,f=false,g=false;if(this._ready){this.unbind("ready",this._ready)}this._ready=function(){g=true;if(f){e.resolveWith(d)}};this.bind("ready",this._ready);this.request=c.ajax(this.previewUrl(),{type:"POST",data:this.query,xhrFields:{withCredentials:true}});this.request.fail(function(){e.rejectWith(d,["request failure"])});this.request.done(function(j){var i=d.request.getResponseHeader("Location"),h=d.signature,k;if(i&&i!=d.previewUrl()){e.rejectWith(d,["redirect",i]);return}if("0"===j){d.login(e);return}if("-1"===j){e.rejectWith(d,["cheatin"]);return}k=j.lastIndexOf(h);if(-1===k||k")){e.rejectWith(d,["unsigned"]);return}j=j.slice(0,k)+j.slice(k+h.length);d.iframe=c("