Skip to content

Commit

Permalink
TMZ-54 fix phpcs
Browse files Browse the repository at this point in the history
  • Loading branch information
mserino committed Sep 16, 2024
1 parent 19817d0 commit 8b8c21f
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 36 deletions.
3 changes: 1 addition & 2 deletions modules/admin/components/settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@ public function settings_page() {

add_action( 'load-' . $menu_hook, function () {
add_action( 'admin_enqueue_scripts', [ $this, 'settings_page_scripts' ], 10 ); //phpcs:ignore
}
);
} );
}

/**
Expand Down
12 changes: 6 additions & 6 deletions modules/content/classes/render/widget-zig-zag-render.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ private function render_graphic_element_container( $item, $key ) {

if ( $is_icon ) {
$graphic_element_classnames .= ' has-icon';
} else if ( $is_image ) {
} elseif ( $is_image ) {
$graphic_element_classnames .= ' has-image';
}

Expand Down Expand Up @@ -103,7 +103,7 @@ private function render_text_element_container( $item, $key ) {
$title_text = $item[ $graphic_element . '_title' ] ?? '';
$has_title = ! empty( $title_text );

$description_text = $item[ $graphic_element . '_description'] ?? '';
$description_text = $item[ $graphic_element . '_description' ] ?? '';
$has_description = ! empty( $description_text );

$button_classnames = 'e-zigzag__button';
Expand Down Expand Up @@ -167,10 +167,10 @@ private function render_text_element_container( $item, $key ) {
<div class="e-zigzag__button-container">
<a <?php echo $this->widget->get_render_attribute_string( 'button-link-' . $key ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>>
<?php Icons_Manager::render_icon( $button_icon,
[
'aria-hidden' => 'true',
'class' => 'e-zigzag__button-icon',
] ); ?>
[

Check failure on line 170 in modules/content/classes/render/widget-zig-zag-render.php

View workflow job for this annotation

GitHub Actions / Lint PHP files

Multi-line function call not indented correctly; expected 28 spaces but found 24
'aria-hidden' => 'true',
'class' => 'e-zigzag__button-icon',
] ); ?>
<?php echo esc_html( $button_text ); ?>
</a>
</div>
Expand Down
56 changes: 28 additions & 28 deletions modules/content/widgets/zig-zag.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ protected function add_style_section() {
$this->add_box_style_section();
}

private function add_zigzags_content_section( ) {
private function add_zigzags_content_section() {
$this->start_controls_section(
'zigzags_content_section',
[
Expand Down Expand Up @@ -175,7 +175,7 @@ private function add_graphic_element_repeater( $type ) {
$repeater->add_control(
$type . '_title_tag',
[
'label' => esc_html__( 'HTML Tag', 'elementor' ),
'label' => esc_html__( 'HTML Tag', 'hello-plus' ),
'type' => Controls_Manager::SELECT,
'options' => [
'h1' => 'H1',
Expand Down Expand Up @@ -290,7 +290,7 @@ private function add_style_zigzags_section() {
'tab' => Controls_Manager::TAB_STYLE,
]
);

$this->add_control(
'image_label',
[
Expand Down Expand Up @@ -326,22 +326,22 @@ private function add_style_zigzags_section() {
$this->add_responsive_control(
'image_position',
[
'label' => esc_html__( 'Position', 'elementor' ),
'label' => esc_html__( 'Position', 'hello-plus' ),
'type' => Controls_Manager::SELECT,
'desktop_default' => 'center center',
'tablet_default' => 'center center',
'mobile_default' => 'center center',
'options' => [
'' => esc_html__( 'Default', 'elementor' ),
'center center' => esc_html__( 'Center Center', 'elementor' ),
'center left' => esc_html__( 'Center Left', 'elementor' ),
'center right' => esc_html__( 'Center Right', 'elementor' ),
'top center' => esc_html__( 'Top Center', 'elementor' ),
'top left' => esc_html__( 'Top Left', 'elementor' ),
'top right' => esc_html__( 'Top Right', 'elementor' ),
'bottom center' => esc_html__( 'Bottom Center', 'elementor' ),
'bottom left' => esc_html__( 'Bottom Left', 'elementor' ),
'bottom right' => esc_html__( 'Bottom Right', 'elementor' ),
'' => esc_html__( 'Default', 'hello-plus' ),
'center center' => esc_html__( 'Center Center', 'hello-plus' ),
'center left' => esc_html__( 'Center Left', 'hello-plus' ),
'center right' => esc_html__( 'Center Right', 'hello-plus' ),
'top center' => esc_html__( 'Top Center', 'hello-plus' ),
'top left' => esc_html__( 'Top Left', 'hello-plus' ),
'top right' => esc_html__( 'Top Right', 'hello-plus' ),
'bottom center' => esc_html__( 'Bottom Center', 'hello-plus' ),
'bottom left' => esc_html__( 'Bottom Left', 'hello-plus' ),
'bottom right' => esc_html__( 'Bottom Right', 'hello-plus' ),
],
'selectors' => [
'{{WRAPPER}} .e-zigzag' => '--zigzag-image-position: {{VALUE}}',
Expand Down Expand Up @@ -536,12 +536,12 @@ private function add_style_zigzags_section() {
$this->add_control(
'button_type',
[
'label' => esc_html__( 'Type', 'elementor' ),
'label' => esc_html__( 'Type', 'hello-plus' ),
'type' => Controls_Manager::SELECT,
'default' => 'link',
'options' => [
'button' => esc_html__( 'Button', 'elementor' ),
'link' => esc_html__( 'Link', 'elementor' ),
'button' => esc_html__( 'Button', 'hello-plus' ),
'link' => esc_html__( 'Link', 'hello-plus' ),
],
]
);
Expand All @@ -553,7 +553,7 @@ private function add_style_zigzags_section() {
'selector' => '{{WRAPPER}} .e-zigzag__button',
'fields_options' => [
'typography' => [ 'default' => 'yes' ],
]
],
]
);

Expand Down Expand Up @@ -637,7 +637,7 @@ private function add_style_zigzags_section() {
[
'name' => 'button_background',
'types' => [ 'classic', 'gradient' ],
'exclude' => ['image'],
'exclude' => [ 'image' ],
'selector' => '{{WRAPPER}} .e-zigzag__button',
'fields_options' => [
'background' => [
Expand Down Expand Up @@ -760,14 +760,14 @@ private function add_style_zigzags_section() {
$this->add_control(
'button_shape',
[
'label' => esc_html__( 'Shape', 'elementor' ),
'label' => esc_html__( 'Shape', 'hello-plus' ),
'type' => Controls_Manager::SELECT,
'default' => 'default',
'options' => [
'default' => esc_html__( 'Default', 'elementor' ),
'sharp' => esc_html__( 'Sharp', 'elementor' ),
'round' => esc_html__( 'Round', 'elementor' ),
'rounded' => esc_html__( 'Rounded', 'elementor' ),
'default' => esc_html__( 'Default', 'hello-plus' ),
'sharp' => esc_html__( 'Sharp', 'hello-plus' ),
'round' => esc_html__( 'Round', 'hello-plus' ),
'rounded' => esc_html__( 'Rounded', 'hello-plus' ),
],
'condition' => [
'button_type' => 'button',
Expand All @@ -789,7 +789,7 @@ private function add_style_zigzags_section() {
$this->add_responsive_control(
'button_padding',
[
'label' => esc_html__( 'Padding', 'elementor' ),
'label' => esc_html__( 'Padding', 'hello-plus' ),
'type' => Controls_Manager::DIMENSIONS,
'size_units' => [ 'px', '%', 'em', 'rem' ],
'selectors' => [
Expand Down Expand Up @@ -848,7 +848,7 @@ private function add_style_zigzags_section() {
$this->end_controls_section();
}

private function add_box_style_section( ) {
private function add_box_style_section() {
$this->start_controls_section(
'box_style_section',
[
Expand All @@ -870,7 +870,7 @@ private function add_box_style_section( ) {
[
'name' => 'background',
'types' => [ 'classic', 'gradient' ],
'exclude' => ['image'],
'exclude' => [ 'image' ],
'selector' => '{{WRAPPER}} .e-zigzag__item-wrapper',

]
Expand All @@ -893,7 +893,7 @@ private function add_box_style_section( ) {
[
'name' => 'alternate_background',
'types' => [ 'classic', 'gradient' ],
'exclude' => ['image'],
'exclude' => [ 'image' ],
'condition' => [
'show_alternate_background' => 'yes',
],
Expand Down

0 comments on commit 8b8c21f

Please sign in to comment.