From dc45868d7048634df74f798688e9e975455fab69 Mon Sep 17 00:00:00 2001
From: Ingo Steinke
Date: Mon, 6 Nov 2023 19:25:41 +0100
Subject: [PATCH] add video option #65
---
...eiderordnung-register-custom-post-type.php | 41 ++++++++++-
src/front-page.php | 2 +-
src/inc/structure/intro.php | 4 +
src/inc/structure/video-from-page-fields.php | 73 +++++++++++++++++++
src/inc/structure/video.php | 68 +++++++++++++++++
5 files changed, 184 insertions(+), 4 deletions(-)
create mode 100644 src/inc/structure/video-from-page-fields.php
create mode 100644 src/inc/structure/video.php
diff --git a/mu-plugins/kleiderordnung-register-custom-post-type.php b/mu-plugins/kleiderordnung-register-custom-post-type.php
index dd23f42..c1c24f5 100644
--- a/mu-plugins/kleiderordnung-register-custom-post-type.php
+++ b/mu-plugins/kleiderordnung-register-custom-post-type.php
@@ -2,10 +2,10 @@
/**
* @package KleiderOrdnung
* @author openmindculture
- * @version 3.2.2
+ * @version 3.2.3
*
* @wordpress-plugin
- * Version: 3.2.2
+ * Version: 3.2.3
* Tested up to: 6.4
* Plugin Name: Kleiderordnung Register Custom Post Types
* Text Domain: kleiderordnung-register-custom-post-types
@@ -359,7 +359,42 @@ function kleiderordnung_register_custom_page_fields() {
),
),
),
- ) );
+ ));
+ acf_add_local_field_group( array(
+ 'key' => 'page_field_group_video',
+ 'title' => 'Intro-Video (optional)',
+ 'position' => 'normal',
+ 'fields' => array(
+ array(
+ 'key' => 'page_intro_video_webm',
+ 'name' => 'page_intro_video_webm',
+ 'type' => 'image',
+ 'label' => 'Video: WEBM-Datei aus Mediathek auswählen/hochladen ("Bild hinzufügen")',
+ ),
+ array(
+ 'key' => 'page_intro_video_url_mp4',
+ 'name' => 'page_intro_video_url_mp4',
+ 'type' => 'image',
+ 'label' => 'Video: MP4-Datei aus Mediathek auswählen/hochladen ("Bild hinzufügen")',
+ ),
+ array(
+ 'key' => 'page_intro_video_poster_image_url',
+ 'name' => 'page_intro_video_poster_image_url',
+ 'type' => 'image',
+ 'label' => 'Intro Video Standbild (aus Mediathek auswählen/hochladen)',
+ ),
+ ),
+ 'location' => array(
+ array(
+ array(
+ 'param' => 'post_type',
+ 'operator' => '==',
+ 'value' => 'page',
+ ),
+ ),
+ ),
+ ),
+ );
}
add_action( 'init', 'kleiderordnung_register_post_type_story' );
diff --git a/src/front-page.php b/src/front-page.php
index 6406335..9207770 100644
--- a/src/front-page.php
+++ b/src/front-page.php
@@ -13,7 +13,7 @@
include( KLEIDERORDNUNG_DIR . '/inc/structure/mission.php');
include( KLEIDERORDNUNG_DIR . '/inc/structure/calltoaction.php');
include( KLEIDERORDNUNG_DIR . '/inc/structure/stories.php');
- $isNewsTeaser = True;
+ $isNewsTeaser = true;
include( KLEIDERORDNUNG_DIR . '/inc/structure/news.php');
include( KLEIDERORDNUNG_DIR . '/inc/structure/socialmedia.php');
include( KLEIDERORDNUNG_DIR . '/inc/structure/contact.php');
diff --git a/src/inc/structure/intro.php b/src/inc/structure/intro.php
index 09a9d66..d4a9713 100644
--- a/src/inc/structure/intro.php
+++ b/src/inc/structure/intro.php
@@ -56,4 +56,8 @@ class="initially-hidden"
+
diff --git a/src/inc/structure/video-from-page-fields.php b/src/inc/structure/video-from-page-fields.php
new file mode 100644
index 0000000..c340943
--- /dev/null
+++ b/src/inc/structure/video-from-page-fields.php
@@ -0,0 +1,73 @@
+
+
+
+
diff --git a/src/inc/structure/video.php b/src/inc/structure/video.php
new file mode 100644
index 0000000..169b3e9
--- /dev/null
+++ b/src/inc/structure/video.php
@@ -0,0 +1,68 @@
+
+Verflixte Zeitverschwendung! page_intro_video_poster_image_url
+gettype(get_field('page_intro_video_poster_image_url', $kleiderordnung_currentPageId))):
+
+
var_export(get_field..., true):
+
+
+