From 33caf61b8ba988da73c2e210309566f9fdb039be Mon Sep 17 00:00:00 2001
From: Gary Pendergast
' . __( 'This localized version contains both the translation and various other localization fixes. You can skip upgrading if you want to keep your current translation.' ) . '
'; - } // Partial builds don't need language-specific warnings. - elseif ( 'en_US' == $update->locale && get_locale() != 'en_US' && ( ! $update->packages->partial && $wp_version == $update->partial_version ) ) { + } elseif ( 'en_US' == $update->locale && get_locale() != 'en_US' && ( ! $update->packages->partial && $wp_version == $update->partial_version ) ) { + // Partial builds don't need language-specific warnings. echo '' . sprintf( __( 'You are about to install WordPress %s in English (US). There is a chance this update will break your translation. You may prefer to wait for the localized version to be released.' ), $update->response != 'development' ? $update->current : '' ) . '
'; } echo ''; diff --git a/src/wp-content/themes/twentyfourteen/functions.php b/src/wp-content/themes/twentyfourteen/functions.php index ea32f14e4f..e705a54609 100644 --- a/src/wp-content/themes/twentyfourteen/functions.php +++ b/src/wp-content/themes/twentyfourteen/functions.php @@ -455,8 +455,8 @@ if ( ! function_exists( 'twentyfourteen_the_attached_image' ) ) : // get the URL of the next image attachment... if ( $next_id ) { $next_attachment_url = get_attachment_link( $next_id ); - } // or get the URL of the first image attachment. - else { + } else { + // or get the URL of the first image attachment. $next_attachment_url = get_attachment_link( reset( $attachment_ids ) ); } } diff --git a/src/wp-content/themes/twentythirteen/functions.php b/src/wp-content/themes/twentythirteen/functions.php index 980acfc72e..dd3dec7cea 100644 --- a/src/wp-content/themes/twentythirteen/functions.php +++ b/src/wp-content/themes/twentythirteen/functions.php @@ -587,8 +587,8 @@ if ( ! function_exists( 'twentythirteen_the_attached_image' ) ) : // get the URL of the next image attachment... if ( $next_id ) { $next_attachment_url = get_attachment_link( $next_id ); - } // or get the URL of the first image attachment. - else { + } else { + // or get the URL of the first image attachment. $next_attachment_url = get_attachment_link( reset( $attachment_ids ) ); } } diff --git a/src/wp-includes/class-wp-locale.php b/src/wp-includes/class-wp-locale.php index 287914e880..ee92bee317 100644 --- a/src/wp-includes/class-wp-locale.php +++ b/src/wp-includes/class-wp-locale.php @@ -216,8 +216,9 @@ class WP_Locale { // Set text direction. if ( isset( $GLOBALS['text_direction'] ) ) { $this->text_direction = $GLOBALS['text_direction']; - } /* translators: 'rtl' or 'ltr'. This sets the text direction for WordPress. */ - elseif ( 'rtl' == _x( 'ltr', 'text direction' ) ) { + + /* translators: 'rtl' or 'ltr'. This sets the text direction for WordPress. */ + } elseif ( 'rtl' == _x( 'ltr', 'text direction' ) ) { $this->text_direction = 'rtl'; } diff --git a/src/wp-includes/class-wp-text-diff-renderer-table.php b/src/wp-includes/class-wp-text-diff-renderer-table.php index 530754a930..e1912b9dda 100644 --- a/src/wp-includes/class-wp-text-diff-renderer-table.php +++ b/src/wp-includes/class-wp-text-diff-renderer-table.php @@ -389,8 +389,8 @@ class WP_Text_Diff_Renderer_Table extends Text_Diff_Renderer { // Best match of this final is already taken? Must mean this final is a new row. if ( isset( $orig_matches[ $o ] ) ) { $final_matches[ $f ] = 'x'; - } // Best match of this orig is already taken? Must mean this orig is a deleted row. - elseif ( isset( $final_matches[ $f ] ) ) { + } elseif ( isset( $final_matches[ $f ] ) ) { + // Best match of this orig is already taken? Must mean this orig is a deleted row. $orig_matches[ $o ] = 'x'; } } diff --git a/src/wp-includes/class-wp-xmlrpc-server.php b/src/wp-includes/class-wp-xmlrpc-server.php index a2bf6e4a9a..923a98884f 100644 --- a/src/wp-includes/class-wp-xmlrpc-server.php +++ b/src/wp-includes/class-wp-xmlrpc-server.php @@ -2897,8 +2897,8 @@ class wp_xmlrpc_server extends IXR_Server { // If we found the page then format the data. if ( $page->ID && ( $page->post_type == 'page' ) ) { return $this->_prepare_page( $page ); - } // If the page doesn't exist indicate that. - else { + } else { + // If the page doesn't exist indicate that. return new IXR_Error( 404, __( 'Sorry, no such page.' ) ); } } diff --git a/src/wp-includes/formatting.php b/src/wp-includes/formatting.php index 464a7bbde2..e082509203 100644 --- a/src/wp-includes/formatting.php +++ b/src/wp-includes/formatting.php @@ -2478,8 +2478,9 @@ function force_balance_tags( $text ) { if ( $stacksize <= 0 ) { $tag = ''; // or close to be safe $tag = '/' . $tag; - } // if stacktop value = tag close value then pop - elseif ( $tagstack[ $stacksize - 1 ] == $tag ) { // found closing tag + + // if stacktop value = tag close value then pop + } elseif ( $tagstack[ $stacksize - 1 ] == $tag ) { // found closing tag $tag = '' . $tag . '>'; // Close Tag // Pop array_pop( $tagstack ); @@ -2505,18 +2506,15 @@ function force_balance_tags( $text ) { // If it's an empty tag "< >", do nothing if ( '' == $tag ) { // do nothing - } // ElseIf it presents itself as a self-closing tag... - elseif ( substr( $regex[2], -1 ) == '/' ) { + } elseif ( substr( $regex[2], -1 ) == '/' ) { // ElseIf it presents itself as a self-closing tag... // ...but it isn't a known single-entity self-closing tag, then don't let it be treated as such and // immediately close it with a closing tag (the tag will encapsulate no text as a result) if ( ! in_array( $tag, $single_tags ) ) { $regex[2] = trim( substr( $regex[2], 0, -1 ) ) . ">$tag"; } - } // ElseIf it's a known single-entity tag but it doesn't close itself, do so - elseif ( in_array( $tag, $single_tags ) ) { + } elseif ( in_array( $tag, $single_tags ) ) { // ElseIf it's a known single-entity tag but it doesn't close itself, do so $regex[2] .= '/'; - } // Else it's not a single-entity tag - else { + } else { // Else it's not a single-entity tag // If the top of the stack is the same as the tag we want to push, close previous tag if ( $stacksize > 0 && ! in_array( $tag, $nestable_tags ) && $tagstack[ $stacksize - 1 ] == $tag ) { $tagqueue = '' . array_pop( $tagstack ) . '>'; diff --git a/src/wp-includes/general-template.php b/src/wp-includes/general-template.php index 118d563cda..861a4c84db 100644 --- a/src/wp-includes/general-template.php +++ b/src/wp-includes/general-template.php @@ -920,8 +920,8 @@ function get_custom_logo( $blog_id = 0 ) { esc_url( home_url( '/' ) ), wp_get_attachment_image( $custom_logo_id, 'full', false, $custom_logo_attr ) ); - } // If no logo is set but we're in the Customizer, leave a placeholder (needed for the live preview). - elseif ( is_customize_preview() ) { + } elseif ( is_customize_preview() ) { + // If no logo is set but we're in the Customizer, leave a placeholder (needed for the live preview). $html = sprintf( '', esc_url( home_url( '/' ) ) diff --git a/src/wp-includes/load.php b/src/wp-includes/load.php index e404a68f9f..7fe5566e7e 100644 --- a/src/wp-includes/load.php +++ b/src/wp-includes/load.php @@ -68,11 +68,11 @@ function wp_fix_server_vars() { // Fix for IIS when running with PHP ISAPI if ( empty( $_SERVER['REQUEST_URI'] ) || ( PHP_SAPI != 'cgi-fcgi' && preg_match( '/^Microsoft-IIS\//', $_SERVER['SERVER_SOFTWARE'] ) ) ) { - // IIS Mod-Rewrite if ( isset( $_SERVER['HTTP_X_ORIGINAL_URL'] ) ) { + // IIS Mod-Rewrite $_SERVER['REQUEST_URI'] = $_SERVER['HTTP_X_ORIGINAL_URL']; - } // IIS Isapi_Rewrite - elseif ( isset( $_SERVER['HTTP_X_REWRITE_URL'] ) ) { + } elseif ( isset( $_SERVER['HTTP_X_REWRITE_URL'] ) ) { + // IIS Isapi_Rewrite $_SERVER['REQUEST_URI'] = $_SERVER['HTTP_X_REWRITE_URL']; } else { // Use ORIG_PATH_INFO if there is no PATH_INFO diff --git a/src/wp-includes/media.php b/src/wp-includes/media.php index 271300958a..ace9021fd7 100644 --- a/src/wp-includes/media.php +++ b/src/wp-includes/media.php @@ -104,8 +104,7 @@ function image_constrain_size_for_editor( $width, $height, $size = 'medium', $co if ( intval( $content_width ) > 0 && 'edit' === $context ) { $max_width = min( intval( $content_width ), $max_width ); } - } // $size == 'full' has no constraint - else { + } else { // $size == 'full' has no constraint $max_width = $width; $max_height = $height; }