Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tweak: Use eicons [TMZ-212] #116

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion modules/content/widgets/cta.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public function get_keywords(): array {
}

public function get_icon(): string {
return 'eicon-single-page';
return 'eicon-ehp-cta';
}

public function get_style_depends(): array {
Expand Down
2 changes: 1 addition & 1 deletion modules/content/widgets/hero.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public function get_keywords(): array {
}

public function get_icon(): string {
return 'eicon-single-page';
return 'eicon-ehp-hero';
}

public function get_style_depends(): array {
Expand Down
2 changes: 1 addition & 1 deletion modules/content/widgets/zig-zag.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public function get_keywords(): array {
}

public function get_icon(): string {
return 'eicon-time-line';
return 'eicon-ehp-zigzag';
}

public function get_style_depends(): array {
Expand Down
42 changes: 21 additions & 21 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 ); ?>>
<label <?php $this->widget->print_render_attribute_string( 'label' . $item_index ); ?>>
<?php
echo esc_html( $item['field_label'] ); ?>
</label>
</label>
<?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>
<?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
}
}
2 changes: 1 addition & 1 deletion modules/forms/widgets/form.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public function get_title() {
}

public function get_icon() {
return 'eicon-form-horizontal';
return 'eicon-ehp-forms';
}

public function get_keywords() {
Expand Down
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
Loading