mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-03 06:57:35 +01:00
Coding Standards: Fix the Squiz.ControlStructures.ControlSignature.SpaceAfterCloseBrace
violations.
See #45934. Built from https://develop.svn.wordpress.org/trunk@44566 git-svn-id: http://core.svn.wordpress.org/trunk@44397 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
6d5cd6842a
commit
4f861b9548
@ -203,11 +203,11 @@ function export_wp( $args = array() ) {
|
||||
* @return string Site URL.
|
||||
*/
|
||||
function wxr_site_url() {
|
||||
// Multisite: the base URL.
|
||||
if ( is_multisite() ) {
|
||||
// Multisite: the base URL.
|
||||
return network_home_url();
|
||||
} // WordPress (single site): the blog URL.
|
||||
else {
|
||||
} else {
|
||||
// WordPress (single site): the blog URL.
|
||||
return get_bloginfo_rss( 'url' );
|
||||
}
|
||||
}
|
||||
|
@ -215,8 +215,9 @@ function wp_generate_attachment_metadata( $attachment_id, $file ) {
|
||||
update_post_meta( $attachment_id, '_thumbnail_id', $sub_attachment_id );
|
||||
}
|
||||
}
|
||||
} // Try to create image thumbnails for PDFs
|
||||
elseif ( 'application/pdf' === $mime_type ) {
|
||||
} elseif ( 'application/pdf' === $mime_type ) {
|
||||
// Try to create image thumbnails for PDFs.
|
||||
|
||||
$fallback_sizes = array(
|
||||
'thumbnail',
|
||||
'medium',
|
||||
|
@ -39,8 +39,8 @@ function list_core_update( $update ) {
|
||||
|
||||
if ( 'en_US' == $update->locale && 'en_US' == get_locale() ) {
|
||||
$version_string = $update->current;
|
||||
} // If the only available update is a partial builds, it doesn't need a language-specific version string.
|
||||
elseif ( 'en_US' == $update->locale && $update->packages->partial && $wp_version == $update->partial_version && ( $updates = get_core_updates() ) && 1 == count( $updates ) ) {
|
||||
} elseif ( 'en_US' == $update->locale && $update->packages->partial && $wp_version == $update->partial_version && ( $updates = get_core_updates() ) && 1 == count( $updates ) ) {
|
||||
// If the only available update is a partial builds, it doesn't need a language-specific version string.
|
||||
$version_string = $update->current;
|
||||
} else {
|
||||
$version_string = sprintf( '%s–<strong>%s</strong>', $update->current, $update->locale );
|
||||
@ -121,8 +121,8 @@ function list_core_update( $update ) {
|
||||
echo '</p>';
|
||||
if ( 'en_US' != $update->locale && ( ! isset( $wp_local_package ) || $wp_local_package != $update->locale ) ) {
|
||||
echo '<p class="hint">' . __( 'This localized version contains both the translation and various other localization fixes. You can skip upgrading if you want to keep your current translation.' ) . '</p>';
|
||||
} // 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 '<p class="hint">' . sprintf( __( 'You are about to install WordPress %s <strong>in English (US).</strong> 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 : '' ) . '</p>';
|
||||
}
|
||||
echo '</form>';
|
||||
|
@ -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 ) );
|
||||
}
|
||||
}
|
||||
|
@ -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 ) );
|
||||
}
|
||||
}
|
||||
|
@ -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';
|
||||
}
|
||||
|
||||
|
@ -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';
|
||||
}
|
||||
}
|
||||
|
@ -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.' ) );
|
||||
}
|
||||
}
|
||||
|
@ -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 ) . '>';
|
||||
|
@ -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(
|
||||
'<a href="%1$s" class="custom-logo-link" style="display:none;"><img class="custom-logo"/></a>',
|
||||
esc_url( home_url( '/' ) )
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -13,7 +13,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '5.1-beta1-44565';
|
||||
$wp_version = '5.1-beta1-44566';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
Reference in New Issue
Block a user