mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-12 04:40:26 +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:
@@ -250,8 +250,13 @@ if ( ! empty( $_GET['search'] ) ) {
|
||||
foreach ( $themes as $theme ) :
|
||||
$aria_action = esc_attr( $theme['id'] . '-action' );
|
||||
$aria_name = esc_attr( $theme['id'] . '-name' );
|
||||
|
||||
$active_class = '';
|
||||
if ( $theme['active'] ) {
|
||||
$active_class = ' active';
|
||||
}
|
||||
?>
|
||||
<div class="theme<?php if ( $theme['active'] ) echo ' active'; ?>" tabindex="0" aria-describedby="<?php echo $aria_action . ' ' . $aria_name; ?>">
|
||||
<div class="theme<?php echo $active_class; ?>" tabindex="0" aria-describedby="<?php echo $aria_action . ' ' . $aria_name; ?>">
|
||||
<?php if ( ! empty( $theme['screenshot'][0] ) ) { ?>
|
||||
<div class="theme-screenshot">
|
||||
<img src="<?php echo $theme['screenshot'][0]; ?>" alt="" />
|
||||
|
||||
Reference in New Issue
Block a user