-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d4da3b2
commit dc45868
Showing
5 changed files
with
184 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
<?php | ||
/* | ||
* Show Video defined by Custom Page Fields | ||
* | ||
* @package KleiderOrdnung | ||
* @author openmindculture | ||
*/ | ||
|
||
global /* @type {int} */ $kleiderordnung_currentPageId; | ||
|
||
if (!$kleiderordnung_currentPageId || empty($kleiderordnung_currentPageId)) { | ||
$kleiderordnung_currentPageId = KLEIDERORDNUNG_FRONT_PAGE_ID; | ||
} | ||
|
||
$kleiderordnung_currentPageHasVideoWebm = | ||
!empty(get_field('page_intro_video_webm', $kleiderordnung_currentPageId)) && | ||
!empty(get_field('page_intro_video_webm', $kleiderordnung_currentPageId)['url']); | ||
$kleiderordnung_currentPageHasVideoMp4 = | ||
!empty(get_field('page_intro_video_mp4', $kleiderordnung_currentPageId)) && | ||
!empty(get_field('page_intro_video_mp4', $kleiderordnung_currentPageId)['url']); | ||
$kleiderordnung_currentPageHasVideoPosterImage = | ||
!empty(get_field('page_intro_video_poster_image', $kleiderordnung_currentPageId)) && | ||
!empty(get_field('page_intro_video_poster_image', $kleiderordnung_currentPageId)['url']); | ||
|
||
echo var_export(get_field('page_intro_video_mp4', $kleiderordnung_currentPageId), true); | ||
|
||
if ($kleiderordnung_currentPageHasVideoWebm || $kleiderordnung_currentPageHasVideoMp4) : ?> | ||
|
||
<video | ||
controls | ||
width="<?php | ||
echo esc_html(get_field('page_intro_video_url_webm', $kleiderordnung_currentPageId)['width']) | ||
?>" | ||
height="<?php | ||
echo esc_html(get_field('page_intro_video_url_webm', $kleiderordnung_currentPageId)['height']) | ||
?>" | ||
<?php if ($kleiderordnung_currentPageHasVideoPosterImage): ?> | ||
poster="<?php | ||
echo esc_html(get_field( | ||
'page_intro_video_poster_image_url', $kleiderordnung_currentPageId | ||
)['url']) | ||
?>" | ||
<?php endif ?> | ||
> | ||
<?php if ($kleiderordnung_currentPageHasVideoWebm): ?> | ||
<source src="<?php | ||
echo esc_html(get_field('page_intro_video_url_webm', $kleiderordnung_currentPageId)['url']) | ||
?>" type="video/webm" /> | ||
<?php endif ?> | ||
|
||
<?php if ($kleiderordnung_currentPageHasVideoMp4): ?> | ||
<source src="<?php | ||
echo esc_html(get_field('page_intro_video_url_mp4', $kleiderordnung_currentPageId)['url']) | ||
?>" type="video/mp4" /> | ||
<?php endif ?> | ||
|
||
<?php _e( 'Video', 'kleiderordnung' ) ?> - | ||
<?php _e( 'download as', 'kleiderordnung' ) ?> | ||
<?php if ($kleiderordnung_currentPageHasVideoWebm): ?> | ||
<a href="<?php | ||
echo esc_html(get_field('page_intro_video_url_webm', $kleiderordnung_currentPageId)['url']) | ||
?>" /> | ||
<?php endif ?> | ||
<?php if ($kleiderordnung_currentPageHasVideoWebm || $kleiderordnung_currentPageHasVideoMp4): ?> | ||
<?php _e( 'or', 'kleiderordnung' ) ?> | ||
<?php endif ?> | ||
<?php if ($kleiderordnung_currentPageHasVideoMp4): ?> | ||
<a href="<?php | ||
echo esc_html(get_field('page_intro_video_url_mp4', $kleiderordnung_currentPageId['url'])) | ||
?>"/> | ||
<?php endif ?> | ||
</video> | ||
<?php endif ?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
<?php | ||
/* | ||
* Video | ||
* | ||
* @package KleiderOrdnung | ||
* @author openmindculture | ||
*/ | ||
global /* @type {int} */ $kleiderordnung_currentPageId; | ||
if (!$kleiderordnung_currentPageId || empty($kleiderordnung_currentPageId)) { | ||
$kleiderordnung_currentPageId = KLEIDERORDNUNG_FRONT_PAGE_ID; | ||
} | ||
if ( | ||
!empty(get_field('page_intro_video_url_webm', $kleiderordnung_currentPageId)) || | ||
!empty(get_field('page_intro_video_url_webp', $kleiderordnung_currentPageId)) | ||
): ?> | ||
Verflixte Zeitverschwendung! <h2>page_intro_video_poster_image_url</h2> | ||
gettype(get_field('page_intro_video_poster_image_url', $kleiderordnung_currentPageId))): | ||
<?php echo gettype(get_field('page_intro_video_poster_image_url', $kleiderordnung_currentPageId)) ?> | ||
<hr>var_export(get_field..., true):<br><br><?php | ||
echo var_export( get_field('page_intro_video_poster_image_url', $kleiderordnung_currentPageId) , true); | ||
?> | ||
<hr> | ||
<video | ||
controls | ||
width="250" | ||
<?php if ( | ||
!empty(get_field('page_intro_video_poster_image_url', $kleiderordnung_currentPageId)) && | ||
!empty(get_field('page_intro_video_poster_image_url', $kleiderordnung_currentPageId)['url']) | ||
): ?> | ||
poster="<?php | ||
echo esc_html(get_field( | ||
'page_intro_video_poster_image_url', $kleiderordnung_currentPageId | ||
)['url']) | ||
?>" | ||
<?php endif ?> | ||
> | ||
<?php if (!empty(get_field('page_intro_video_url_webm', $kleiderordnung_currentPageId))): ?> | ||
<source src="<?php | ||
echo esc_html(get_field('page_intro_video_url_webm', $kleiderordnung_currentPageId)) | ||
?>" type="video/webm" /> | ||
<?php endif ?> | ||
|
||
<?php if (!empty(get_field('page_intro_video_url_mp4', $kleiderordnung_currentPageId))): ?> | ||
<source src="<?php | ||
echo esc_html(get_field('page_intro_video_url_mp4', $kleiderordnung_currentPageId)) | ||
?>" type="video/mp4" /> | ||
<?php endif ?> | ||
|
||
<?php _e( 'Video', 'kleiderordnung' ) ?> - | ||
<?php _e( 'download as', 'kleiderordnung' ) ?> | ||
<?php if (!empty(get_field('page_intro_video_url_webm', $kleiderordnung_currentPageId))): ?> | ||
<a href="<?php | ||
echo esc_html(get_field('page_intro_video_url_webm', $kleiderordnung_currentPageId)) | ||
?>" /> | ||
<?php endif ?> | ||
<?php if ( | ||
!empty(get_field('page_intro_video_url_webm', $kleiderordnung_currentPageId)) || | ||
!empty(get_field('page_intro_video_url_webp', $kleiderordnung_currentPageId)) | ||
): ?> | ||
<?php _e( 'or', 'kleiderordnung' ) ?> | ||
<?php endif ?> | ||
<?php if (!empty(get_field('page_intro_video_url_mp4', $kleiderordnung_currentPageId))): ?> | ||
<a href="<?php | ||
echo esc_html(get_field('page_intro_video_url_mp4', $kleiderordnung_currentPageId)) | ||
?>"/> | ||
<?php endif ?> | ||
</video> | ||
<?php endif ?> |