]> scripts.mit.edu Git - autoinstalls/wordpress.git/commitdiff
WordPress 3.7.1 wordpress-3.7.1
authorEdward Z. Yang <ezyang@cs.stanford.edu>
Sun, 8 Dec 2013 01:05:09 +0000 (17:05 -0800)
committerEdward Z. Yang <ezyang@cs.stanford.edu>
Sun, 8 Dec 2013 01:05:09 +0000 (17:05 -0800)
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
22 files changed:
wp-admin/about.php
wp-admin/credits.php
wp-admin/freedoms.php
wp-admin/includes/class-wp-upgrader.php
wp-admin/includes/plugin-install.php
wp-admin/includes/theme.php
wp-admin/includes/update-core.php
wp-admin/includes/update.php
wp-admin/update-core.php
wp-includes/category-template.php
wp-includes/default-constants.php
wp-includes/js/tinymce/plugins/wpeditimage/editor_plugin.js
wp-includes/js/tinymce/plugins/wpeditimage/editor_plugin_src.js
wp-includes/js/tinymce/wp-tinymce.js.gz
wp-includes/l10n.php
wp-includes/option.php
wp-includes/post.php
wp-includes/query.php
wp-includes/taxonomy.php
wp-includes/update.php
wp-includes/user.php
wp-includes/version.php

index a694fe54e71af3f9cfa5ea1887e0ca04c4fd81de..c0ef6c60361e93504b5dd0b69c01a8dc782e90f1 100644 (file)
@@ -21,7 +21,7 @@ include( ABSPATH . 'wp-admin/admin-header.php' );
 
 <h1><?php printf( __( 'Welcome to WordPress %s' ), $display_version ); ?></h1>
 
 
 <h1><?php printf( __( 'Welcome to WordPress %s' ), $display_version ); ?></h1>
 
-<div class="about-text"><?php printf( __( 'Thank you for updating to WordPress 3.7! You might not notice a thing, and we&#8217;re okay with that.' ), $display_version ); ?></div>
+<div class="about-text"><?php echo str_replace( '3.7', $display_version, __( 'Thank you for updating to WordPress 3.7! You might not notice a thing, and we&#8217;re okay with that.' ) ); ?></div>
 
 <div class="wp-badge"><?php printf( __( 'Version %s' ), $display_version ); ?></div>
 
 
 <div class="wp-badge"><?php printf( __( 'Version %s' ), $display_version ); ?></div>
 
@@ -35,6 +35,14 @@ include( ABSPATH . 'wp-admin/admin-header.php' );
        </a>
 </h2>
 
        </a>
 </h2>
 
+<div class="changelog point-releases">
+       <h3><?php echo _n( 'Maintenance Release', 'Maintenance Releases', 1 ); ?></h3>
+       <p><?php printf( _n( '<strong>Version %1$s</strong> addressed %2$s bug.',
+               '<strong>Version %1$s</strong> addressed %2$s bugs.', 11 ), '3.7.1', number_format_i18n( 11 ) ); ?>
+               <?php printf( __( 'For more information, see <a href="%s">the release notes</a>.' ), 'http://codex.wordpress.org/Version_3.7.1' ); ?>
+       </p>
+</div>
+
 <div class="changelog">
        <h3><?php _e( 'Background Updates' ); ?></h3>
 
 <div class="changelog">
        <h3><?php _e( 'Background Updates' ); ?></h3>
 
@@ -61,7 +69,7 @@ include( ABSPATH . 'wp-admin/admin-header.php' );
                        );
                        require_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php';
                        $updater = new WP_Automatic_Updater;
                        );
                        require_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php';
                        $updater = new WP_Automatic_Updater;
