From ebb75cfe964a423486d905b9274d3da8516733f8 Mon Sep 17 00:00:00 2001 From: "T. Kameda" Date: Tue, 27 Oct 2020 17:44:24 +0900 Subject: [PATCH] =?UTF-8?q?=E5=85=A8podcast=E3=81=B8=E3=81=AE=E3=83=AA?= =?UTF-8?q?=E3=83=B3=E3=82=AF=E3=81=AE=E8=BF=BD=E5=8A=A0=E3=81=AA=E3=81=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - シリーズ一覧で「全podcast」へのリンクを追加 - 全podcast のページを改良(登録ボタンなど) - エピソードの段組表示のレスポンシブを改良 --- archive-podcast.php | 61 ++++++++++++++++- functions.php | 132 +----------------------------------- includes/shortcode.php | 148 +++++++++++++++++++++++++++++++++++++++++ style.css | 20 ++++-- 4 files changed, 223 insertions(+), 138 deletions(-) create mode 100644 includes/shortcode.php diff --git a/archive-podcast.php b/archive-podcast.php index b38ec6e..3499ddd 100644 --- a/archive-podcast.php +++ b/archive-podcast.php @@ -7,6 +7,18 @@ * @package BusinessPress */ +$series_image = get_option( 'ss_podcasting_data_image', 'no-image' ); +$series_feed = get_home_url() . '/feed/podcast/bpcast_token/' . bpcast_get_user_token() . '/'; + +$feed_podcast = preg_replace( '/^http.?:/', 'podcast:', $series_feed ); +$feed_itunes = preg_replace( '/^http.?:/', 'pcast:', $series_feed ); +$feed_ovcast = 'overcast://x-callback-url/add?url=' . $series_feed; +$feed_castro = preg_replace( '/^http.?:/', 'podto:', $series_feed ); + +$archive_title = get_option( 'ss_podcasting_data_title', 'Podcast' ); +$archive_description = get_option( 'ss_podcasting_data_subtitle', '' ); + + get_header(); ?>
@@ -15,7 +27,54 @@
diff --git a/functions.php b/functions.php index 5b694e6..09bc111 100644 --- a/functions.php +++ b/functions.php @@ -49,137 +49,7 @@ function enqueue_our_required_stylesheets(){ require_once 'includes/frontend.php'; } - -// shortcode -function bplib_shortcode( $atts ) { - if ( isset( $atts['q'] ) ) { - $q = $atts['q']; - } else { - $q = 'series'; - } - - $msg = ''; - $tax_query = array(); - switch ( $q ) { - case 'welcome' : - case 'featured' : - $tax_query = array( - array( - 'taxonomy' => 'post_tag', - 'field' => 'slug', - 'terms' => $q, - ), - ); - case 'latest' : - $args = array( - 'post_type' => 'podcast', - 'tax_query' => $tax_query, - ); - $the_query = new WP_Query( $args ); - - if ( $the_query->have_posts() ) { - remove_filter( 'has_post_thumbnail', 'bpcast_disable_thumbnail', 10 ); - ob_start(); - ?> -
- have_posts() ) { - $the_query->the_post(); - ?> -
-
> -
- -
- -
- - -

- -
-
-

-
-
-
- -
- 投稿はありません

'; - } - break; - - default: - $terms = get_terms( 'series' ); - - ob_start(); - ?> -
- - term_id; - $series_image = get_option( 'ss_podcasting_data_image_' . $series_id, 'no-image' ); - ?> -
-
-
- -
-
-

name; ?>

-
description; ?>
-
-
-
- -
- - - 'post_tag', + 'field' => 'slug', + 'terms' => $q, + ), + ); + case 'latest' : + $args = array( + 'post_type' => 'podcast', + 'tax_query' => $tax_query, + ); + $the_query = new WP_Query( $args ); + + if ( $the_query->have_posts() ) { + remove_filter( 'has_post_thumbnail', 'bpcast_disable_thumbnail', 10 ); + ob_start(); + ?> +
+ have_posts() ) { + $the_query->the_post(); + ?> +
+
> +
+ +
+ +
+ + +

+ +
+
+

+
+
+
+ +
+ 投稿はありません

'; + } + break; + + default: + $terms = get_terms( 'series' ); + + $series_image = get_option( 'ss_podcasting_data_image', 'no-image' ); + $series_url = get_home_url() . '/podcast/'; + $arce_title = get_option( 'ss_podcasting_data_title', 'Podcast' ); + $arc_description = get_option( 'ss_podcasting_data_subtitle', '' ); + + ob_start(); + ?> +
+
+
+
+ +
+
+

+
+
+
+
+ + + term_id; + $series_image = get_option( 'ss_podcasting_data_image_' . $series_id, 'no-image' ); + ?> +
+
+
+ +
+
+

name; ?>

+
description; ?>
+
+
+
+ +
+ + +