Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
MSF
/
msf-climate-hub
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
befac370
authored
2023-11-13 17:19:46 -0500
by
Jeff Balicki
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
qa
Signed-off-by: Jeff <jeff@gotenzing.com>
1 parent
2a0b7535
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
wp-content/themes/msf-child/blocks/carousel-mixed/carousel.php
wp-content/themes/msf-child/blocks/carousel/carousel.php
wp-content/themes/msf-child/blocks/carousel-mixed/carousel.php
View file @
befac37
...
...
@@ -27,7 +27,7 @@ if (!empty($block["align"])) {
if
(
$is_preview
)
{
$className
.=
" is-admin"
;
}
$ran
=
getName
();
?>
<div
id=
"
<?php
echo
esc_attr
(
$id
);
?>
"
class=
"
<?php
echo
esc_attr
(
...
...
@@ -46,7 +46,7 @@ if ($is_preview) {
preg_match
(
'/src="(.+?)"/'
,
$iframe
,
$matches
);
$src
=
explode
(
'embed/'
,
$matches
[
1
]);
$src
=
explode
(
'?'
,
$src
[
1
]);
$modalId
=
"modal-"
.
$index
;
$modalId
=
"modal-"
.
$index
.
$ran
;
?>
<div
class=
"swiper-slide"
>
<div
class=
"carousel-content"
>
...
...
@@ -125,7 +125,7 @@ if ($is_preview) {
$carousel_style
=
get_sub_field
(
"carousel_style"
);
if
(
$carousel_style
==
'video'
){
?>
<?php
$index
=
get_row_index
();
$modalId
=
"modal-"
.
$index
;
$modalId
=
"modal-"
.
$index
.
$ran
;
?>
<?php
$iframe
=
get_sub_field
(
"video"
);
...
...
wp-content/themes/msf-child/blocks/carousel/carousel.php
View file @
befac37
...
...
@@ -30,7 +30,7 @@ if( $is_preview ) {
}
$carousel_style
=
get_field
(
'carousel_style'
);
$ran
=
getName
();
?>
<div
id=
"
<?php
echo
esc_attr
(
$id
);
?>
"
class=
"
<?php
echo
esc_attr
(
$className
);
?>
"
>
...
...
@@ -47,7 +47,7 @@ $carousel_style = get_field('carousel_style');
preg_match
(
'/src="(.+?)"/'
,
$iframe
,
$matches
);
$src
=
explode
(
'embed/'
,
$matches
[
1
]);
$src
=
explode
(
'?'
,
$src
[
1
]);
$modalId
=
'modal-'
.
$index
;
?>
$modalId
=
'modal-'
.
$index
.
$ran
;
?>
<div
class=
"swiper-slide"
>
<div
class=
"carousel-content"
>
<a
href=
"javascript:void(0)"
class=
"video_open"
data-bs-toggle=
"modal"
data-bs-target=
"#
<?php
echo
$modalId
;
?>
"
>
...
...
@@ -74,7 +74,7 @@ $carousel_style = get_field('carousel_style');
<?php
if
(
have_rows
(
'promo_items'
)
)
:
?>
<?php
while
(
the_repeater_field
(
'promo_items'
)
)
:
?>
<?php
$index
=
get_row_index
();
$modalId
=
'modal-'
.
$index
;
?>
$modalId
=
'modal-'
.
$index
.
$ran
;
?>
<?php
$iframe
=
get_sub_field
(
'video'
);
// Use preg_match to find iframe src.
...
...
Please
register
or
sign in
to post a comment