mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-12 21:00:21 +00:00
General: Reformat inline if () statements inside HTML tags.
This pattern occurs a handful of times across the codebase:
`<div class="foo<?php if ( $bar ) { echo ' baz'; } ?>">`
Unfortunately, it doesn't really play nicely with `phpcbf`, so all instances need to be removed in preperation for auto code formatting.
See #41057.
git-svn-id: https://develop.svn.wordpress.org/trunk@42217 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -525,9 +525,14 @@ if ( is_string( $content_func ) ) {
|
||||
*/
|
||||
do_action( "admin_head_{$content_func}" );
|
||||
}
|
||||
|
||||
$body_id_attr = '';
|
||||
if ( isset( $GLOBALS['body_id'] ) ) {
|
||||
$body_id_attr = ' id="' . $GLOBALS['body_id'] . '"';
|
||||
}
|
||||
?>
|
||||
</head>
|
||||
<body<?php if ( isset($GLOBALS['body_id']) ) echo ' id="' . $GLOBALS['body_id'] . '"'; ?> class="wp-core-ui no-js">
|
||||
<body<?php echo $body_id_attr; ?> class="wp-core-ui no-js">
|
||||
<script type="text/javascript">
|
||||
document.body.className = document.body.className.replace('no-js', 'js');
|
||||
</script>
|
||||
@@ -2738,15 +2743,22 @@ function edit_form_image_editor( $post ) {
|
||||
$nonce = wp_create_nonce( "image_editor-$post->ID" );
|
||||
$image_edit_button = "<input type='button' id='imgedit-open-btn-$post->ID' onclick='imageEdit.open( $post->ID, \"$nonce\" )' class='button' value='" . esc_attr__( 'Edit Image' ) . "' /> <span class='spinner'></span>";
|
||||
}
|
||||
|
||||
$open_style = $not_open_style = '';
|
||||
if ( $open ) {
|
||||
$open_style = ' style="display:none"';
|
||||
} else {
|
||||
$not_open_style = ' style="display:none"';
|
||||
}
|
||||
?>
|
||||
|
||||
<div class="imgedit-response" id="imgedit-response-<?php echo $attachment_id; ?>"></div>
|
||||
|
||||
<div<?php if ( $open ) echo ' style="display:none"'; ?> class="wp_attachment_image wp-clearfix" id="media-head-<?php echo $attachment_id; ?>">
|
||||
<div<?php echo $open_style; ?> class="wp_attachment_image wp-clearfix" id="media-head-<?php echo $attachment_id; ?>">
|
||||
<p id="thumbnail-head-<?php echo $attachment_id; ?>"><img class="thumbnail" src="<?php echo set_url_scheme( $thumb_url[0] ); ?>" style="max-width:100%" alt="" /></p>
|
||||
<p><?php echo $image_edit_button; ?></p>
|
||||
</div>
|
||||
<div<?php if ( ! $open ) echo ' style="display:none"'; ?> class="image-editor" id="image-editor-<?php echo $attachment_id; ?>">
|
||||
<div<?php echo $not_open_style; ?> class="image-editor" id="image-editor-<?php echo $attachment_id; ?>">
|
||||
<?php if ( $open ) wp_image_editor( $attachment_id ); ?>
|
||||
</div>
|
||||
<?php
|
||||
|
||||
Reference in New Issue
Block a user