mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-10-03 22:27:04 +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:
@@ -56,6 +56,13 @@ class WP_Customize_Nav_Menu_Location_Control extends WP_Customize_Control {
|
||||
if ( empty( $this->choices ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$value_hidden_class = $no_value_hidden_class = '';
|
||||
if ( $this->value() ) {
|
||||
$value_hidden_class = ' hidden';
|
||||
} else {
|
||||
$no_value_hidden_class = ' hidden';
|
||||
}
|
||||
?>
|
||||
<label>
|
||||
<?php if ( ! empty( $this->label ) ) : ?>
|
||||
@@ -74,8 +81,8 @@ class WP_Customize_Nav_Menu_Location_Control extends WP_Customize_Control {
|
||||
?>
|
||||
</select>
|
||||
</label>
|
||||
<button type="button" class="button-link create-menu<?php if ( $this->value() ) { echo ' hidden'; } ?>" data-location-id="<?php echo esc_attr( $this->location_id ); ?>" aria-label="<?php esc_attr_e( 'Create a menu for this location' ); ?>"><?php _e( '+ Create New Menu' ); ?></button>
|
||||
<button type="button" class="button-link edit-menu<?php if ( ! $this->value() ) { echo ' hidden'; } ?>" aria-label="<?php esc_attr_e( 'Edit selected menu' ); ?>"><?php _e( 'Edit Menu' ); ?></button>
|
||||
<button type="button" class="button-link create-menu<?php echo $value_hidden_class; ?>" data-location-id="<?php echo esc_attr( $this->location_id ); ?>" aria-label="<?php esc_attr_e( 'Create a menu for this location' ); ?>"><?php _e( '+ Create New Menu' ); ?></button>
|
||||
<button type="button" class="button-link edit-menu<?php echo $no_value_hidden_class; ?>" aria-label="<?php esc_attr_e( 'Edit selected menu' ); ?>"><?php _e( 'Edit Menu' ); ?></button>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user