-                       $can_auto_update = wp_http_supports( 'ssl' ) && $updater->should_update( 'core', $future_minor_update, ABSPATH );
+                       $can_auto_update = wp_http_supports( array( 'ssl' ) ) && $updater->should_update( 'core', $future_minor_update, ABSPATH );
 
                        if ( $can_auto_update ) {
                                echo '<p class="about-auto-update cool">' . __( 'This site <strong>is</strong> able to apply these updates automatically. Cool!' ). '</p>';
 
                        if ( $can_auto_update ) {
                                echo '<p class="about-auto-update cool">' . __( 'This site <strong>is</strong> able to apply these updates automatically. Cool!' ). '</p>';
index 059adc7c4f81c0914a768aed00397d66da0fb134..06fe44b716cb591b97551aae0bac575609ddbabf 100644 (file)
@@ -81,7 +81,7 @@ include( ABSPATH . 'wp-admin/admin-header.php' );
 
 <h1><?php printf( __( 'Welcome to WordPress %s' ), $display_version ); ?></h1>
 
 
 <h1><?php printf( __( 'Welcome to WordPress %s' ), $display_version ); ?></h1>
 
-<div class="about-text"><?php printf( __( 'Thank you for updating to WordPress 3.7! You might not notice a thing, and we&#8217;re okay with that.' ), $display_version ); ?></div>
+<div class="about-text"><?php echo str_replace( '3.7', $display_version, __( 'Thank you for updating to WordPress 3.7! You might not notice a thing, and we&#8217;re okay with that.' ) ); ?></div>
 
 <div class="wp-badge"><?php printf( __( 'Version %s' ), $display_version ); ?></div>
 
 
 <div class="wp-badge"><?php printf( __( 'Version %s' ), $display_version ); ?></div>
 
index 2f8fce4f5b6fda16dc93972bf20a0c11bb5b1645..672323cc94a5938e56e4caea2fdae0b5ce498f4f 100644 (file)
@@ -19,7 +19,7 @@ include( ABSPATH . 'wp-admin/admin-header.php' );
 
 <h1><?php printf( __( 'Welcome to WordPress %s' ), $display_version ); ?></h1>
 
 
 <h1><?php printf( __( 'Welcome to WordPress %s' ), $display_version ); ?></h1>
 
-<div class="about-text"><?php printf( __( 'Thank you for updating to WordPress 3.7! You might not notice a thing, and we&#8217;re okay with that.' ), $display_version ); ?></div>
+<div class="about-text"><?php echo str_replace( '3.7', $display_version, __( 'Thank you for updating to WordPress 3.7! You might not notice a thing, and we&#8217;re okay with that.' ) ); ?></div>
 
 <div class="wp-badge"><?php printf( __( 'Version %s' ), $display_version ); ?></div>
 
 
 <div class="wp-badge"><?php printf( __( 'Version %s' ), $display_version ); ?></div>
 
index 891a4e8953b33157762a53ec1ee8a7fc9a0cbe52..90b9658d573f4d81bcb3586707d2f3e843c49082 100644 (file)
@@ -2135,7 +2135,7 @@ class WP_Automatic_Updater {
                // If the update transient is empty, use the update we just performed
                if ( ! $next_user_core_update )
                        $next_user_core_update = $core_update;
                // If the update transient is empty, use the update we just performed
                if ( ! $next_user_core_update )
                        $next_user_core_update = $core_update;
-               $newer_version_available = ( 'upgrade' == $next_user_core_update->response && version_compare( $next_user_core_update->version, $core_update, '>' ) );
+               $newer_version_available = ( 'upgrade' == $next_user_core_update->response && version_compare( $next_user_core_update->version, $core_update->version, '>' ) );
 
                /**
                 * Filter whether to send an email following an automatic background core update.
 
                /**
                 * Filter whether to send an email following an automatic background core update.
index 7f1e0f2c62b4e6a154705da1f1ec4cf8d7c139fa..58a9e9bab70e6468871ae19ba9c7a91c1ce7e1a2 100644 (file)
@@ -60,17 +60,23 @@ function plugins_api($action, $args = null) {
        $res = apply_filters( 'plugins_api', false, $action, $args );
 
        if ( false === $res ) {
        $res = apply_filters( 'plugins_api', false, $action, $args );
 
        if ( false === $res ) {
-               $url = 'http://api.wordpress.org/plugins/info/1.0/';
-               if ( wp_http_supports( array( 'ssl' ) ) )
+               $url = $http_url = 'http://api.wordpress.org/plugins/info/1.0/';
+               if ( $ssl = wp_http_supports( array( 'ssl' ) ) )
                        $url = set_url_scheme( $url, 'https' );
 
                        $url = set_url_scheme( $url, 'https' );
 
-               $request = wp_remote_post( $url, array(
+               $args = array(
                        'timeout' => 15,
                        'body' => array(
                                'action' => $action,
                                'request' => serialize( $args )
                        )
                        'timeout' => 15,
                        'body' => array(
                                'action' => $action,
                                'request' => serialize( $args )
                        )
-               ) );
+               );
+               $request = wp_remote_post( $url, $args );
+
+               if ( $ssl && is_wp_error( $request ) ) {
+                       trigger_error( __( 'An unexpected error occurred. Something may be wrong with WordPress.org or this server&#8217;s configuration. If you continue to have problems, please try the <a href="http://wordpress.org/support/">support forums</a>.' ) . ' ' . '(WordPress could not establish a secure connection to WordPress.org. Please contact your server administrator.)', headers_sent() || WP_DEBUG ? E_USER_WARNING : E_USER_NOTICE );
+                       $request = wp_remote_post( $http_url, $args );
+               }
 
                if ( is_wp_error($request) ) {
                        $res = new WP_Error('plugins_api_failed', __( 'An unexpected error occurred. Something may be wrong with WordPress.org or this server&#8217;s configuration. If you continue to have problems, please try the <a href="http://wordpress.org/support/">support forums</a>.' ), $request->get_error_message() );
 
                if ( is_wp_error($request) ) {
                        $res = new WP_Error('plugins_api_failed', __( 'An unexpected error occurred. Something may be wrong with WordPress.org or this server&#8217;s configuration. If you continue to have problems, please try the <a href="http://wordpress.org/support/">support forums</a>.' ), $request->get_error_message() );
index 0e48bac8876e29c3ec23aed3135a38cc864d765d..9ea69f2faa909a89becb783f49a516f1e96902bf 100644 (file)
@@ -282,16 +282,22 @@ function themes_api($action, $args = null) {
        $res = apply_filters('themes_api', false, $action, $args); //NOTE: Allows a theme to completely override the builtin WordPress.org API.
 
        if ( ! $res ) {
        $res = apply_filters('themes_api', false, $action, $args); //NOTE: Allows a theme to completely override the builtin WordPress.org API.
 
        if ( ! $res ) {
-               $url = 'http://api.wordpress.org/themes/info/1.0/';
-               if ( wp_http_supports( array( 'ssl' ) ) )
+               $url = $http_url = 'http://api.wordpress.org/themes/info/1.0/';
+               if ( $ssl = wp_http_supports( array( 'ssl' ) ) )
                        $url = set_url_scheme( $url, 'https' );
 
                        $url = set_url_scheme( $url, 'https' );
 
-               $request = wp_remote_post( $url, array(
+               $args = array(
                        'body' => array(
                                'action' => $action,
                                'request' => serialize( $args )
                        )
                        'body' => array(
                                'action' => $action,
                                'request' => serialize( $args )
                        )
-               ) );
+               );
+               $request = wp_remote_post( $url, $args );
+
+               if ( $ssl && is_wp_error( $request ) ) {
+                       trigger_error( __( 'An unexpected error occurred. Something may be wrong with WordPress.org or this server&#8217;s configuration. If you continue to have problems, please try the <a href="http://wordpress.org/support/">support forums</a>.' ) . ' ' . '(WordPress could not establish a secure connection to WordPress.org. Please contact your server administrator.)', headers_sent() || WP_DEBUG ? E_USER_WARNING : E_USER_NOTICE );
+                       $request = wp_remote_post( $http_url, $args );
+               }
 
                if ( is_wp_error($request) ) {
                        $res = new WP_Error('themes_api_failed', __( 'An unexpected error occurred. Something may be wrong with WordPress.org or this server&#8217;s configuration. If you continue to have problems, please try the <a href="http://wordpress.org/support/">support forums</a>.' ), $request->get_error_message() );
 
                if ( is_wp_error($request) ) {
                        $res = new WP_Error('themes_api_failed', __( 'An unexpected error occurred. Something may be wrong with WordPress.org or this server&#8217;s configuration. If you continue to have problems, please try the <a href="http://wordpress.org/support/">support forums</a>.' ), $request->get_error_message() );
index 52ef1fd4498e2a946017883ffba556fb14bf8515..b841268b5ee3e8bd313154597262d62dfd5fe429 100644 (file)
@@ -750,7 +750,7 @@ function update_core($from, $to) {
        // Check to make sure everything copied correctly, ignoring the contents of wp-content
        $skip = array( 'wp-content' );
        $failed = array();
        // Check to make sure everything copied correctly, ignoring the contents of wp-content
        $skip = array( 'wp-content' );
        $failed = array();
-       if ( is_array( $checksums ) ) {
+       if ( isset( $checksums ) && is_array( $checksums ) ) {
                foreach ( $checksums as $file => $checksum ) {
                        if ( 0 === strpos( $file, 'wp-content' ) )
                                continue;
                foreach ( $checksums as $file => $checksum ) {
                        if ( 0 === strpos( $file, 'wp-content' ) )
                                continue;
index 147ce4a10f4b06ec4efadc81b659e988450891e1..feafd94b8759c5112b19e1f42c18d83ff32f9d68 100644 (file)
@@ -103,9 +103,9 @@ function find_core_auto_update() {
 function get_core_checksums( $version, $locale ) {
        $return = array();
 
 function get_core_checksums( $version, $locale ) {
        $return = array();
 
-       $url = 'http://api.wordpress.org/core/checksums/1.0/?' . http_build_query( compact( 'version', 'locale' ), null, '&' );
+       $url = $http_url = 'http://api.wordpress.org/core/checksums/1.0/?' . http_build_query( compact( 'version', 'locale' ), null, '&' );
 
 
-       if ( wp_http_supports( array( 'ssl' ) ) )
+       if ( $ssl = wp_http_supports( array( 'ssl' ) ) )
                $url = set_url_scheme( $url, 'https' );
 
        $options = array(
                $url = set_url_scheme( $url, 'https' );
 
        $options = array(
@@ -113,6 +113,10 @@ function get_core_checksums( $version, $locale ) {
        );
 
        $response = wp_remote_get( $url, $options );
        );
 
        $response = wp_remote_get( $url, $options );
+       if ( $ssl && is_wp_error( $response ) ) {
+               trigger_error( __( 'An unexpected error occurred. Something may be wrong with WordPress.org or this server&#8217;s configuration. If you continue to have problems, please try the <a href="http://wordpress.org/support/">support forums</a>.' ) . ' ' . '(WordPress could not establish a secure connection to WordPress.org. Please contact your server administrator.)', headers_sent() || WP_DEBUG ? E_USER_WARNING : E_USER_NOTICE );
+               $response = wp_remote_get( $http_url, $options );
+       }
 
        if ( is_wp_error( $response ) || 200 != wp_remote_retrieve_response_code( $response ) )
                return false;
 
        if ( is_wp_error( $response ) || 200 != wp_remote_retrieve_response_code( $response ) )
                return false;
index 99887d3607d513ba26528b2016f74162412edcaa..3a17482c56d8fc3c8cbec9b99e9d2ccd20603c3f 100644 (file)
@@ -146,7 +146,7 @@ function core_upgrade_preamble() {
                echo '<h3>';
                _e('You have the latest version of WordPress.');
 
                echo '<h3>';
                _e('You have the latest version of WordPress.');
 
-               if ( wp_http_supports( 'ssl' ) ) {
+               if ( wp_http_supports( array( 'ssl' ) ) ) {
                        require_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php';
                        $upgrader = new WP_Automatic_Updater;
                        $future_minor_update = (object) array(
                        require_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php';
                        $upgrader = new WP_Automatic_Updater;
                        $future_minor_update = (object) array(
index 27b8bf221ff9f1ca58cd6eb9f4f5ac0e56fd1c13..57f7cb9ada00745255b6701a67efa00bb2b5d60e 100644 (file)
@@ -232,6 +232,9 @@ function get_the_category_list( $separator = '', $parents='', $post_id = false )
  * @return bool True if the current post is in any of the given categories.
  */
 function in_category( $category, $post = null ) {
  * @return bool True if the current post is in any of the given categories.
  */
 function in_category( $category, $post = null ) {
+       if ( empty( $category ) )
+               return false;
+
        return has_category( $category, $post );
 }
 
        return has_category( $category, $post );
 }
 
index bc6c79a80b382dfa3b6e0424a93872bab789e1f2..7326d6c8499db6c24c5575ef263505db271bc89a 100644 (file)
@@ -42,10 +42,10 @@ function wp_initial_constants() {
        if ( function_exists( 'memory_get_usage' ) ) {
                $current_limit = @ini_get( 'memory_limit' );
                $current_limit_int = intval( $current_limit );
        if ( function_exists( 'memory_get_usage' ) ) {
                $current_limit = @ini_get( 'memory_limit' );
                $current_limit_int = intval( $current_limit );
-               if ( false !== stripos( $current_limit, 'G' ) )
+               if ( false !== strpos( $current_limit, 'G' ) )
                        $current_limit_int *= 1024;
                $wp_limit_int = intval( WP_MEMORY_LIMIT );
                        $current_limit_int *= 1024;
                $wp_limit_int = intval( WP_MEMORY_LIMIT );
-               if ( false !== stripos( WP_MEMORY_LIMIT, 'G' ) )
+               if ( false !== strpos( WP_MEMORY_LIMIT, 'G' ) )
                        $wp_limit_int *= 1024;
 
                if ( -1 != $current_limit && ( -1 == WP_MEMORY_LIMIT || $current_limit_int < $wp_limit_int ) )
                        $wp_limit_int *= 1024;
 
                if ( -1 != $current_limit && ( -1 == WP_MEMORY_LIMIT || $current_limit_int < $wp_limit_int ) )
index 4884c021ad0aba274d4bece22149de9b275db2df..240d567c2de6c53178f9bcde4a9fd42b1d6321f3 100644 (file)
@@ -1 +1 @@
-!function(){tinymce.create("tinymce.plugins.wpEditImage",{url:"",editor:{},init:function(a,b){var c=this,d={};c.url=b,c.editor=a,c._createButtons(),a.addCommand("WP_EditImage",c._editImage),a.onInit.add(function(a){a.dom.events.add(a.getBody(),"mousedown",function(b){var c;"IMG"==b.target.nodeName&&(c=a.dom.getParent(b.target,"div.mceTemp"))&&(tinymce.isGecko?a.selection.select(c):tinymce.isWebKit&&a.dom.events.prevent(b))}),a.dom.events.add(a.getBody(),"keydown",function(b){var c,d,e,f;return 13==b.keyCode&&(c=a.selection.getNode(),d=a.dom.getParent(c,"dl.wp-caption"),d&&(e=a.dom.getParent(d,"div.mceTemp")),e)?(a.dom.events.cancel(b),f=a.dom.create("p",{},""),a.dom.insertAfter(f,e),a.selection.setCursorLocation(f,0),!1):void 0}),"ontouchstart"in window&&a.dom.events.add(a.getBody(),"touchstart",function(a){c._showButtons(a)})}),a.onMouseUp.add(function(a,b){if(!tinymce.isWebKit&&!tinymce.isOpera){if(d.x&&(b.clientX!=d.x||b.clientY!=d.y)){var c=a.selection.getNode();"IMG"==c.nodeName&&window.setTimeout(function(){var b,e=a.dom.getParent(c,"dl.wp-caption");(c.width!=d.img_w||c.height!=d.img_h)&&(c.className=c.className.replace(/size-[^ "']+/,"")),e&&(b=a.dom.getAttrib(c,"width")||c.width,b=parseInt(b,10),a.dom.setStyle(e,"width",10+b),a.execCommand("mceRepaint"))},100)}d={}}}),a.onMouseDown.add(function(a,b){c._showButtons(b)}),a.onBeforeSetContent.add(function(a,b){b.content=a.wpSetImgCaption(b.content)}),a.onPostProcess.add(function(a,b){b.get&&(b.content=a.wpGetImgCaption(b.content))}),a.wpSetImgCaption=function(a){return c._do_shcode(a)},a.wpGetImgCaption=function(a){return c._get_shcode(a)},a.onBeforeExecCommand.add(function(a,b){var c,d;if("mceInsertContent"==b){if(c=a.dom.getParent(a.selection.getNode(),"div.mceTemp"),!c)return;d=a.dom.create("p"),a.dom.insertAfter(d,c),a.selection.setCursorLocation(d,0)}})},_do_shcode:function(a){return a.replace(/(?:<p>)?\[(?:wp_)?caption([^\]]+)\]([\s\S]+?)\[\/(?:wp_)?caption\](?:<\/p>)?/g,function(a,b,c){var d,e,f,g,h,i,j=tinymce.trim;return d=b.match(/id=['"]([^'"]*)['"] ?/),d&&(b=b.replace(d[0],"")),e=b.match(/align=['"]([^'"]*)['"] ?/),e&&(b=b.replace(e[0],"")),f=b.match(/width=['"]([0-9]*)['"] ?/),f&&(b=b.replace(f[0],"")),c=j(c),i=c.match(/((?:<a [^>]+>)?<img [^>]+>(?:<\/a>)?)([\s\S]*)/i),i&&i[2]?(g=j(i[2]),i=j(i[1])):(g=j(b).replace(/caption=['"]/,"").replace(/['"]$/,""),i=c),d=d&&d[1]?d[1]:"",e=e&&e[1]?e[1]:"alignnone",f=f&&f[1]?f[1]:"",f&&g?(h="mceTemp","aligncenter"==e&&(h+=" mceIEcenter"),'<div class="'+h+'"><dl id="'+d+'" class="wp-caption '+e+'" style="width: 10'+parseInt(f)+'px"><dt class="wp-caption-dt">'+i+'</dt><dd class="wp-caption-dd">'+g+"</dd></dl></div>"):c})},_get_shcode:function(a){return a.replace(/<div (?:id="attachment_|class="mceTemp)[^>]*>([\s\S]+?)<\/div>/g,function(a,b){var c=b.replace(/<dl ([^>]+)>\s*<dt [^>]+>([\s\S]+?)<\/dt>\s*<dd [^>]+>([\s\S]*?)<\/dd>\s*<\/dl>/gi,function(a,b,c,d){var e,f,g;return g=c.match(/width="([0-9]*)"/),g=g&&g[1]?g[1]:"",g&&d?(e=b.match(/id="([^"]*)"/),e=e&&e[1]?e[1]:"",f=b.match(/class="([^"]*)"/),f=f&&f[1]?f[1]:"",f=f.match(/align[a-z]+/)||"alignnone",d=d.replace(/\r\n|\r/g,"\n").replace(/<[a-zA-Z0-9]+( [^<>]+)?>/g,function(a){return a.replace(/[\r\n\t]+/," ")}),d=d.replace(/\s*\n\s*/g,"<br />"),'[caption id="'+e+'" align="'+f+'" width="'+g+'"]'+c+" "+d+"[/caption]"):c});return 0!==c.indexOf("[caption")&&(c=b.replace(/[\s\S]*?((?:<a [^>]+>)?<img [^>]+>(?:<\/a>)?)(<p>[\s\S]*<\/p>)?[\s\S]*/gi,"<p>$1</p>$2")),c})},_createButtons:function(){var a,b,c,d=this,e=tinymce.activeEditor,f=tinymce.DOM;f.get("wp_editbtns")||(c=window.devicePixelRatio&&window.devicePixelRatio>1||window.matchMedia&&window.matchMedia("(min-resolution:130dpi)").matches,f.add(document.body,"div",{id:"wp_editbtns",style:"display:none;"}),a=f.add("wp_editbtns","img",{src:c?d.url+"/img/image-2x.png":d.url+"/img/image.png",id:"wp_editimgbtn",width:"24",height:"24",title:e.getLang("wpeditimage.edit_img")}),tinymce.dom.Event.add(a,"mousedown",function(){d._editImage(),e.plugins.wordpress._hideButtons()}),b=f.add("wp_editbtns","img",{src:c?d.url+"/img/delete-2x.png":d.url+"/img/delete.png",id:"wp_delimgbtn",width:"24",height:"24",title:e.getLang("wpeditimage.del_img")}),tinymce.dom.Event.add(b,"mousedown",function(){var a,b=tinymce.activeEditor,c=b.selection.getNode();return"IMG"==c.nodeName&&-1==b.dom.getAttrib(c,"class").indexOf("mceItem")?((a=b.dom.getParent(c,"div"))&&b.dom.hasClass(a,"mceTemp")?b.dom.remove(a):("A"==c.parentNode.nodeName&&1==c.parentNode.childNodes.length&&(c=c.parentNode),"P"==c.parentNode.nodeName&&1==c.parentNode.childNodes.length&&(c=c.parentNode),b.dom.remove(c)),b.execCommand("mceRepaint"),!1):(b.plugins.wordpress._hideButtons(),void 0)}))},_editImage:function(){var a,b,c,d=tinymce.activeEditor,e=this.url,f=d.selection.getNode(),g=f.className;-1==g.indexOf("mceItem")&&-1==g.indexOf("wpGallery")&&"IMG"==f.nodeName&&(a=tinymce.DOM.getViewPort(),b=680<a.h-70?680:a.h-70,c=650<a.w?650:a.w,d.windowManager.open({file:e+"/editimage.html",width:c+"px",height:b+"px",inline:!0}))},_showButtons:function(a){var b=this.editor,c=a.target;if("IMG"!=c.nodeName){if(!c.firstChild||"IMG"!=c.firstChild.nodeName||1!=c.childNodes.length)return b.plugins.wordpress._hideButtons(),void 0;c=c.firstChild}-1==b.dom.getAttrib(c,"class").indexOf("mceItem")&&(mouse={x:a.clientX,y:a.clientY,img_w:c.clientWidth,img_h:c.clientHeight},"touchstart"==a.type&&(b.selection.select(c),b.dom.events.cancel(a)),b.plugins.wordpress._hideButtons(),b.plugins.wordpress._showButtons(c,"wp_editbtns"))},getInfo:function(){return{longname:"Edit Image",author:"WordPress",authorurl:"http://wordpress.org",infourl:"",version:"1.0"}}}),tinymce.PluginManager.add("wpeditimage",tinymce.plugins.wpEditImage)}();
\ No newline at end of file
+!function(){tinymce.create("tinymce.plugins.wpEditImage",{url:"",editor:{},init:function(a,b){var c=this,d={};c.url=b,c.editor=a,c._createButtons(),a.addCommand("WP_EditImage",c._editImage),a.onInit.add(function(a){a.dom.events.add(a.getBody(),"mousedown",function(b){var c;"IMG"==b.target.nodeName&&(c=a.dom.getParent(b.target,"div.mceTemp"))&&(tinymce.isGecko?a.selection.select(c):tinymce.isWebKit&&a.dom.events.prevent(b))}),a.dom.events.add(a.getBody(),"keydown",function(b){var c,d,e,f;return 13==b.keyCode&&(c=a.selection.getNode(),d=a.dom.getParent(c,"dl.wp-caption"),d&&(e=a.dom.getParent(d,"div.mceTemp")),e)?(a.dom.events.cancel(b),f=a.dom.create("p",{},""),a.dom.insertAfter(f,e),a.selection.setCursorLocation(f,0),!1):void 0}),"ontouchstart"in window&&a.dom.events.add(a.getBody(),"touchstart",function(a){c._showButtons(a)})}),a.onMouseUp.add(function(a,b){if(!tinymce.isWebKit&&!tinymce.isOpera){if(d.x&&(b.clientX!=d.x||b.clientY!=d.y)){var c=a.selection.getNode();"IMG"==c.nodeName&&window.setTimeout(function(){var b,e=a.dom.getParent(c,"dl.wp-caption");(c.width!=d.img_w||c.height!=d.img_h)&&(c.className=c.className.replace(/size-[^ "']+/,"")),e&&(b=a.dom.getAttrib(c,"width")||c.width,b=parseInt(b,10),a.dom.setStyle(e,"width",10+b),a.execCommand("mceRepaint"))},100)}d={}}}),a.onMouseDown.add(function(a,b){c._showButtons(b)}),a.onBeforeSetContent.add(function(a,b){b.content=a.wpSetImgCaption(b.content)}),a.onPostProcess.add(function(a,b){b.get&&(b.content=a.wpGetImgCaption(b.content))}),a.wpSetImgCaption=function(a){return c._do_shcode(a)},a.wpGetImgCaption=function(a){return c._get_shcode(a)},a.onBeforeExecCommand.add(function(a,b){var c,d;if("mceInsertContent"==b){if(c=a.dom.getParent(a.selection.getNode(),"div.mceTemp"),!c)return;d=a.dom.create("p"),a.dom.insertAfter(d,c),a.selection.setCursorLocation(d,0)}})},_do_shcode:function(a){return a.replace(/(?:<p>)?\[(?:wp_)?caption([^\]]+)\]([\s\S]+?)\[\/(?:wp_)?caption\](?:<\/p>)?/g,function(a,b,c){var d,e,f,g,h,i,j=tinymce.trim;return d=b.match(/id=['"]([^'"]*)['"] ?/),d&&(b=b.replace(d[0],"")),e=b.match(/align=['"]([^'"]*)['"] ?/),e&&(b=b.replace(e[0],"")),f=b.match(/width=['"]([0-9]*)['"] ?/),f&&(b=b.replace(f[0],"")),c=j(c),i=c.match(/((?:<a [^>]+>)?<img [^>]+>(?:<\/a>)?)([\s\S]*)/i),i&&i[2]?(g=j(i[2]),i=j(i[1])):(g=j(b).replace(/caption=['"]/,"").replace(/['"]$/,""),i=c),d=d&&d[1]?d[1]:"",e=e&&e[1]?e[1]:"alignnone",f=f&&f[1]?f[1]:"",f&&g?(h="mceTemp","aligncenter"==e&&(h+=" mceIEcenter"),f=parseInt(f,10)+10,'<div class="'+h+'"><dl id="'+d+'" class="wp-caption '+e+'" style="width: '+f+'px"><dt class="wp-caption-dt">'+i+'</dt><dd class="wp-caption-dd">'+g+"</dd></dl></div>"):c})},_get_shcode:function(a){return a.replace(/<div (?:id="attachment_|class="mceTemp)[^>]*>([\s\S]+?)<\/div>/g,function(a,b){var c=b.replace(/<dl ([^>]+)>\s*<dt [^>]+>([\s\S]+?)<\/dt>\s*<dd [^>]+>([\s\S]*?)<\/dd>\s*<\/dl>/gi,function(a,b,c,d){var e,f,g;return g=c.match(/width="([0-9]*)"/),g=g&&g[1]?g[1]:"",g&&d?(e=b.match(/id="([^"]*)"/),e=e&&e[1]?e[1]:"",f=b.match(/class="([^"]*)"/),f=f&&f[1]?f[1]:"",f=f.match(/align[a-z]+/)||"alignnone",d=d.replace(/\r\n|\r/g,"\n").replace(/<[a-zA-Z0-9]+( [^<>]+)?>/g,function(a){return a.replace(/[\r\n\t]+/," ")}),d=d.replace(/\s*\n\s*/g,"<br />"),'[caption id="'+e+'" align="'+f+'" width="'+g+'"]'+c+" "+d+"[/caption]"):c});return 0!==c.indexOf("[caption")&&(c=b.replace(/[\s\S]*?((?:<a [^>]+>)?<img [^>]+>(?:<\/a>)?)(<p>[\s\S]*<\/p>)?[\s\S]*/gi,"<p>$1</p>$2")),c})},_createButtons:function(){var a,b,c,d=this,e=tinymce.activeEditor,f=tinymce.DOM;f.get("wp_editbtns")||(c=window.devicePixelRatio&&window.devicePixelRatio>1||window.matchMedia&&window.matchMedia("(min-resolution:130dpi)").matches,f.add(document.body,"div",{id:"wp_editbtns",style:"display:none;"}),a=f.add("wp_editbtns","img",{src:c?d.url+"/img/image-2x.png":d.url+"/img/image.png",id:"wp_editimgbtn",width:"24",height:"24",title:e.getLang("wpeditimage.edit_img")}),tinymce.dom.Event.add(a,"mousedown",function(){d._editImage(),e.plugins.wordpress._hideButtons()}),b=f.add("wp_editbtns","img",{src:c?d.url+"/img/delete-2x.png":d.url+"/img/delete.png",id:"wp_delimgbtn",width:"24",height:"24",title:e.getLang("wpeditimage.del_img")}),tinymce.dom.Event.add(b,"mousedown",function(){var a,b=tinymce.activeEditor,c=b.selection.getNode();return"IMG"==c.nodeName&&-1==b.dom.getAttrib(c,"class").indexOf("mceItem")?((a=b.dom.getParent(c,"div"))&&b.dom.hasClass(a,"mceTemp")?b.dom.remove(a):("A"==c.parentNode.nodeName&&1==c.parentNode.childNodes.length&&(c=c.parentNode),"P"==c.parentNode.nodeName&&1==c.parentNode.childNodes.length&&(c=c.parentNode),b.dom.remove(c)),b.execCommand("mceRepaint"),!1):(b.plugins.wordpress._hideButtons(),void 0)}))},_editImage:function(){var a,b,c,d=tinymce.activeEditor,e=this.url,f=d.selection.getNode(),g=f.className;-1==g.indexOf("mceItem")&&-1==g.indexOf("wpGallery")&&"IMG"==f.nodeName&&(a=tinymce.DOM.getViewPort(),b=680<a.h-70?680:a.h-70,c=650<a.w?650:a.w,d.windowManager.open({file:e+"/editimage.html",width:c+"px",height:b+"px",inline:!0}))},_showButtons:function(a){var b=this.editor,c=a.target;if("IMG"!=c.nodeName){if(!c.firstChild||"IMG"!=c.firstChild.nodeName||1!=c.childNodes.length)return b.plugins.wordpress._hideButtons(),void 0;c=c.firstChild}-1==b.dom.getAttrib(c,"class").indexOf("mceItem")&&(mouse={x:a.clientX,y:a.clientY,img_w:c.clientWidth,img_h:c.clientHeight},"touchstart"==a.type&&(b.selection.select(c),b.dom.events.cancel(a)),b.plugins.wordpress._hideButtons(),b.plugins.wordpress._showButtons(c,"wp_editbtns"))},getInfo:function(){return{longname:"Edit Image",author:"WordPress",authorurl:"http://wordpress.org",infourl:"",version:"1.0"}}}),tinymce.PluginManager.add("wpeditimage",tinymce.plugins.wpEditImage)}();
\ No newline at end of file
index 17aa30e206b79fc1f71f345ecf2820961229d980..b26ed4a1a762c604f15fc2c0b6bde17d3d106384 100644 (file)
                                if ( cls == 'aligncenter' )
                                        div_cls += ' mceIEcenter';
 
                                if ( cls == 'aligncenter' )
                                        div_cls += ' mceIEcenter';
 
-                               return '<div class="'+div_cls+'"><dl id="'+id+'" class="wp-caption '+cls+'" style="width: '+( 10 + parseInt(w) )+
+                               w = parseInt( w, 10 ) + 10;
+                               return '<div class="'+div_cls+'"><dl id="'+id+'" class="wp-caption '+cls+'" style="width: '+w+
                                'px"><dt class="wp-caption-dt">'+img+'</dt><dd class="wp-caption-dd">'+cap+'</dd></dl></div>';
                        });
                },
                                'px"><dt class="wp-caption-dt">'+img+'</dt><dd class="wp-caption-dd">'+cap+'</dd></dl></div>';
                        });
                },
index 99cab128c1e40034fcb6e0fb25dd89e3c75c442c..d452a54aef976b30efd1411a9b3af2c832856ccc 100644 (file)
Binary files a/wp-includes/js/tinymce/wp-tinymce.js.gz and b/wp-includes/js/tinymce/wp-tinymce.js.gz differ
index 0687ca6b8942e2e9a40671adee0faf37db92e563..cd0ead996dcb78cf3e350dd4661527d8f07d4b65 100644 (file)
@@ -797,9 +797,9 @@ function wp_get_pomo_file_data( $po_file ) {
                'Project-Id-Version' => '"Project-Id-Version',
                'X-Generator'        => '"X-Generator',
        ) );
                'Project-Id-Version' => '"Project-Id-Version',
                'X-Generator'        => '"X-Generator',
        ) );
-       foreach ( $headers as &$header ) {
+       foreach ( $headers as $header => $value ) {
                // Remove possible contextual '\n' and closing double quote.
                // Remove possible contextual '\n' and closing double quote.
-               $header = preg_replace( '~(\\\n)?"$~', '', $header );
+               $headers[ $header ] = preg_replace( '~(\\\n)?"$~', '', $value );
        }
        return $headers;
 }
        }
        return $headers;
 }
index cee2451fdeef067b4fc9f306a8d17283809cade9..6f7a3a6059df8fc289490e063cfdfbe4d2a637f7 100644 (file)
@@ -236,6 +236,7 @@ function update_option( $option, $value ) {
 
        $serialized_value = maybe_serialize( $value );
 
 
        $serialized_value = maybe_serialize( $value );
 
+       do_action( 'update_option', $option, $old_value, $value );
        $result = $wpdb->update( $wpdb->options, array( 'option_value' => $serialized_value ), array( 'option_name' => $option ) );
        if ( ! $result )
                return false;
        $result = $wpdb->update( $wpdb->options, array( 'option_value' => $serialized_value ), array( 'option_name' => $option ) );
        if ( ! $result )
                return false;
@@ -246,7 +247,6 @@ function update_option( $option, $value ) {
                wp_cache_set( 'notoptions', $notoptions, 'options' );
        }
 
                wp_cache_set( 'notoptions', $notoptions, 'options' );
        }
 
-       do_action( 'update_option', $option, $old_value, $value );
        if ( ! defined( 'WP_INSTALLING' ) ) {
                $alloptions = wp_load_alloptions();
                if ( isset( $alloptions[$option] ) ) {
        if ( ! defined( 'WP_INSTALLING' ) ) {
                $alloptions = wp_load_alloptions();
                if ( isset( $alloptions[$option] ) ) {
index 39d71a37c8366b555971d74b1cbe4c12d7cd0709..8770b0dc4f93e7c4e74ab83f13c9b44492d7dcd4 100644 (file)
@@ -3706,7 +3706,7 @@ function get_pages( $args = array() ) {
        if ( !in_array( $post_type, $hierarchical_post_types ) )
                return $pages;
 
        if ( !in_array( $post_type, $hierarchical_post_types ) )
                return $pages;
 
-       if ( $parent && ! $child_of )
+       if ( $parent > 0 && ! $child_of )
                $hierarchical = false;
 
        // Make sure we have a valid post status
                $hierarchical = false;
 
        // Make sure we have a valid post status
index a9300329d19db4fc2e9aaefc277ee15aecef07f5..93d57c2db866ccdcc7531638915782285fe607b6 100644 (file)
@@ -1986,8 +1986,8 @@ class WP_Query {
                        else
                                $term = trim( $term, "\"' " );
 
                        else
                                $term = trim( $term, "\"' " );
 
-                       // \p{L} matches a single letter that is not a Chinese, Japanese, etc. char
-                       if ( ! $term || preg_match( '/^\p{L}$/u', $term ) )
+                       // Avoid single A-Z.
+                       if ( ! $term || ( 1 === strlen( $term ) && preg_match( '/^[a-z]$/i', $term ) ) )
                                continue;
 
                        if ( in_array( call_user_func( $strtolower, $term ), $stopwords, true ) )
                                continue;
 
                        if ( in_array( call_user_func( $strtolower, $term ), $stopwords, true ) )
index c8191fe0b0da756bfec29301548f3950b4126698..4bf48a93d61b74b897dabbb64a4e6da73a187ef1 100644 (file)
@@ -1362,7 +1362,7 @@ function get_terms($taxonomies, $args = '') {
        $exclusions = '';
        if ( ! empty( $exclude_tree ) ) {
                $exclude_tree = wp_parse_id_list( $exclude_tree );
        $exclusions = '';
        if ( ! empty( $exclude_tree ) ) {
                $exclude_tree = wp_parse_id_list( $exclude_tree );
-               $excluded_children = array();
+               $excluded_children = $exclude_tree;
                foreach ( $exclude_tree as $extrunk ) {
                        $excluded_children = array_merge(
                                $excluded_children,
                foreach ( $exclude_tree as $extrunk ) {
                        $excluded_children = array_merge(
                                $excluded_children,
index 9979ae994429d12605f68bd2a738abbb28b5a2ee..bc666fd22508b6bf33e279e7fea49d194a2b0e53 100644 (file)
@@ -93,8 +93,8 @@ function wp_version_check( $extra_stats = array() ) {
        if ( $extra_stats )
                $post_body = array_merge( $post_body, $extra_stats );
 
        if ( $extra_stats )
                $post_body = array_merge( $post_body, $extra_stats );
 
-       $url = 'http://api.wordpress.org/core/version-check/1.7/?' . http_build_query( $query, null, '&' );
-       if ( wp_http_supports( array( 'ssl' ) ) )
+       $url = $http_url = 'http://api.wordpress.org/core/version-check/1.7/?' . http_build_query( $query, null, '&' );
+       if ( $ssl = wp_http_supports( array( 'ssl' ) ) )
                $url = set_url_scheme( $url, 'https' );
 
        $options = array(
                $url = set_url_scheme( $url, 'https' );
 
        $options = array(
@@ -108,6 +108,10 @@ function wp_version_check( $extra_stats = array() ) {
        );
 
        $response = wp_remote_post( $url, $options );
        );
 
        $response = wp_remote_post( $url, $options );
+       if ( $ssl && is_wp_error( $response ) ) {
+               trigger_error( __( 'An unexpected error occurred. Something may be wrong with WordPress.org or this server&#8217;s configuration. If you continue to have problems, please try the <a href="http://wordpress.org/support/">support forums</a>.' ) . ' ' . '(WordPress could not establish a secure connection to WordPress.org. Please contact your server administrator.)', headers_sent() || WP_DEBUG ? E_USER_WARNING : E_USER_NOTICE );
+               $response = wp_remote_post( $http_url, $options );
+       }
 
        if ( is_wp_error( $response ) || 200 != wp_remote_retrieve_response_code( $response ) )
                return false;
 
        if ( is_wp_error( $response ) || 200 != wp_remote_retrieve_response_code( $response ) )
                return false;
@@ -246,11 +250,15 @@ function wp_update_plugins() {
                'user-agent' => 'WordPress/' . $wp_version . '; ' . get_bloginfo( 'url' )
        );
 
                'user-agent' => 'WordPress/' . $wp_version . '; ' . get_bloginfo( 'url' )
        );
 
-       $url = 'http://api.wordpress.org/plugins/update-check/1.1/';
-       if ( wp_http_supports( array( 'ssl' ) ) )
+       $url = $http_url = 'http://api.wordpress.org/plugins/update-check/1.1/';
+       if ( $ssl = wp_http_supports( array( 'ssl' ) ) )
                $url = set_url_scheme( $url, 'https' );
 
        $raw_response = wp_remote_post( $url, $options );
                $url = set_url_scheme( $url, 'https' );
 
        $raw_response = wp_remote_post( $url, $options );
+       if ( $ssl && is_wp_error( $raw_response ) ) {
+               trigger_error( __( 'An unexpected error occurred. Something may be wrong with WordPress.org or this server&#8217;s configuration. If you continue to have problems, please try the <a href="http://wordpress.org/support/">support forums</a>.' ) . ' ' . '(WordPress could not establish a secure connection to WordPress.org. Please contact your server administrator.)', headers_sent() || WP_DEBUG ? E_USER_WARNING : E_USER_NOTICE );
+               $raw_response = wp_remote_post( $http_url, $options );
+       }
 
        if ( is_wp_error( $raw_response ) || 200 != wp_remote_retrieve_response_code( $raw_response ) )
                return false;
 
        if ( is_wp_error( $raw_response ) || 200 != wp_remote_retrieve_response_code( $raw_response ) )
                return false;
@@ -382,11 +390,15 @@ function wp_update_themes() {
                'user-agent'    => 'WordPress/' . $wp_version . '; ' . get_bloginfo( 'url' )
        );
 
                'user-agent'    => 'WordPress/' . $wp_version . '; ' . get_bloginfo( 'url' )
        );
 
-       $url = 'http://api.wordpress.org/themes/update-check/1.1/';
-       if ( wp_http_supports( array( 'ssl' ) ) )
+       $url = $http_url = 'http://api.wordpress.org/themes/update-check/1.1/';
+       if ( $ssl = wp_http_supports( array( 'ssl' ) ) )
                $url = set_url_scheme( $url, 'https' );
 
        $raw_response = wp_remote_post( $url, $options );
                $url = set_url_scheme( $url, 'https' );
 
        $raw_response = wp_remote_post( $url, $options );
+       if ( $ssl && is_wp_error( $raw_response ) ) {
+               trigger_error( __( 'An unexpected error occurred. Something may be wrong with WordPress.org or this server&#8217;s configuration. If you continue to have problems, please try the <a href="http://wordpress.org/support/">support forums</a>.' ) . ' ' . '(WordPress could not establish a secure connection to WordPress.org. Please contact your server administrator.)', headers_sent() || WP_DEBUG ? E_USER_WARNING : E_USER_NOTICE );
+               $raw_response = wp_remote_post( $http_url, $options );
+       }
 
        if ( is_wp_error( $raw_response ) || 200 != wp_remote_retrieve_response_code( $raw_response ) )
                return false;
 
        if ( is_wp_error( $raw_response ) || 200 != wp_remote_retrieve_response_code( $raw_response ) )
                return false;
index 9a60cd206904116e33997625c8754c14fb9a5a2c..a0cb8d815fba9608e802e206a3594a2865a2109d 100644 (file)
@@ -212,6 +212,8 @@ function count_many_users_posts( $users, $post_type = 'post', $public_only = fal
  * @return int The current user's ID
  */
 function get_current_user_id() {
  * @return int The current user's ID
  */
 function get_current_user_id() {
+       if ( ! function_exists( 'wp_get_current_user' ) )
+               return 0;
        $user = wp_get_current_user();
        return ( isset( $user->ID ) ? (int) $user->ID : 0 );
 }
        $user = wp_get_current_user();
        return ( isset( $user->ID ) ? (int) $user->ID : 0 );
 }
index 5d03fc38d2b849d567a5cd87525b59eb7338c749..7aed0355034bff5bb966b7bf1e0c6c940d38fcd7 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @global string $wp_version
  */
  *
  * @global string $wp_version
  */
-$wp_version = '3.7';
+$wp_version = '3.7.1';
 
 /**
  * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
 
 /**
  * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
@@ -18,7 +18,7 @@ $wp_db_version = 25824;
  *
  * @global string $tinymce_version
  */
  *
  * @global string $tinymce_version
  */
-$tinymce_version = '359-20131018';
+$tinymce_version = '359-20131026';
 
 /**
  * Holds the required PHP version
 
 /**
  * Holds the required PHP version