mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 14:20:15 +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:
@@ -181,6 +181,8 @@ function wp_widget_control( $sidebar_args ) {
|
||||
$id_format = $widget['id'];
|
||||
$widget_number = isset($control['params'][0]['number']) ? $control['params'][0]['number'] : '';
|
||||
$id_base = isset($control['id_base']) ? $control['id_base'] : $widget_id;
|
||||
$width = isset($control['width']) ? $control['width'] : '';
|
||||
$height = isset($control['height']) ? $control['height'] : '';
|
||||
$multi_number = isset($sidebar_args['_multi_num']) ? $sidebar_args['_multi_num'] : '';
|
||||
$add_new = isset($sidebar_args['_add']) ? $sidebar_args['_add'] : '';
|
||||
|
||||
@@ -244,12 +246,17 @@ function wp_widget_control( $sidebar_args ) {
|
||||
} else {
|
||||
echo "\t\t<p>" . __('There are no options for this widget.') . "</p>\n";
|
||||
}
|
||||
|
||||
$noform_class = '';
|
||||
if ( 'noform' === $has_form ) {
|
||||
$noform_class = ' widget-control-noform';
|
||||
}
|
||||
?>
|
||||
<?php echo $after_widget_content; ?>
|
||||
<input type="hidden" name="widget-id" class="widget-id" value="<?php echo esc_attr($id_format); ?>" />
|
||||
<input type="hidden" name="id_base" class="id_base" value="<?php echo esc_attr($id_base); ?>" />
|
||||
<input type="hidden" name="widget-width" class="widget-width" value="<?php if (isset( $control['width'] )) echo esc_attr($control['width']); ?>" />
|
||||
<input type="hidden" name="widget-height" class="widget-height" value="<?php if (isset( $control['height'] )) echo esc_attr($control['height']); ?>" />
|
||||
<input type="hidden" name="widget-width" class="widget-width" value="<?php echo esc_attr($width); ?>" />
|
||||
<input type="hidden" name="widget-height" class="widget-height" value="<?php echo esc_attr($height); ?>" />
|
||||
<input type="hidden" name="widget_number" class="widget_number" value="<?php echo esc_attr($widget_number); ?>" />
|
||||
<input type="hidden" name="multi_number" class="multi_number" value="<?php echo esc_attr($multi_number); ?>" />
|
||||
<input type="hidden" name="add_new" class="add_new" value="<?php echo esc_attr($add_new); ?>" />
|
||||
@@ -262,7 +269,7 @@ function wp_widget_control( $sidebar_args ) {
|
||||
<button type="button" class="button-link widget-control-close"><?php _e( 'Done' ); ?></button>
|
||||
</span>
|
||||
</div>
|
||||
<div class="alignright<?php if ( 'noform' === $has_form ) echo ' widget-control-noform'; ?>">
|
||||
<div class="alignright<?php echo $noform_class; ?>">
|
||||
<?php submit_button( __( 'Save' ), 'primary widget-control-save right', 'savewidget', false, array( 'id' => 'widget-' . esc_attr( $id_format ) . '-savewidget' ) ); ?>
|
||||
<span class="spinner"></span>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user