Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
nuritsha committed Dec 4, 2024
1 parent 4a1fd89 commit 7a40f7f
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 23 deletions.
40 changes: 20 additions & 20 deletions modules/forms/classes/render/widget-form-render.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,19 +39,19 @@ public function render() {
}

?>
<form class="ehp-form" method="post" <?php $this->widget->print_render_attribute_string( 'form' ); ?>>
<form class="ehp-form" method="post" <?php $this->widget->print_render_attribute_string( 'form' ); ?>>
<?php $this->render_text_container(); ?>
<input type="hidden" name="post_id" value="<?php echo (int) Utils::get_current_post_id(); ?>"/>
<input type="hidden" name="form_id" value="<?php echo esc_attr( $this->widget->get_id() ); ?>"/>
<input type="hidden" name="referer_title" value="<?php echo esc_attr( $referer_title ); ?>"/>
<input type="hidden" name="post_id" value="<?php echo (int) Utils::get_current_post_id(); ?>"/>
<input type="hidden" name="form_id" value="<?php echo esc_attr( $this->widget->get_id() ); ?>"/>
<input type="hidden" name="referer_title" value="<?php echo esc_attr( $referer_title ); ?>"/>

<?php if ( is_singular() ) {
// `queried_id` may be different from `post_id` on Single theme builder templates.
?>
<input type="hidden" name="queried_id" value="<?php echo (int) get_the_ID(); ?>"/>
<input type="hidden" name="queried_id" value="<?php echo (int) get_the_ID(); ?>"/>
<?php } ?>

<div <?php $this->widget->print_render_attribute_string( 'wrapper' ); ?>>
<div <?php $this->widget->print_render_attribute_string( 'wrapper' ); ?>>
<?php
foreach ( $this->settings['form_fields'] as $item_index => $item ) :
$item['input_size'] = $this->settings['input_size'];
Expand Down Expand Up @@ -91,14 +91,14 @@ public function render() {

$print_label = ! in_array( $item['field_type'], [ 'hidden', 'html', 'step' ], true );
?>
<div <?php $this->widget->print_render_attribute_string( 'field-group' . $item_index ); ?>>
<div <?php $this->widget->print_render_attribute_string( 'field-group' . $item_index ); ?>>
<?php
if ( $print_label && $item['field_label'] ) {
?>
<label <?php $this->widget->print_render_attribute_string( 'label' . $item_index ); ?>>

Check failure on line 98 in modules/forms/classes/render/widget-form-render.php

View workflow job for this annotation

GitHub Actions / Lint PHP files

Tabs must be used to indent lines; spaces are not allowed
<?php
echo esc_html( $item['field_label'] ); ?>
</label>
</label>

Check warning on line 101 in modules/forms/classes/render/widget-form-render.php

View workflow job for this annotation

GitHub Actions / Lint PHP files

Found precision alignment of 1 spaces.
<?php
}

Expand Down Expand Up @@ -145,7 +145,7 @@ public function render() {
case 'email':
$this->widget->add_render_attribute( 'input' . $item_index, 'class', 'elementor-field-textual' );
?>
<input size="1" <?php $this->widget->print_render_attribute_string( 'input' . $item_index ); ?>>
<input size="1" <?php $this->widget->print_render_attribute_string( 'input' . $item_index ); ?>>
<?php
break;

Expand All @@ -170,11 +170,11 @@ public function render() {
do_action( "hello_plus/forms/render_field/{$field_type}", $item, $item_index, $this->widget );
endswitch;
?>
</div>
</div>
<?php endforeach; ?>
<?php $this->render_button(); ?>
</div>
</form>
</div>
</form>

Check warning on line 177 in modules/forms/classes/render/widget-form-render.php

View workflow job for this annotation

GitHub Actions / Lint PHP files

Found precision alignment of 1 spaces.
<?php
}

Expand Down Expand Up @@ -239,8 +239,8 @@ protected function render_button(): void {
] );

?>
<div <?php $this->widget->print_render_attribute_string( 'submit-group' ); ?>>
<button <?php $this->widget->print_render_attribute_string( 'button' ); ?>>
<div <?php $this->widget->print_render_attribute_string( 'submit-group' ); ?>>
<button <?php $this->widget->print_render_attribute_string( 'button' ); ?>>
<?php if ( ! empty( $button_icon ) || ! empty( $button_icon['value'] ) ) : ?>
<?php
Icons_Manager::render_icon( $button_icon,
Expand All @@ -253,10 +253,10 @@ protected function render_button(): void {
<?php endif; ?>

<?php if ( ! empty( $button_text ) ) : ?>
<span <?php $this->widget->print_render_attribute_string( 'button-text' ); ?>><?php $this->widget->print_unescaped_setting( 'button_text' ); ?></span>
<span <?php $this->widget->print_render_attribute_string( 'button-text' ); ?>><?php $this->widget->print_unescaped_setting( 'button_text' ); ?></span>
<?php endif; ?>
</button>
</div>
</button>
</div>
<?php
}

Expand All @@ -268,17 +268,17 @@ protected function render_text_container(): void {
$description_text = $this->settings['text_description'];
$has_description = ! empty( $description_text );
?>
<div class="ehp-form__text-container">
<div class="ehp-form__text-container">
<?php if ( $has_heading ) {
$heading_output = sprintf( '<%1$s %2$s>%3$s</%1$s>', Elementor_Utils::validate_html_tag( $heading_tag ), 'class="ehp-form__heading"', esc_html( $heading_text ) );
// Escaped above
Elementor_Utils::print_unescaped_internal_string( $heading_output );
} ?>

<?php if ( $has_description ) { ?>
<p class="ehp-form__description"><?php echo esc_html( $description_text ); ?></p>
<p class="ehp-form__description"><?php echo esc_html( $description_text ); ?></p>
<?php } ?>
</div>
</div>
<?php
}
}
6 changes: 3 additions & 3 deletions modules/template-parts/templates/header.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<meta charset="<?php bloginfo( 'charset' ); ?>">
<?php

echo wp_kses( Elementor_Utils::get_meta_viewport( Theme_Utils::get_theme_slug() ), [
Expand All @@ -30,11 +30,11 @@
] );
?>
<?php if ( ! current_theme_supports( 'title-tag' ) ) : ?>
<title>
<title>
<?php
echo esc_html( wp_get_document_title() );
?>
</title>
</title>
<?php endif; ?>
<?php wp_head(); ?>
</head>
Expand Down

0 comments on commit 7a40f7f

Please sign in to comment.