Skip to content

Commit

Permalink
Fix some phpcs issues with spacing in some files
Browse files Browse the repository at this point in the history
  • Loading branch information
pattonwebz committed Jun 17, 2024
1 parent 3065688 commit 9802a9a
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 24 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* Calculator Signup Block.
*
*
* @package Equalize Digital Base Theme
* @author Equalize Digital
* @since 1.0.0
Expand Down Expand Up @@ -54,11 +54,11 @@
<div class="calculator-signup-container-content">
<h2 class="title"><?php echo esc_html( $block_title ); ?></h2>
<div class="text"><?php echo wp_kses_post( $copy ); ?></div>
<?php
<?php
if ( ! empty( $block_link ) ) {
$url = $link['url'];
$calculator_title = $link['title'];
if( $link['url'] ) {
if ( $link['url'] ) {
echo '<span class="content">';
echo '<a href="' . esc_url( $url ) . '" class="btn btn-dark-bg">';
echo esc_html( $calculator_title );
Expand All @@ -80,7 +80,7 @@
}
$calculator_signup_title = $row['title'];
$context = $row['context'];

echo '<div class="calculator-signup-container-content-list-item">';
if ( ! empty( $image ) ) {
echo '<img src="' . esc_url( $image ) . '" alt="' . esc_attr( $image_alt ) . '" />';
Expand All @@ -96,7 +96,7 @@
echo wp_kses_post( $context );
echo '</span>';
}

echo '</div>';
echo '</div>';
}
Expand Down
38 changes: 19 additions & 19 deletions template-parts/blocks/resource-links/resource-links.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* Resource Links Block Template.
*
*
* @package Equalize Digital Base Theme
* @author Equalize Digital
* @since 1.0.0
Expand Down Expand Up @@ -49,7 +49,7 @@
<div class="resource-links-container-links" role="tablist">
<div class="dropdown">
<button id="resource-links-dropdown" class="dropdown-select">
<?php
<?php
$links = get_field( 'links' );
if ( $links ) {
foreach ( $links as $key => $row ) {
Expand All @@ -72,7 +72,7 @@

</button>
<ul class="resource-links-dropdown-list" role="tablist">
<?php
<?php
$links = get_field( 'links' );
if ( $links ) {
foreach ( $links as $key => $row ) {
Expand Down Expand Up @@ -105,15 +105,15 @@
</li>
<?php endif; ?>


<?php
}
}
?>
</ul>
</div>
<?php

<?php
$links = get_field( 'links' );
if ( $links ) {
foreach ( $links as $key => $row ) {
Expand Down Expand Up @@ -148,7 +148,7 @@

<div class="resource-links-loop-container">

<?php
<?php
$links = get_field( 'links' );
if ( $links ) {
foreach ( $links as $key => $row ) {
Expand All @@ -158,24 +158,24 @@
if ( ! empty( $row['featured_image'] ) ) {
$featured_image = $row['featured_image']['url'];
}

if ( ! empty( $row['category'] ) ) {
$category = $row['category'];
}
if ( ! empty( $row['selected_posts'] ) ) {
$selected_posts = $row['selected_posts'];
}
if( 'link' === $row['type_of_button'] ) {
if ( 'link' === $row['type_of_button'] ) {
continue;
}
?>
<div
id="resource-link-<?php echo esc_attr( $key ); ?>"
role="tabpanel"
aria-labelledby="button-tab-<?php echo esc_attr( $key ); ?>"
<div
id="resource-link-<?php echo esc_attr( $key ); ?>"
role="tabpanel"
aria-labelledby="button-tab-<?php echo esc_attr( $key ); ?>"
class="resource-links-loop-container-item <?php echo 0 === $key ? 'resource-links-loop-container-item--active' : ''; ?>"
>

<div class="resource-links-loop-container-content">
<div class="resource-links-loop-container-content-featured">
<div class="resource-links-loop-container-content-featured-link">
Expand All @@ -197,15 +197,15 @@ class="resource-links-loop-container-item <?php echo 0 === $key ? 'resource-link
if ( $selected_posts ) {

$args = array(
'post_type' => 'post',
'post_type' => 'post',
'post__in' => $selected_posts,
'orderby' => 'post__in',
);

} else {
$args = array(
'post_type' => 'post',
'posts_per_page' => 3,
'post_type' => 'post',
'posts_per_page' => 3,
'cat' => $category,
);
}
Expand All @@ -215,15 +215,15 @@ class="resource-links-loop-container-item <?php echo 0 === $key ? 'resource-link
if ( $query->have_posts() ) {
while ( $query->have_posts() ) {
$query->the_post();

// Get categories.
$categories = get_the_category();
if ( $categories ) {
$category = $categories[0]->name; // Assuming you want only the first category if there are multiple.
} else {
$category = '';
}

$post_title = get_the_title();
$post_link = get_the_permalink();
$author_email = get_the_author_meta( 'user_email' );
Expand Down

0 comments on commit 9802a9a

Please sign in to comment.