Skip to content

Commit

Permalink
Merge pull request #1243 from equalizedigital/hotfix/broken-video-url
Browse files Browse the repository at this point in the history
Hotfix/broken video url
  • Loading branch information
SteveJonesDev authored Jun 24, 2024
2 parents 80285d5 + 478f055 commit 4870f23
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 26 deletions.
7 changes: 3 additions & 4 deletions inc/loop.php
Original file line number Diff line number Diff line change
Expand Up @@ -393,18 +393,17 @@ function eqd_single_landing_page() {
if ( get_field( 'how_does_the_consult_work_youtube_id' ) ) :
?>
<div class="ed_landing_works_container_media">
<iframe width="560" height="315" src="https://www.youtube.com/embed/<?php echo esc_url( get_field( 'how_does_the_consult_work_youtube_id' ) ); ?>" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>
<iframe width="560" height="315" src="https://www.youtube.com/embed/<?php echo esc_attr( get_field( 'how_does_the_consult_work_youtube_id' ) ); ?>" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>
</div>
<?php
endif;

} elseif ( get_field( 'how_does_the_consult_work_youtube_id', $parameter_page ) ) {
?>
<div class="ed_landing_works_container_media">
<iframe width="560" height="315" src="https://www.youtube.com/embed/<?php echo esc_url( get_field( 'how_does_the_consult_work_youtube_id', $parameter_page ) ); ?>" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>
<iframe width="560" height="315" src="https://www.youtube.com/embed/<?php echo esc_attr( get_field( 'how_does_the_consult_work_youtube_id', $parameter_page ) ); ?>" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>
</div>
<?php

<?php
}
?>
</div>
Expand Down
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,7 +54,7 @@
<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 = $block_link['url'];
$calculator_title = $block_link['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
36 changes: 18 additions & 18 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,7 +158,7 @@
if ( ! empty( $row['featured_image'] ) ) {
$featured_image = $row['featured_image']['url'];
}

if ( ! empty( $row['category'] ) ) {
$category = $row['category'];
}
Expand All @@ -169,13 +169,13 @@
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 4870f23

Please sign in to comment.