<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’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’re okay with that.' ) ); ?></div>
<div class="wp-badge"><?php printf( __( 'Version %s' ), $display_version ); ?></div>
</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>
);
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>';
<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’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’re okay with that.' ) ); ?></div>
<div class="wp-badge"><?php printf( __( 'Version %s' ), $display_version ); ?></div>
<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’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’re okay with that.' ) ); ?></div>
<div class="wp-badge"><?php printf( __( 'Version %s' ), $display_version ); ?></div>
// 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.
$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' );
- $request = wp_remote_post( $url, array(
+ $args = array(
'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’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’s configuration. If you continue to have problems, please try the <a href="http://wordpress.org/support/">support forums</a>.' ), $request->get_error_message() );
$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' );
- $request = wp_remote_post( $url, array(
+ $args = array(
'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’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’s configuration. If you continue to have problems, please try the <a href="http://wordpress.org/support/">support forums</a>.' ), $request->get_error_message() );
// 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;
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(
);
$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’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;
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(
* @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 );
}
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 );
- 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 ) )
-!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
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>';
});
},
'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.
- $header = preg_replace( '~(\\\n)?"$~', '', $header );
+ $headers[ $header ] = preg_replace( '~(\\\n)?"$~', '', $value );
}
return $headers;
}
$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;
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 ( !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
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 ) )
$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,
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(
);
$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’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;
'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 );
+ if ( $ssl && is_wp_error( $raw_response ) ) {
+ trigger_error( __( 'An unexpected error occurred. Something may be wrong with WordPress.org or this server’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;
'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 );
+ if ( $ssl && is_wp_error( $raw_response ) ) {
+ trigger_error( __( 'An unexpected error occurred. Something may be wrong with WordPress.org or this server’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;
* @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 );
}
*
* @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.
*
* @global string $tinymce_version
*/
-$tinymce_version = '359-20131018';
+$tinymce_version = '359-20131026';
/**
* Holds the required PHP version