From 5cfb2d24c6cd52c971509f3a936bf03325c3db92 Mon Sep 17 00:00:00 2001 From: Nikola Date: Tue, 6 Feb 2018 15:36:30 +0100 Subject: [PATCH 01/87] Update contributing guidelines --- CONTRIBUTING.md | 35 +++++++++++++++++++---------------- 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7c74c50..70f25e8 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -14,6 +14,9 @@ Contributions via [pull request](https://github.com/WP-for-Church/Sermon-Manager and [bug reports](https://github.com/WP-for-Church/Sermon-Manager/issues) are welcome! Please submit your pull request to the `develop` branch and use the GitHub issue tracker to report issues. +**Note!** If you have detected any security issues, please write an email to nikola@wpforchurch.com. Do not submit it on the +public forum or in a public GitHub issue. + ### Translations Is the plugin not available in your language or are some translations missing? @@ -24,6 +27,8 @@ Create an account on [wordpress.org](wordpress.org) and you can start translatin [Sermon Manager's page](https://translate.wordpress.org/projects/wp-plugins/sermon-manager-for-wordpress). No coding skills are required at all. +(Our integration with GlotPress is still not ready) + # Development The default branch for the Sermon Manager repository on GitHub is **"master"**, while there is another important branch @@ -31,7 +36,8 @@ called **"dev"** (shortened for "develop"). Each of them serves their own purpos ### master branch The **"master"** branch is a stable branch, and gets updated only on releases. Whenever people checkout/download the -**"master"** branch, they get the source code of the latest official release of the Sermon Manager. +**"master"** branch, they get the source code of the latest official release of the Sermon Manager. (same as if they +downloaded the latest version on WordPress) ### dev branch The **"dev"** branch, is where commits during development are integrated into. It is where the WP For Church team @@ -39,9 +45,8 @@ pushes or merges their actual changes together and where contributions from the integrated into the development version of the plugin. Anyone who wish to try the cutting edge version of Sermon Manager can download the develop branch and install it on their website. -(Note: whenever a commit is created on develop branch, a -development zip package is created by WordPress, which can be downloaded from -[here](https://downloads.wordpress.org/plugin/sermon-manager-for-wordpress.zip).) +(Note: whenever a commit is created on develop branch, a development zip package is created by WordPress, which can be +downloaded from [here](https://downloads.wordpress.org/plugin/sermon-manager-for-wordpress.zip).) Pull requests are always merged into the **"dev"** branch. If you are willing to contribute, make sure that you are sending us pull requests against the dev branch but not the *master* branch. @@ -61,17 +66,15 @@ changes easily. #### In short: -- Features get developed on **feature branches**, either in your local repository or pushed to GitHub. Feature branches +- Big features get developed on **feature branches**, either in your local repository or pushed to GitHub. Feature branches can be rebased. - Once ready, **feature branches** are PR'd to **dev**. -- When the WPFC team wants to make a release, **dev** is branched into a **release branch**. Any necessary stabilization -work happens there, including final changes and testing; **dev** is never frozen, and efforts to PR in **feature branches** -should not stop just because a release is happening. -- When a release is made, the **release branch** is pushed to **master** and **master** is tagged at that point. -- If hotfixes need to be made, then they can be made on the **release branch**. Anything that also applies to the -**development branch** is first committed there, then cherry-picked to the **release branch**. The **release branch** -is then pushed to **master** (again), and tagged (again), going from e.g. 2.10.1 to 2.10.2. -- **dev**, **master** and the **release branches** are all protected; no rebasing happens there. - -(Note: Until 2018-01-19, **release branches** were deleted once they were merged into **master**. That was not a smart move, -since it would be hard to create a hotfix once there is a significant progress on **dev**.) +- When the WPFC team wants to make a release, **dev** is branched into a **release branch**. Version gets bumped, necessary +stabilization work happens, including final changes and testing, on that branch. (**dev** is never frozen, and efforts to PR +in **feature branches** should not stop just because a release is happening) +- When a release is ready to be released, the **release branch** is merged into **dev** & **master**, **master** is tagged +at that point. +- If hotfixes need to be made, then a **hotfix branch** is created from **master** and all necessary fixes are applied on it. +After the critical bug has been fixed and version has been bumped, **hotfix branch** is merged into **master** and **dev**, +and **master** is tagged with at that point. +- **dev** and **master** are protected; no rebasing happens there. From aae3d6bcefde3d30b25dd8b544509202075f9b68 Mon Sep 17 00:00:00 2001 From: Nikola Date: Tue, 6 Feb 2018 19:55:50 +0100 Subject: [PATCH 02/87] Load audio player assets even when SM assets are disabled --- readme.txt | 3 +++ sermons.php | 22 +++++++++++----------- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/readme.txt b/readme.txt index b416b70..453fc81 100755 --- a/readme.txt +++ b/readme.txt @@ -102,6 +102,9 @@ Visit the [plugin homepage](https://wpforchurch.com/wordpress-plugins/sermon-man 2. Sermon Files ## Changelog ## +### 2.12.0 ### +* Fix: Audio player defaults to "Browser HTML5" when "Disable Sermon Styles" option is checked + ### 2.11.3 ### * Fix: Sermon date not being saved when date format is changed * Fix: YouTube short URL was not being detected (thanks @macbookandrew) diff --git a/sermons.php b/sermons.php index eb15ac7..a4bd177 100755 --- a/sermons.php +++ b/sermons.php @@ -517,20 +517,20 @@ public static function enqueue_scripts_styles() { if ( ! \SermonManager::getOption( 'css' ) ) { wp_enqueue_style( 'wpfc-sm-styles', SM_URL . 'assets/css/sermon.css', array(), SM_VERSION ); wp_enqueue_style( 'dashicons' ); + } - switch ( \SermonManager::getOption( 'player' ) ) { - case 'mediaelement': - wp_enqueue_script( 'wp-mediaelement' ); + switch ( \SermonManager::getOption( 'player' ) ) { + case 'mediaelement': + wp_enqueue_script( 'wp-mediaelement' ); - break; - case 'plyr': - wp_enqueue_script( 'wpfc-sm-plyr', SM_URL . 'assets/js/plyr.js', array(), SM_VERSION ); - wp_enqueue_style( 'wpfc-sm-plyr-css', SM_URL . 'assets/css/plyr.css', array(), SM_VERSION ); - wp_add_inline_script( 'wpfc-sm-plyr', 'window.onload=function(){plyr.setup(document.querySelectorAll(\'.wpfc-sermon-player, .wpfc-sermon-video-player\'));}' ); + break; + case 'plyr': + wp_enqueue_script( 'wpfc-sm-plyr', SM_URL . 'assets/js/plyr.js', array(), SM_VERSION ); + wp_enqueue_style( 'wpfc-sm-plyr-css', SM_URL . 'assets/css/plyr.css', array(), SM_VERSION ); + wp_add_inline_script( 'wpfc-sm-plyr', 'window.onload=function(){plyr.setup(document.querySelectorAl$ - break; - } - } + break; + } if ( ! \SermonManager::getOption( 'verse_popup' ) ) { wp_enqueue_script( 'wpfc-sm-verse-script', SM_URL . 'assets/js/verse.js', array(), SM_VERSION ); From 5c1ee3dbf34d9d6b0be5367e414b1141dcb2ab58 Mon Sep 17 00:00:00 2001 From: Nikola Date: Tue, 6 Feb 2018 20:01:46 +0100 Subject: [PATCH 03/87] Improve Plyr initialization JS --- readme.txt | 2 ++ sermons.php | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/readme.txt b/readme.txt index 453fc81..cbcbd9a 100755 --- a/readme.txt +++ b/readme.txt @@ -104,6 +104,8 @@ Visit the [plugin homepage](https://wpforchurch.com/wordpress-plugins/sermon-man ## Changelog ## ### 2.12.0 ### * Fix: Audio player defaults to "Browser HTML5" when "Disable Sermon Styles" option is checked +* Fix: Plyr sometimes not loading +* Dev: Load Plyr earlier ### 2.11.3 ### * Fix: Sermon date not being saved when date format is changed diff --git a/sermons.php b/sermons.php index a4bd177..796597e 100755 --- a/sermons.php +++ b/sermons.php @@ -527,7 +527,7 @@ public static function enqueue_scripts_styles() { case 'plyr': wp_enqueue_script( 'wpfc-sm-plyr', SM_URL . 'assets/js/plyr.js', array(), SM_VERSION ); wp_enqueue_style( 'wpfc-sm-plyr-css', SM_URL . 'assets/css/plyr.css', array(), SM_VERSION ); - wp_add_inline_script( 'wpfc-sm-plyr', 'window.onload=function(){plyr.setup(document.querySelectorAl$ + wp_add_inline_script( 'wpfc-sm-plyr', 'window.addEventListener(\'DOMContentLoaded\', function() {plyr.setup(document.querySelectorAll(\'.wpfc-sermon-player, .wpfc-sermon-video-player\'));})' ); break; } From d27a0946397b1f3d7d7af2db4b77f143c9a787d5 Mon Sep 17 00:00:00 2001 From: Adrian Ionescu <9744973+adrianweb@users.noreply.github.com> Date: Fri, 9 Feb 2018 14:13:57 +0000 Subject: [PATCH 04/87] initial v2 views draft --- assets/css/sermon.css | 103 ++++++++++++++++++++ includes/template-tags.php | 127 +++++++++++++++++++++++++ views/archive-wpfc_sermon.php | 61 ++++-------- views/single-wpfc_sermon.php | 54 ++++------- views/taxonomy-wpfc_bible_book.php | 122 ++++-------------------- views/taxonomy-wpfc_preacher.php | 128 ++++--------------------- views/taxonomy-wpfc_sermon_series.php | 129 ++++---------------------- views/taxonomy-wpfc_sermon_topics.php | 129 ++++---------------------- views/taxonomy-wpfc_service_type.php | 122 ++++-------------------- 9 files changed, 367 insertions(+), 608 deletions(-) diff --git a/assets/css/sermon.css b/assets/css/sermon.css index fb2cf11..eecf972 100755 --- a/assets/css/sermon.css +++ b/assets/css/sermon.css @@ -320,3 +320,106 @@ h3.wpfc_grid_title a { .wpfc_worship_audio .wp-playlist { border: 0px !important; } + +/* Archive View V2 */ +.wpfc-sermon { + margin-bottom: 60px; +} + +.wpfc-sermon:last-child { + margin-bottom: 0; +} + +.wpfc-sermon-inner { + border: 1px solid #efefef; +} + +.wpfc-sermon-image img { + display: block; + max-width: 100%; + width: 100%; +} + +.wpfc-sermon-main { + padding: 24px; +} + +.wpfc-sermon-title { + margin: 0; +} + +.wpfc-sermon-meta { + margin-top: 24px; +} + +.wpfc-sermon-description { + margin-top: 24px; +} + +.wpfc-sermon-description p { + margin: 0 0 24px 0; +} + +.wpfc-sermon-description p:last-child { + margin-bottom: 0; +} + +/* Single View V2 */ +.wpfc-sermon-single-image { + margin-bottom: 24px; +} + +.wpfc-sermon-single-image img { + display: block; + max-width: 100%; + width: 100%; +} + +.wpfc-sermon-single-title { + margin: 0; +} + +.wpfc-sermon-single-meta { + margin-top: 24px; +} + +.wpfc-sermon-single-media { + margin: 24px 0; +} + +.wpfc-sermon-single-media > div { + margin: 0 0 24px 0; + max-width: 100%; + width: 100%; +} + +.wpfc-sermon-single-media > div:last-child { + margin-bottom: 0; +} + +.wpfc-sermon-single-description { + margin-top: 24px; +} + +.wpfc-sermon-single-attachments { + background: #efefef; + border: 1px solid #ddd; + padding: 24px; + margin-top: 24px; +} + +.wpfc-sermon-single-topics { + margin-top: 24px; +} + +.wpfc-sermon-single-topics-prefix, +.wpfc-sermon-single-topics a { + display: inline-block; + padding: 5px 10px; + margin-bottom: 3px; + border: 1px solid #efefef; +} + +.wpfc-sermon-single-topics-prefix { + background: #efefef; +} \ No newline at end of file diff --git a/includes/template-tags.php b/includes/template-tags.php index b8c4b0a..9590f7b 100755 --- a/includes/template-tags.php +++ b/includes/template-tags.php @@ -512,6 +512,67 @@ function wpfc_sermon_single( $return = false, $post = '' ) { return $output; } +// single sermon action +function wpfc_sermon_single_v2( $return = false, $post = '' ) { + if ( $post === '' ) { + global $post; + } + + ob_start(); + ?> + +
+
+
+ +
+
+
+

+
+
+ Date: + +
+
+ Preacher: + ID, 'wpfc_preacher') ?> +
+
+ Series: + ID, 'wpfc_sermon_series') ?> +
+
+ Passage: + +
+
+ Service Type: + ID, 'wpfc_service_type') ?> +
+
+
+
+
+
+
+ Topics + ID, 'wpfc_sermon_topics') ?> +
+
+
+
+ + +
+
+
+ + + +
+
+
+

+ +

+
+
+ Date: + +
+
+ Preacher: + ID, 'wpfc_preacher') ?> +
+
+ Series: + ID, 'wpfc_sermon_series') ?> +
+
+ Passage: + +
+
+ Service Type: + ID, 'wpfc_service_type') ?> +
+
+
+
+
+
+
+ + -
- - - - + if ( have_posts() ) : -
-
+ while ( have_posts() ) : the_post(); - - + endif; + ?> -
-
- -
+ + + + +
-
-
-
> -

- - - -
- ', '' ); ?> -
-
- - - - -
-
+
+
+ + + +
+
+ -
+ -/** - * The template for displaying Sermon Topics pages. - * - * @package WordPress - * @subpackage Twenty_Ten - * @since Twenty Ten 1.0 - */ - -get_header(); - -?> - -
-
- -

' . esc_html( single_cat_title( '', false ) ) . '' ); - ?>

-
+
+
+
+ ' . $category_description . '
'; - } - ?> -
- - - max_num_pages > 1 ) : ?> - - + if ( have_posts() ) : - - -
-

-
-

- -
-
- + while ( have_posts() ) : the_post(); - - + wpfc_sermon_excerpt_v2(); -
> -

+ endwhile; - + the_posts_pagination(); -
- -
+ else : -
- ID ); ?> - approved ), 'sermon-manager-for-wordpress' ) ), number_format_i18n( $approved_comments_count ) ) ); ?> - | ', '' ); ?> -
-
+ __('Sorry, but there aren\'t any posts matching your query.', 'placeholder'); - - - - max_num_pages > 1 ) : ?> - - + endif; + ?> -
-
+ +
+ + + - - + -/** - * The template for displaying Preacher pages. - * - * @package WordPress - * @subpackage Twenty_Ten - * @since Twenty Ten 1.0 - */ - -get_header(); - -?> - -
-
- -

' . esc_html( single_cat_title( '', false ) ) . '' ); - ?>

-
+
+
+
+ array( 'class' => 'alignleft' ), - 'after' => '
', - 'before' => '
', - 'image_size' => 'thumbnail', - ) ); - /* Description */ - $category_description = category_description(); - if ( ! empty( $category_description ) ) { - echo '
' . $category_description . '
'; - } - ?> -
- - max_num_pages > 1 ) : ?> - - - - - -
-

-
-

- -
-
- + if ( have_posts() ) : - - + while ( have_posts() ) : the_post(); -
> -

+ wpfc_sermon_excerpt_v2(); - + endwhile; -
- -
+ the_posts_pagination(); -
- ID ); ?> - approved ), 'sermon-manager-for-wordpress' ) ), number_format_i18n( $approved_comments_count ) ) ); ?> - | ', '' ); ?> -
-
+ else : - + __('Sorry, but there aren\'t any posts matching your query.', 'placeholder'); - - max_num_pages > 1 ) : ?> - - + endif; + ?> -
-
+ +
+ + +
- - + -/** - * The template for displaying Sermon Series pages. - * - * @package WordPress - * @subpackage Twenty_Ten - * @since Twenty Ten 1.0 - */ - -get_header(); - -?> - -
-
- -

' . esc_html( single_cat_title( '', false ) ) . '' ); - ?>

-
+
+
+
+ array( 'class' => 'alignleft' ), - 'after' => '
', - 'before' => '
', - 'image_size' => 'sermon-wide', - ) ); - /* Description */ - $category_description = category_description(); - if ( ! empty( $category_description ) ) { - echo '
' . $category_description . '
'; - } - ?> -
- - - max_num_pages > 1 ) : ?> - - + if ( have_posts() ) : - - -
-

-
-

- -
-
- + while ( have_posts() ) : the_post(); - - + wpfc_sermon_excerpt_v2(); -
> -

+ endwhile; - + the_posts_pagination(); -
- -
+ else : -
- ID ); ?> - approved ), 'sermon-manager-for-wordpress' ) ), number_format_i18n( $approved_comments_count ) ) ); ?> - | ', '' ); ?> -
-
+ __('Sorry, but there aren\'t any posts matching your query.', 'placeholder'); - - - - max_num_pages > 1 ) : ?> - - + endif; + ?> -
-
+ +
+ + +
- - + -/** - * The template for displaying Sermon Topics pages. - * - * @package WordPress - * @subpackage Twenty_Ten - * @since Twenty Ten 1.0 - */ - -get_header(); - -?> - -
-
- -

' . esc_html( single_cat_title( '', false ) ) . '' ); - ?>

-
+
+
+
+ array( 'class' => 'alignleft' ), - 'after' => '
', - 'before' => '
', - 'image_size' => 'thumbnail', - ) ); - /* Description */ - $category_description = category_description(); - if ( ! empty( $category_description ) ) { - echo '
' . $category_description . '
'; - } - ?> -
- - - max_num_pages > 1 ) : ?> - - + if ( have_posts() ) : - - -
-

-
-

- -
-
- + while ( have_posts() ) : the_post(); - - + wpfc_sermon_excerpt_v2(); -
> -

+ endwhile; - + the_posts_pagination(); -
- -
+ else : -
- ID ); ?> - approved ), 'sermon-manager-for-wordpress' ) ), number_format_i18n( $approved_comments_count ) ) ); ?> - | ', '' ); ?> -
-
+ __('Sorry, but there aren\'t any posts matching your query.', 'placeholder'); - - - - max_num_pages > 1 ) : ?> - - + endif; + ?> -
-
+ +
+ + +
- - + -/** - * The template for displaying Sermon Topics pages. - * - * @package WordPress - * @subpackage Twenty_Ten - * @since Twenty Ten 1.0 - */ - -get_header(); - -?> - -
-
- -

' . esc_html( single_cat_title( '', false ) ) . '' ); - ?>

-
+
+
+
+ ' . $category_description . '
'; - } - ?> -
- - - max_num_pages > 1 ) : ?> - - + if ( have_posts() ) : - - -
-

-
-

- -
-
- + while ( have_posts() ) : the_post(); - - + wpfc_sermon_excerpt_v2(); -
> -

+ endwhile; - + the_posts_pagination(); -
- -
+ else : -
- ID ); ?> - approved ), 'sermon-manager-for-wordpress' ) ), number_format_i18n( $approved_comments_count ) ) ); ?> - | ', '' ); ?> -
-
+ __('Sorry, but there aren\'t any posts matching your query.', 'placeholder'); - - - - max_num_pages > 1 ) : ?> - - + endif; + ?> -
-
+ +
+ + + - - + Date: Fri, 9 Feb 2018 14:15:56 +0000 Subject: [PATCH 05/87] Revert "initial v2 views draft" This reverts commit d27a0946397b1f3d7d7af2db4b77f143c9a787d5. --- assets/css/sermon.css | 103 -------------------- includes/template-tags.php | 127 ------------------------- views/archive-wpfc_sermon.php | 61 ++++++++---- views/single-wpfc_sermon.php | 54 +++++++---- views/taxonomy-wpfc_bible_book.php | 122 ++++++++++++++++++++---- views/taxonomy-wpfc_preacher.php | 128 +++++++++++++++++++++---- views/taxonomy-wpfc_sermon_series.php | 129 ++++++++++++++++++++++---- views/taxonomy-wpfc_sermon_topics.php | 129 ++++++++++++++++++++++---- views/taxonomy-wpfc_service_type.php | 122 ++++++++++++++++++++---- 9 files changed, 608 insertions(+), 367 deletions(-) diff --git a/assets/css/sermon.css b/assets/css/sermon.css index eecf972..fb2cf11 100755 --- a/assets/css/sermon.css +++ b/assets/css/sermon.css @@ -320,106 +320,3 @@ h3.wpfc_grid_title a { .wpfc_worship_audio .wp-playlist { border: 0px !important; } - -/* Archive View V2 */ -.wpfc-sermon { - margin-bottom: 60px; -} - -.wpfc-sermon:last-child { - margin-bottom: 0; -} - -.wpfc-sermon-inner { - border: 1px solid #efefef; -} - -.wpfc-sermon-image img { - display: block; - max-width: 100%; - width: 100%; -} - -.wpfc-sermon-main { - padding: 24px; -} - -.wpfc-sermon-title { - margin: 0; -} - -.wpfc-sermon-meta { - margin-top: 24px; -} - -.wpfc-sermon-description { - margin-top: 24px; -} - -.wpfc-sermon-description p { - margin: 0 0 24px 0; -} - -.wpfc-sermon-description p:last-child { - margin-bottom: 0; -} - -/* Single View V2 */ -.wpfc-sermon-single-image { - margin-bottom: 24px; -} - -.wpfc-sermon-single-image img { - display: block; - max-width: 100%; - width: 100%; -} - -.wpfc-sermon-single-title { - margin: 0; -} - -.wpfc-sermon-single-meta { - margin-top: 24px; -} - -.wpfc-sermon-single-media { - margin: 24px 0; -} - -.wpfc-sermon-single-media > div { - margin: 0 0 24px 0; - max-width: 100%; - width: 100%; -} - -.wpfc-sermon-single-media > div:last-child { - margin-bottom: 0; -} - -.wpfc-sermon-single-description { - margin-top: 24px; -} - -.wpfc-sermon-single-attachments { - background: #efefef; - border: 1px solid #ddd; - padding: 24px; - margin-top: 24px; -} - -.wpfc-sermon-single-topics { - margin-top: 24px; -} - -.wpfc-sermon-single-topics-prefix, -.wpfc-sermon-single-topics a { - display: inline-block; - padding: 5px 10px; - margin-bottom: 3px; - border: 1px solid #efefef; -} - -.wpfc-sermon-single-topics-prefix { - background: #efefef; -} \ No newline at end of file diff --git a/includes/template-tags.php b/includes/template-tags.php index 9590f7b..b8c4b0a 100755 --- a/includes/template-tags.php +++ b/includes/template-tags.php @@ -512,67 +512,6 @@ function wpfc_sermon_single( $return = false, $post = '' ) { return $output; } -// single sermon action -function wpfc_sermon_single_v2( $return = false, $post = '' ) { - if ( $post === '' ) { - global $post; - } - - ob_start(); - ?> - -
-
-
- -
-
-
-

-
-
- Date: - -
-
- Preacher: - ID, 'wpfc_preacher') ?> -
-
- Series: - ID, 'wpfc_sermon_series') ?> -
-
- Passage: - -
-
- Service Type: - ID, 'wpfc_service_type') ?> -
-
-
-
-
-
-
- Topics - ID, 'wpfc_sermon_topics') ?> -
-
-
-
- - -
-
-
- - - -
-
-
-

- -

-
-
- Date: - -
-
- Preacher: - ID, 'wpfc_preacher') ?> -
-
- Series: - ID, 'wpfc_sermon_series') ?> -
-
- Passage: - -
-
- Service Type: - ID, 'wpfc_service_type') ?> -
-
-
-
-
-
-
- - -
-
-
- +
+ + + + - while ( have_posts() ) : the_post(); +
+
- wpfc_sermon_excerpt_v2(); + + + endif; ?> -
-
- - -
+
+
+ +
- -
-
-
- - - -
-
+get_header(); ?> +
+
+
+
> +

+ + + +
+ ', '' ); ?> +
+
+ + + + +
+
-
+
+defined( 'ABSPATH' ) or die; // exit if accessed directly -
-
-
- +/** + * The template for displaying Sermon Topics pages. + * + * @package WordPress + * @subpackage Twenty_Ten + * @since Twenty Ten 1.0 + */ + +get_header(); + +?> + +
+
+ +

' . esc_html( single_cat_title( '', false ) ) . '' ); + ?>

+
' . $category_description . '
'; + } + ?> +
- while ( have_posts() ) : the_post(); + + max_num_pages > 1 ) : ?> + + - wpfc_sermon_excerpt_v2(); + + +
+

+
+

+ +
+
+ - endwhile; + + - the_posts_pagination(); +
> +

- else : + - __('Sorry, but there aren\'t any posts matching your query.', 'placeholder'); +
+ +
- endif; - ?> +
+ ID ); ?> + approved ), 'sermon-manager-for-wordpress' ) ), number_format_i18n( $approved_comments_count ) ) ); ?> + | ', '' ); ?> +
+
+ + + + + max_num_pages > 1 ) : ?> + + -
-
- - -
+ + - + diff --git a/views/taxonomy-wpfc_preacher.php b/views/taxonomy-wpfc_preacher.php index 2bbe192..e7d4496 100644 --- a/views/taxonomy-wpfc_preacher.php +++ b/views/taxonomy-wpfc_preacher.php @@ -1,32 +1,120 @@ +defined( 'ABSPATH' ) or die; // exit if accessed directly -
-
-
- +/** + * The template for displaying Preacher pages. + * + * @package WordPress + * @subpackage Twenty_Ten + * @since Twenty Ten 1.0 + */ + +get_header(); + +?> + +
+
+ +

' . esc_html( single_cat_title( '', false ) ) . '' ); + ?>

+
array( 'class' => 'alignleft' ), + 'after' => '
', + 'before' => '
', + 'image_size' => 'thumbnail', + ) ); + /* Description */ + $category_description = category_description(); + if ( ! empty( $category_description ) ) { + echo '
' . $category_description . '
'; + } + ?> +
+ + max_num_pages > 1 ) : ?> + + - while ( have_posts() ) : the_post(); + + +
+

+
+

+ +
+
+ - wpfc_sermon_excerpt_v2(); + + - endwhile; +
> +

- the_posts_pagination(); + - else : +
+ +
- __('Sorry, but there aren\'t any posts matching your query.', 'placeholder'); +
+ ID ); ?> + approved ), 'sermon-manager-for-wordpress' ) ), number_format_i18n( $approved_comments_count ) ) ); ?> + | ', '' ); ?> +
+
- endif; - ?> + + + + max_num_pages > 1 ) : ?> + + -
-
- - -
+ + - + diff --git a/views/taxonomy-wpfc_sermon_series.php b/views/taxonomy-wpfc_sermon_series.php index 2bbe192..cab9814 100644 --- a/views/taxonomy-wpfc_sermon_series.php +++ b/views/taxonomy-wpfc_sermon_series.php @@ -1,32 +1,121 @@ +defined( 'ABSPATH' ) or die; // exit if accessed directly -
-
-
- +/** + * The template for displaying Sermon Series pages. + * + * @package WordPress + * @subpackage Twenty_Ten + * @since Twenty Ten 1.0 + */ + +get_header(); + +?> + +
+
+ +

' . esc_html( single_cat_title( '', false ) ) . '' ); + ?>

+
array( 'class' => 'alignleft' ), + 'after' => '
', + 'before' => '
', + 'image_size' => 'sermon-wide', + ) ); + /* Description */ + $category_description = category_description(); + if ( ! empty( $category_description ) ) { + echo '
' . $category_description . '
'; + } + ?> +
- while ( have_posts() ) : the_post(); + + max_num_pages > 1 ) : ?> + + - wpfc_sermon_excerpt_v2(); + + +
+

+
+

+ +
+
+ - endwhile; + + - the_posts_pagination(); +
> +

- else : + - __('Sorry, but there aren\'t any posts matching your query.', 'placeholder'); +
+ +
- endif; - ?> +
+ ID ); ?> + approved ), 'sermon-manager-for-wordpress' ) ), number_format_i18n( $approved_comments_count ) ) ); ?> + | ', '' ); ?> +
+
+ + + + + max_num_pages > 1 ) : ?> + + -
-
- - -
+ + - + diff --git a/views/taxonomy-wpfc_sermon_topics.php b/views/taxonomy-wpfc_sermon_topics.php index 2bbe192..990f951 100644 --- a/views/taxonomy-wpfc_sermon_topics.php +++ b/views/taxonomy-wpfc_sermon_topics.php @@ -1,32 +1,121 @@ +defined( 'ABSPATH' ) or die; // exit if accessed directly -
-
-
- +/** + * The template for displaying Sermon Topics pages. + * + * @package WordPress + * @subpackage Twenty_Ten + * @since Twenty Ten 1.0 + */ + +get_header(); + +?> + +
+
+ +

' . esc_html( single_cat_title( '', false ) ) . '' ); + ?>

+
array( 'class' => 'alignleft' ), + 'after' => '
', + 'before' => '
', + 'image_size' => 'thumbnail', + ) ); + /* Description */ + $category_description = category_description(); + if ( ! empty( $category_description ) ) { + echo '
' . $category_description . '
'; + } + ?> +
- while ( have_posts() ) : the_post(); + + max_num_pages > 1 ) : ?> + + - wpfc_sermon_excerpt_v2(); + + +
+

+
+

+ +
+
+ - endwhile; + + - the_posts_pagination(); +
> +

- else : + - __('Sorry, but there aren\'t any posts matching your query.', 'placeholder'); +
+ +
- endif; - ?> +
+ ID ); ?> + approved ), 'sermon-manager-for-wordpress' ) ), number_format_i18n( $approved_comments_count ) ) ); ?> + | ', '' ); ?> +
+
+ + + + + max_num_pages > 1 ) : ?> + + -
-
- - -
+ + - + diff --git a/views/taxonomy-wpfc_service_type.php b/views/taxonomy-wpfc_service_type.php index 2bbe192..3b83bfa 100644 --- a/views/taxonomy-wpfc_service_type.php +++ b/views/taxonomy-wpfc_service_type.php @@ -1,32 +1,114 @@ +defined( 'ABSPATH' ) or die; // exit if accessed directly -
-
-
- +/** + * The template for displaying Sermon Topics pages. + * + * @package WordPress + * @subpackage Twenty_Ten + * @since Twenty Ten 1.0 + */ + +get_header(); + +?> + +
+
+ +

' . esc_html( single_cat_title( '', false ) ) . '' ); + ?>

+
' . $category_description . '
'; + } + ?> +
- while ( have_posts() ) : the_post(); + + max_num_pages > 1 ) : ?> + + - wpfc_sermon_excerpt_v2(); + + +
+

+
+

+ +
+
+ - endwhile; + + - the_posts_pagination(); +
> +

- else : + - __('Sorry, but there aren\'t any posts matching your query.', 'placeholder'); +
+ +
- endif; - ?> +
+ ID ); ?> + approved ), 'sermon-manager-for-wordpress' ) ), number_format_i18n( $approved_comments_count ) ) ); ?> + | ', '' ); ?> +
+
+ + + + + max_num_pages > 1 ) : ?> + + -
-
- - -
+ + - + From 194ef67cf7290ae4ed0332614fab040ce53d6bf9 Mon Sep 17 00:00:00 2001 From: Adrian Ionescu <9744973+adrianweb@users.noreply.github.com> Date: Fri, 9 Feb 2018 14:26:11 +0000 Subject: [PATCH 06/87] initial v2 views draft --- assets/css/sermon.css | 103 ++++++++++++++++++++ includes/template-tags.php | 128 +++++++++++++++++++++++- views/archive-wpfc_sermon.php | 68 ++++--------- views/single-wpfc_sermon.php | 47 +++------ views/taxonomy-wpfc_bible_book.php | 127 ++++-------------------- views/taxonomy-wpfc_preacher.php | 133 ++++--------------------- views/taxonomy-wpfc_sermon_series.php | 134 ++++---------------------- views/taxonomy-wpfc_sermon_topics.php | 134 ++++---------------------- views/taxonomy-wpfc_service_type.php | 127 ++++-------------------- 9 files changed, 357 insertions(+), 644 deletions(-) diff --git a/assets/css/sermon.css b/assets/css/sermon.css index fb2cf11..eecf972 100755 --- a/assets/css/sermon.css +++ b/assets/css/sermon.css @@ -320,3 +320,106 @@ h3.wpfc_grid_title a { .wpfc_worship_audio .wp-playlist { border: 0px !important; } + +/* Archive View V2 */ +.wpfc-sermon { + margin-bottom: 60px; +} + +.wpfc-sermon:last-child { + margin-bottom: 0; +} + +.wpfc-sermon-inner { + border: 1px solid #efefef; +} + +.wpfc-sermon-image img { + display: block; + max-width: 100%; + width: 100%; +} + +.wpfc-sermon-main { + padding: 24px; +} + +.wpfc-sermon-title { + margin: 0; +} + +.wpfc-sermon-meta { + margin-top: 24px; +} + +.wpfc-sermon-description { + margin-top: 24px; +} + +.wpfc-sermon-description p { + margin: 0 0 24px 0; +} + +.wpfc-sermon-description p:last-child { + margin-bottom: 0; +} + +/* Single View V2 */ +.wpfc-sermon-single-image { + margin-bottom: 24px; +} + +.wpfc-sermon-single-image img { + display: block; + max-width: 100%; + width: 100%; +} + +.wpfc-sermon-single-title { + margin: 0; +} + +.wpfc-sermon-single-meta { + margin-top: 24px; +} + +.wpfc-sermon-single-media { + margin: 24px 0; +} + +.wpfc-sermon-single-media > div { + margin: 0 0 24px 0; + max-width: 100%; + width: 100%; +} + +.wpfc-sermon-single-media > div:last-child { + margin-bottom: 0; +} + +.wpfc-sermon-single-description { + margin-top: 24px; +} + +.wpfc-sermon-single-attachments { + background: #efefef; + border: 1px solid #ddd; + padding: 24px; + margin-top: 24px; +} + +.wpfc-sermon-single-topics { + margin-top: 24px; +} + +.wpfc-sermon-single-topics-prefix, +.wpfc-sermon-single-topics a { + display: inline-block; + padding: 5px 10px; + margin-bottom: 3px; + border: 1px solid #efefef; +} + +.wpfc-sermon-single-topics-prefix { + background: #efefef; +} \ No newline at end of file diff --git a/includes/template-tags.php b/includes/template-tags.php index b8c4b0a..c1af4ff 100755 --- a/includes/template-tags.php +++ b/includes/template-tags.php @@ -512,6 +512,67 @@ function wpfc_sermon_single( $return = false, $post = '' ) { return $output; } +// single sermon action +function wpfc_sermon_single_v2( $return = false, $post = '' ) { + if ( $post === '' ) { + global $post; + } + + ob_start(); + ?> + +
+
+
+ +
+
+
+

+
+
+ Date: + +
+
+ Preacher: + ID, 'wpfc_preacher') ?> +
+
+ Series: + ID, 'wpfc_sermon_series') ?> +
+
+ Passage: + +
+
+ Service Type: + ID, 'wpfc_service_type') ?> +
+
+
+
+
+
+
+ Topics + ID, 'wpfc_sermon_topics') ?> +
+
+
+
+ + +
+
+
+ + + +
+
+
+

+ +

+
+
+ Date: + +
+
+ Preacher: + ID, 'wpfc_preacher') ?> +
+
+ Series: + ID, 'wpfc_sermon_series') ?> +
+
+ Passage: + +
+
+ Service Type: + ID, 'wpfc_service_type') ?> +
+
+
+
+
+
+
+ + -
- - - - - -
-
- - - - -
-
- -
- + + + + +
-
-
-
> -

- - +
+
-
- ', '' ); ?> -
-
+ - +
+
- - -
- + - -/** - * The template for displaying Sermon Topics pages. - * - * @package WordPress - * @subpackage Twenty_Ten - * @since Twenty Ten 1.0 - */ - -get_header(); - -?> - -
-
- -

' . esc_html( single_cat_title( '', false ) ) . '' ); - ?>

-
+
+
+
+ ' . $category_description . '
'; - } + if ( have_posts() ) : + while ( have_posts() ) : the_post(); + wpfc_sermon_excerpt_v2(); + endwhile; + the_posts_pagination(); + else : + __('Sorry, but there aren\'t any posts matching your query.', 'placeholder'); + endif; ?> -
- - - max_num_pages > 1 ) : ?> - - - - - -
-

-
-

- -
-
- - - - - -
> -

- - - -
- -
- -
- ID ); ?> - approved ), 'sermon-manager-for-wordpress' ) ), number_format_i18n( $approved_comments_count ) ) ); ?> - | ', '' ); ?> -
-
- - - - - max_num_pages > 1 ) : ?> - - -
-
+ +
+ + + - - + -/** - * The template for displaying Preacher pages. - * - * @package WordPress - * @subpackage Twenty_Ten - * @since Twenty Ten 1.0 - */ - -get_header(); - -?> - -
-
- -

' . esc_html( single_cat_title( '', false ) ) . '' ); - ?>

-
+
+
+
+ array( 'class' => 'alignleft' ), - 'after' => '
', - 'before' => '
', - 'image_size' => 'thumbnail', - ) ); - /* Description */ - $category_description = category_description(); - if ( ! empty( $category_description ) ) { - echo '
' . $category_description . '
'; - } + if ( have_posts() ) : + while ( have_posts() ) : the_post(); + wpfc_sermon_excerpt_v2(); + endwhile; + the_posts_pagination(); + else : + __('Sorry, but there aren\'t any posts matching your query.', 'placeholder'); + endif; ?> -
- - max_num_pages > 1 ) : ?> - - - - - -
-

-
-

- -
-
- - - - - -
> -

- - - -
- -
- -
- ID ); ?> - approved ), 'sermon-manager-for-wordpress' ) ), number_format_i18n( $approved_comments_count ) ) ); ?> - | ', '' ); ?> -
-
- - - - - max_num_pages > 1 ) : ?> - - -
-
+ +
+ + +
- - + -/** - * The template for displaying Sermon Series pages. - * - * @package WordPress - * @subpackage Twenty_Ten - * @since Twenty Ten 1.0 - */ - -get_header(); - -?> - -
-
- -

' . esc_html( single_cat_title( '', false ) ) . '' ); - ?>

-
+
+
+
+ array( 'class' => 'alignleft' ), - 'after' => '
', - 'before' => '
', - 'image_size' => 'sermon-wide', - ) ); - /* Description */ - $category_description = category_description(); - if ( ! empty( $category_description ) ) { - echo '
' . $category_description . '
'; - } + if ( have_posts() ) : + while ( have_posts() ) : the_post(); + wpfc_sermon_excerpt_v2(); + endwhile; + the_posts_pagination(); + else : + __('Sorry, but there aren\'t any posts matching your query.', 'placeholder'); + endif; ?> -
- - - max_num_pages > 1 ) : ?> - - - - - -
-

-
-

- -
-
- - - - - -
> -

- - - -
- -
- -
- ID ); ?> - approved ), 'sermon-manager-for-wordpress' ) ), number_format_i18n( $approved_comments_count ) ) ); ?> - | ', '' ); ?> -
-
- - - - - max_num_pages > 1 ) : ?> - - -
-
+ +
+ + +
- - + -/** - * The template for displaying Sermon Topics pages. - * - * @package WordPress - * @subpackage Twenty_Ten - * @since Twenty Ten 1.0 - */ - -get_header(); - -?> - -
-
- -

' . esc_html( single_cat_title( '', false ) ) . '' ); - ?>

-
+
+
+
+ array( 'class' => 'alignleft' ), - 'after' => '
', - 'before' => '
', - 'image_size' => 'thumbnail', - ) ); - /* Description */ - $category_description = category_description(); - if ( ! empty( $category_description ) ) { - echo '
' . $category_description . '
'; - } + if ( have_posts() ) : + while ( have_posts() ) : the_post(); + wpfc_sermon_excerpt_v2(); + endwhile; + the_posts_pagination(); + else : + __('Sorry, but there aren\'t any posts matching your query.', 'placeholder'); + endif; ?> -
- - - max_num_pages > 1 ) : ?> - - - - - -
-

-
-

- -
-
- - - - - -
> -

- - - -
- -
- -
- ID ); ?> - approved ), 'sermon-manager-for-wordpress' ) ), number_format_i18n( $approved_comments_count ) ) ); ?> - | ', '' ); ?> -
-
- - - - - max_num_pages > 1 ) : ?> - - -
-
+ +
+ + +
- - + -/** - * The template for displaying Sermon Topics pages. - * - * @package WordPress - * @subpackage Twenty_Ten - * @since Twenty Ten 1.0 - */ - -get_header(); - -?> - -
-
- -

' . esc_html( single_cat_title( '', false ) ) . '' ); - ?>

-
+
+
+
+ ' . $category_description . '
'; - } + if ( have_posts() ) : + while ( have_posts() ) : the_post(); + wpfc_sermon_excerpt_v2(); + endwhile; + the_posts_pagination(); + else : + __('Sorry, but there aren\'t any posts matching your query.', 'placeholder'); + endif; ?> -
- - - max_num_pages > 1 ) : ?> - - - - - -
-

-
-

- -
-
- - - - - -
> -

- - - -
- -
- -
- ID ); ?> - approved ), 'sermon-manager-for-wordpress' ) ), number_format_i18n( $approved_comments_count ) ) ); ?> - | ', '' ); ?> -
-
- - - - - max_num_pages > 1 ) : ?> - - -
-
+ +
+ + + - - + Date: Mon, 12 Feb 2018 14:05:35 +0000 Subject: [PATCH 07/87] conditionally render meta info --- includes/template-tags.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/includes/template-tags.php b/includes/template-tags.php index c1af4ff..a616916 100755 --- a/includes/template-tags.php +++ b/includes/template-tags.php @@ -534,22 +534,30 @@ function wpfc_sermon_single_v2( $return = false, $post = '' ) { Date: + ID)) :?>
Preacher: ID, 'wpfc_preacher') ?>
+ + ID)) :?>
Series: ID, 'wpfc_sermon_series') ?>
+ + ID, 'bible_passage', true)) :?>
Passage:
+ + ID)) :?>
Service Type: ID, 'wpfc_service_type') ?>
+
@@ -658,22 +666,30 @@ function wpfc_sermon_excerpt_v2( $return = false ) { Date: + ID)) :?>
Preacher: ID, 'wpfc_preacher') ?>
+ + ID)) :?>
Series: ID, 'wpfc_sermon_series') ?>
+ + ID, 'bible_passage', true)) :?>
Passage:
+ + ID)) :?>
Service Type: ID, 'wpfc_service_type') ?>
+
From ead628daf4d675dea0da12e6def654ab2abe0c02 Mon Sep 17 00:00:00 2001 From: Adrian Ionescu <9744973+adrianweb@users.noreply.github.com> Date: Mon, 12 Feb 2018 14:24:30 +0000 Subject: [PATCH 08/87] conditionally render sermon media --- includes/template-tags.php | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/includes/template-tags.php b/includes/template-tags.php index a616916..0c84862 100755 --- a/includes/template-tags.php +++ b/includes/template-tags.php @@ -560,7 +560,24 @@ function wpfc_sermon_single_v2( $return = false, $post = '' ) { -
+
+ + + + +
+ +
+ + + +
+ +
+ +
From b0a6390549047ddde881257ee11183b97a8780cf Mon Sep 17 00:00:00 2001 From: Adrian Ionescu <9744973+adrianweb@users.noreply.github.com> Date: Mon, 12 Feb 2018 14:26:16 +0000 Subject: [PATCH 09/87] conditionally render topics --- includes/template-tags.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/includes/template-tags.php b/includes/template-tags.php index 0c84862..cedb062 100755 --- a/includes/template-tags.php +++ b/includes/template-tags.php @@ -580,10 +580,12 @@ function wpfc_sermon_single_v2( $return = false, $post = '' ) {
+ ID)) :?>
Topics ID, 'wpfc_sermon_topics') ?>
+ From 5861cfcddd057f0cd5b1289f90c7d02be8c43272 Mon Sep 17 00:00:00 2001 From: Adrian Ionescu <9744973+adrianweb@users.noreply.github.com> Date: Mon, 12 Feb 2018 14:27:28 +0000 Subject: [PATCH 10/87] conditionally render sermon attachments --- includes/template-tags.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/includes/template-tags.php b/includes/template-tags.php index cedb062..e06e4d8 100755 --- a/includes/template-tags.php +++ b/includes/template-tags.php @@ -579,7 +579,9 @@ function wpfc_sermon_single_v2( $return = false, $post = '' ) {
+
+ ID)) :?>
Topics From 0110deebc36deb6e2f62cd709e98fcc33a656985 Mon Sep 17 00:00:00 2001 From: Adrian Ionescu <9744973+adrianweb@users.noreply.github.com> Date: Mon, 12 Feb 2018 14:33:41 +0000 Subject: [PATCH 11/87] make meta prefixes translatable --- includes/template-tags.php | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/includes/template-tags.php b/includes/template-tags.php index e06e4d8..d9e0df8 100755 --- a/includes/template-tags.php +++ b/includes/template-tags.php @@ -531,30 +531,30 @@ function wpfc_sermon_single_v2( $return = false, $post = '' ) {

- Date: +
ID)) :?>
- Preacher: + ID, 'wpfc_preacher') ?>
ID)) :?>
- Series: + ID, 'wpfc_sermon_series') ?>
ID, 'bible_passage', true)) :?>
- Passage: +
ID)) :?>
- Service Type: + ID, 'wpfc_service_type') ?>
@@ -584,7 +584,7 @@ function wpfc_sermon_single_v2( $return = false, $post = '' ) { ID)) :?>
- Topics + ID, 'wpfc_sermon_topics') ?>
@@ -684,30 +684,30 @@ function wpfc_sermon_excerpt_v2( $return = false ) {
- Date: +
ID)) :?>
- Preacher: + ID, 'wpfc_preacher') ?>
ID)) :?>
- Series: + ID, 'wpfc_sermon_series') ?>
ID, 'bible_passage', true)) :?>
- Passage: +
ID)) :?>
- Service Type: + ID, 'wpfc_service_type') ?>
From 230c245215d79eddcc351cc09d0c9239702eb9e6 Mon Sep 17 00:00:00 2001 From: Adrian Ionescu <9744973+adrianweb@users.noreply.github.com> Date: Mon, 12 Feb 2018 14:37:04 +0000 Subject: [PATCH 12/87] Fix: echo prefixes --- includes/template-tags.php | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/includes/template-tags.php b/includes/template-tags.php index d9e0df8..ba8599f 100755 --- a/includes/template-tags.php +++ b/includes/template-tags.php @@ -531,30 +531,30 @@ function wpfc_sermon_single_v2( $return = false, $post = '' ) {

- +
ID)) :?>
- + ID, 'wpfc_preacher') ?>
ID)) :?>
- + ID, 'wpfc_sermon_series') ?>
ID, 'bible_passage', true)) :?>
- +
ID)) :?>
- + ID, 'wpfc_service_type') ?>
@@ -584,7 +584,7 @@ function wpfc_sermon_single_v2( $return = false, $post = '' ) { ID)) :?>
- + ID, 'wpfc_sermon_topics') ?>
@@ -684,30 +684,30 @@ function wpfc_sermon_excerpt_v2( $return = false ) {
- +
ID)) :?>
- + ID, 'wpfc_preacher') ?>
ID)) :?>
- + ID, 'wpfc_sermon_series') ?>
ID, 'bible_passage', true)) :?>
- +
ID)) :?>
- + ID, 'wpfc_service_type') ?>
From 6ec39732a30a9fc86397ba457c58eda6342fa0c1 Mon Sep 17 00:00:00 2001 From: Adrian Ionescu <9744973+adrianweb@users.noreply.github.com> Date: Mon, 12 Feb 2018 14:39:12 +0000 Subject: [PATCH 13/87] Fix: echo sermon media --- includes/template-tags.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/includes/template-tags.php b/includes/template-tags.php index ba8599f..3fe5c65 100755 --- a/includes/template-tags.php +++ b/includes/template-tags.php @@ -560,24 +560,26 @@ function wpfc_sermon_single_v2( $return = false, $post = '' ) {
+
- +
- +
+
From 2092f25c6ab4f4a118b2cbb9c987407d8c8f7a35 Mon Sep 17 00:00:00 2001 From: Adrian Ionescu <9744973+adrianweb@users.noreply.github.com> Date: Mon, 12 Feb 2018 14:41:35 +0000 Subject: [PATCH 14/87] render sermon sorting --- views/archive-wpfc_sermon.php | 2 ++ views/taxonomy-wpfc_bible_book.php | 2 ++ views/taxonomy-wpfc_preacher.php | 2 ++ views/taxonomy-wpfc_sermon_series.php | 2 ++ views/taxonomy-wpfc_sermon_topics.php | 2 ++ views/taxonomy-wpfc_service_type.php | 2 ++ 6 files changed, 12 insertions(+) diff --git a/views/archive-wpfc_sermon.php b/views/archive-wpfc_sermon.php index 47afbc9..6911852 100644 --- a/views/archive-wpfc_sermon.php +++ b/views/archive-wpfc_sermon.php @@ -4,6 +4,8 @@
+ +
+ +
+ +
+ +
+ +
+ + Date: Mon, 12 Feb 2018 14:58:37 +0000 Subject: [PATCH 15/87] experimental: store css classes as variables for better compatibility --- views/archive-wpfc_sermon.php | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/views/archive-wpfc_sermon.php b/views/archive-wpfc_sermon.php index 6911852..efcb1b3 100644 --- a/views/archive-wpfc_sermon.php +++ b/views/archive-wpfc_sermon.php @@ -1,9 +1,15 @@ +get_header(); -
-
-
+$wpfc_sermon_wrap_class = 'wrap'; +$wpfc_sermon_primary_class = 'primary'; +$wpfc_sermon_main_class = 'wpfc-sermon-archive'; + +?> + +
+
+
From b5a33fd57d5eeaa40a2342db78c6218b6ef96d45 Mon Sep 17 00:00:00 2001 From: Adrian Ionescu <9744973+adrianweb@users.noreply.github.com> Date: Mon, 12 Feb 2018 15:22:34 +0000 Subject: [PATCH 16/87] conditionally render sermons, based on active theme --- views/archive-wpfc_sermon.php | 71 +++++++++++++++++++++++------------ views/single-wpfc_sermon.php | 59 ++++++++++++++++++++--------- 2 files changed, 88 insertions(+), 42 deletions(-) diff --git a/views/archive-wpfc_sermon.php b/views/archive-wpfc_sermon.php index efcb1b3..3370878 100644 --- a/views/archive-wpfc_sermon.php +++ b/views/archive-wpfc_sermon.php @@ -1,33 +1,56 @@ -$wpfc_sermon_wrap_class = 'wrap'; -$wpfc_sermon_primary_class = 'primary'; -$wpfc_sermon_main_class = 'wpfc-sermon-archive'; + -?> +
+
+
+
-
-
-
- - + - - -
+ +
+ +
+
+ + + +
+
+
+ + + + + +
+
- -
+ +
+ + -
-
-
- - - -
-
- - -
+ + +
+
+
+
+ +
+
+
+
+ + + +
+
+
+ + + +
+
+ + +
+ + Date: Tue, 13 Feb 2018 10:11:46 +0100 Subject: [PATCH 17/87] Add wrapper partials --- views/archive-wpfc_sermon.php | 69 +++++++------------------------- views/partials/wrapper-end.php | 35 ++++++++++++++++ views/partials/wrapper-start.php | 30 ++++++++++++++ 3 files changed, 80 insertions(+), 54 deletions(-) create mode 100644 views/partials/wrapper-end.php create mode 100644 views/partials/wrapper-start.php diff --git a/views/archive-wpfc_sermon.php b/views/archive-wpfc_sermon.php index 3370878..71c775c 100644 --- a/views/archive-wpfc_sermon.php +++ b/views/archive-wpfc_sermon.php @@ -1,56 +1,17 @@ - - - - -
-
-
-
- - - - -
- -
-
-
- - + -
-
-
+ - - - - -
-
- - -
- - - - + + + diff --git a/views/partials/wrapper-end.php b/views/partials/wrapper-end.php new file mode 100644 index 0000000..d389a99 --- /dev/null +++ b/views/partials/wrapper-end.php @@ -0,0 +1,35 @@ +'; + get_sidebar(); + echo '
'; + break; + case 'twentytwelve' : + echo '
'; + break; + case 'twentythirteen' : + echo '
'; + break; + case 'twentyfourteen' : + echo '
'; + get_sidebar( 'content' ); + break; + case 'twentyfifteen' : + echo '
'; + break; + case 'twentysixteen' : + echo '
'; + break; + case 'Divi': + echo ''; + get_sidebar(); + echo '
'; + break; + default : + echo ''; + break; +} diff --git a/views/partials/wrapper-start.php b/views/partials/wrapper-start.php new file mode 100644 index 0000000..a530f86 --- /dev/null +++ b/views/partials/wrapper-start.php @@ -0,0 +1,30 @@ +
'; + break; + case 'twentytwelve' : + echo '
'; + break; + case 'twentythirteen' : + echo '
'; + break; + case 'twentyfourteen' : + echo '
'; + break; + case 'twentyfifteen' : + echo '
'; + break; + case 'twentysixteen' : + echo '
'; + break; + case 'Divi': + echo '
'; + break; + default : + echo '
'; + break; +} From d28feb1a3881eb3474df3a96752e710a5e222f33 Mon Sep 17 00:00:00 2001 From: Nikola Date: Tue, 13 Feb 2018 10:16:11 +0100 Subject: [PATCH 18/87] Include wrapper partials in taxonomy --- views/taxonomy-wpfc_bible_book.php | 39 +++++++++++---------------- views/taxonomy-wpfc_preacher.php | 39 +++++++++++---------------- views/taxonomy-wpfc_sermon_series.php | 37 ++++++++++--------------- views/taxonomy-wpfc_sermon_topics.php | 39 +++++++++++---------------- views/taxonomy-wpfc_service_type.php | 39 +++++++++++---------------- 5 files changed, 74 insertions(+), 119 deletions(-) diff --git a/views/taxonomy-wpfc_bible_book.php b/views/taxonomy-wpfc_bible_book.php index 6911852..f17a0f5 100644 --- a/views/taxonomy-wpfc_bible_book.php +++ b/views/taxonomy-wpfc_bible_book.php @@ -1,27 +1,18 @@ - + + + -
-
-
- - - - + -
-
- - -
+ - \ No newline at end of file diff --git a/views/taxonomy-wpfc_preacher.php b/views/taxonomy-wpfc_preacher.php index 6911852..f17a0f5 100644 --- a/views/taxonomy-wpfc_preacher.php +++ b/views/taxonomy-wpfc_preacher.php @@ -1,27 +1,18 @@ - + + + -
-
-
- - - - + -
-
- - -
+ - \ No newline at end of file diff --git a/views/taxonomy-wpfc_sermon_series.php b/views/taxonomy-wpfc_sermon_series.php index 784a3d3..f17a0f5 100644 --- a/views/taxonomy-wpfc_sermon_series.php +++ b/views/taxonomy-wpfc_sermon_series.php @@ -1,27 +1,18 @@ - + -
-
-
+ - - - + -
-
- - -
+ - \ No newline at end of file diff --git a/views/taxonomy-wpfc_sermon_topics.php b/views/taxonomy-wpfc_sermon_topics.php index 6911852..f17a0f5 100644 --- a/views/taxonomy-wpfc_sermon_topics.php +++ b/views/taxonomy-wpfc_sermon_topics.php @@ -1,27 +1,18 @@ - + + + -
-
-
- - - - + -
-
- - -
+ - \ No newline at end of file diff --git a/views/taxonomy-wpfc_service_type.php b/views/taxonomy-wpfc_service_type.php index 6911852..f17a0f5 100644 --- a/views/taxonomy-wpfc_service_type.php +++ b/views/taxonomy-wpfc_service_type.php @@ -1,27 +1,18 @@ - + + + -
-
-
- - - - + -
-
- - -
+ - \ No newline at end of file From c3ead40971bece2e78092199dc66f799def49d69 Mon Sep 17 00:00:00 2001 From: Adrian Ionescu <9744973+adrianweb@users.noreply.github.com> Date: Tue, 13 Feb 2018 09:45:24 +0000 Subject: [PATCH 19/87] update default case (twenty seventeen) --- views/partials/wrapper-end.php | 4 +++- views/partials/wrapper-start.php | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/views/partials/wrapper-end.php b/views/partials/wrapper-end.php index d389a99..e7385ae 100644 --- a/views/partials/wrapper-end.php +++ b/views/partials/wrapper-end.php @@ -30,6 +30,8 @@ echo '
'; break; default : - echo '
'; + echo '
'; + get_sidebar(); + echo '
'; break; } diff --git a/views/partials/wrapper-start.php b/views/partials/wrapper-start.php index a530f86..349e018 100644 --- a/views/partials/wrapper-start.php +++ b/views/partials/wrapper-start.php @@ -25,6 +25,6 @@ echo '
'; break; default : - echo '
'; + echo '
'; break; } From cadc2fb9e6a2cc7568322d0fe53d43e32260adb9 Mon Sep 17 00:00:00 2001 From: Adrian Ionescu <9744973+adrianweb@users.noreply.github.com> Date: Tue, 13 Feb 2018 10:06:08 +0000 Subject: [PATCH 20/87] styling adjustments --- assets/css/sermon.css | 30 ++++++++++++++++++++++-------- includes/template-tags.php | 32 ++++++++++++++++---------------- 2 files changed, 38 insertions(+), 24 deletions(-) diff --git a/assets/css/sermon.css b/assets/css/sermon.css index eecf972..66b4d77 100755 --- a/assets/css/sermon.css +++ b/assets/css/sermon.css @@ -321,7 +321,7 @@ h3.wpfc_grid_title a { border: 0px !important; } -/* Archive View V2 */ +/******************************* Sermon Archive *******************************/ .wpfc-sermon { margin-bottom: 60px; } @@ -331,6 +331,7 @@ h3.wpfc_grid_title a { } .wpfc-sermon-inner { + background: white; border: 1px solid #efefef; } @@ -340,16 +341,23 @@ h3.wpfc_grid_title a { width: 100%; } -.wpfc-sermon-main { - padding: 24px; -} - .wpfc-sermon-title { margin: 0; + padding: 0; } .wpfc-sermon-meta { - margin-top: 24px; + margin: 12px -8px 0 -8px; +} + +.wpfc-sermon-meta-item { + display: inline-block; + margin: 0 8px 0 8px; + font-size: 14px; +} + +.wpfc-sermon-main { + padding: 24px; } .wpfc-sermon-description { @@ -364,7 +372,7 @@ h3.wpfc_grid_title a { margin-bottom: 0; } -/* Single View V2 */ +/******************************* Sermon Singular *******************************/ .wpfc-sermon-single-image { margin-bottom: 24px; } @@ -380,7 +388,13 @@ h3.wpfc_grid_title a { } .wpfc-sermon-single-meta { - margin-top: 24px; + margin: 12px -8px 0 -8px; +} + +.wpfc-sermon-single-meta-item { + display: inline-block; + margin: 0 8px 0 8px; + font-size: 14px; } .wpfc-sermon-single-media { diff --git a/includes/template-tags.php b/includes/template-tags.php index 3fe5c65..2d9f663 100755 --- a/includes/template-tags.php +++ b/includes/template-tags.php @@ -684,33 +684,33 @@ function wpfc_sermon_excerpt_v2( $return = false ) {

-
-
- - +
+
+ +
ID)) :?> -
- - ID, 'wpfc_preacher') ?> +
+ + ID, 'wpfc_preacher') ?>
ID)) :?> -
- - ID, 'wpfc_sermon_series') ?> +
+ + ID, 'wpfc_sermon_series') ?>
ID, 'bible_passage', true)) :?> -
- - +
+ +
ID)) :?> -
- - ID, 'wpfc_service_type') ?> +
+ + ID, 'wpfc_service_type') ?>
From eec6d5f6798958971dcf9f74eba4335231531478 Mon Sep 17 00:00:00 2001 From: Adrian Ionescu <9744973+adrianweb@users.noreply.github.com> Date: Tue, 13 Feb 2018 12:30:50 +0000 Subject: [PATCH 21/87] re-work sermon views --- assets/css/sermon.css | 112 +++++++++++++++++++------------------ includes/template-tags.php | 72 +++++++++++------------- 2 files changed, 91 insertions(+), 93 deletions(-) diff --git a/assets/css/sermon.css b/assets/css/sermon.css index 66b4d77..1ae1c7e 100755 --- a/assets/css/sermon.css +++ b/assets/css/sermon.css @@ -323,117 +323,121 @@ h3.wpfc_grid_title a { /******************************* Sermon Archive *******************************/ .wpfc-sermon { - margin-bottom: 60px; + margin-bottom: 48px; } - .wpfc-sermon:last-child { margin-bottom: 0; } - -.wpfc-sermon-inner { - background: white; - border: 1px solid #efefef; -} - .wpfc-sermon-image img { display: block; max-width: 100%; width: 100%; } +.wpfc-sermon-inner { + background: white; + border: 1px solid #ddd; +} +.wpfc-sermon-main { + padding: 24px; +} + +.wpfc-sermon-meta-item { + font-size: 14px; + opacity: .87; +} + +.wpfc-sermon-meta-series { + margin: 0 0 8px 0; +} .wpfc-sermon-title { margin: 0; padding: 0; } -.wpfc-sermon-meta { - margin: 12px -8px 0 -8px; +.wpfc-sermon-meta-date { + margin: 8px 0 0; } -.wpfc-sermon-meta-item { - display: inline-block; - margin: 0 8px 0 8px; +.wpfc-sermon-description { font-size: 14px; + margin: 8px 0 0; } -.wpfc-sermon-main { - padding: 24px; +.wpfc-sermon-description p { + margin: 0 0 12px 0; } -.wpfc-sermon-description { +.wpfc-sermon-description p:last-child { + margin: 0; +} + +.wpfc-sermon-footer { margin-top: 24px; + padding-top: 24px; + border-top: 1px solid #ddd; } -.wpfc-sermon-description p { - margin: 0 0 24px 0; +.wpfc-sermon-footer .wpfc-sermon-meta-item { + display: inline-block; + position: relative; } -.wpfc-sermon-description p:last-child { - margin-bottom: 0; +.wpfc-sermon-footer .wpfc-sermon-meta-item:not(:last-child):after { + content: '|'; + padding: 0 4px; + color: #ddd; } /******************************* Sermon Singular *******************************/ .wpfc-sermon-single-image { margin-bottom: 24px; } - .wpfc-sermon-single-image img { display: block; max-width: 100%; width: 100%; } - +.wpfc-sermon-single-header, +.wpfc-sermon-single-media { + text-align: center; +} +.wpfc-sermon-single-header .wpfc-sermon-single-meta-item { + font-size: 14px; + opacity: .87; +} +.wpfc-sermon-single-meta-date { + margin-bottom: 8px; +} .wpfc-sermon-single-title { margin: 0; + padding: 0; } - .wpfc-sermon-single-meta { - margin: 12px -8px 0 -8px; + margin: 8px -8px 0 -8px; } - .wpfc-sermon-single-meta-item { display: inline-block; - margin: 0 8px 0 8px; - font-size: 14px; -} - -.wpfc-sermon-single-media { - margin: 24px 0; + margin: 0 8px; } - .wpfc-sermon-single-media > div { - margin: 0 0 24px 0; - max-width: 100%; - width: 100%; -} - -.wpfc-sermon-single-media > div:last-child { - margin-bottom: 0; + margin: 24px 0; } - .wpfc-sermon-single-description { margin-top: 24px; } - +.wpfc-sermon-single-description p:first-child { + margin-top: 0; +} +.wpfc-sermon-single-description p:last-child { + margin-bottom: 0; +} .wpfc-sermon-single-attachments { background: #efefef; border: 1px solid #ddd; padding: 24px; margin-top: 24px; } - .wpfc-sermon-single-topics { margin-top: 24px; -} - -.wpfc-sermon-single-topics-prefix, -.wpfc-sermon-single-topics a { - display: inline-block; - padding: 5px 10px; - margin-bottom: 3px; - border: 1px solid #efefef; -} - -.wpfc-sermon-single-topics-prefix { - background: #efefef; } \ No newline at end of file diff --git a/includes/template-tags.php b/includes/template-tags.php index 2d9f663..0e33d24 100755 --- a/includes/template-tags.php +++ b/includes/template-tags.php @@ -512,7 +512,7 @@ function wpfc_sermon_single( $return = false, $post = '' ) { return $output; } -// single sermon action +// Single View V2 function wpfc_sermon_single_v2( $return = false, $post = '' ) { if ( $post === '' ) { global $post; @@ -528,12 +528,11 @@ function wpfc_sermon_single_v2( $return = false, $post = '' ) {
+
+ +

-
- - -
ID)) :?>
@@ -667,6 +666,7 @@ function wpfc_sermon_excerpt( $return = false ) { return $output; } +// Archive View V2 function wpfc_sermon_excerpt_v2( $return = false ) { global $post; @@ -677,45 +677,39 @@ function wpfc_sermon_excerpt_v2( $return = false ) {
-
-

- -

-
-
- - -
- ID)) :?> -
- - ID, 'wpfc_preacher') ?> -
- - ID)) :?> -
- - ID, 'wpfc_sermon_series') ?> -
- - ID, 'bible_passage', true)) :?> -
- - -
- - ID)) :?> -
- - ID, 'wpfc_service_type') ?> -
- -
+ ID)) :?> +
+ ID, 'wpfc_sermon_series') ?> +
+ +

+ +

+
+
+
From 78c78a7b11b3516c532b989a3924b8f395dc7821 Mon Sep 17 00:00:00 2001 From: Adrian Ionescu <9744973+adrianweb@users.noreply.github.com> Date: Tue, 13 Feb 2018 14:26:06 +0000 Subject: [PATCH 22/87] improve styling --- assets/css/sermon.css | 35 +++++++++++++++++++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) diff --git a/assets/css/sermon.css b/assets/css/sermon.css index 1ae1c7e..277b91c 100755 --- a/assets/css/sermon.css +++ b/assets/css/sermon.css @@ -321,6 +321,24 @@ h3.wpfc_grid_title a { border: 0px !important; } +/******************************* Sermon Sorting *******************************/ +.wpfc-sermon-archive #wpfc_sermon_sorting { + padding: 0; + margin-bottom: 48px; +} + +.wpfc-sermon-archive #wpfc_sermon_sorting form { + margin: 0; +} + +.wpfc-sermon-archive #wpfc_sermon_sorting > div { + margin: 0 8px 4px 0; +} + +.wpfc-sermon-archive #wpfc_sermon_sorting > div:last-child { + margin: 0 0 4px 0; +} + /******************************* Sermon Archive *******************************/ .wpfc-sermon { margin-bottom: 48px; @@ -328,17 +346,30 @@ h3.wpfc_grid_title a { .wpfc-sermon:last-child { margin-bottom: 0; } +.wpfc-sermon-image { + height: auto; + position: relative; + flex: 1 30%; + min-height: 300px; +} .wpfc-sermon-image img { - display: block; - max-width: 100%; + display: none; +} +.wpfc-sermon-image-img { width: 100%; + height: 100%; + background-size: cover; } .wpfc-sermon-inner { background: white; border: 1px solid #ddd; + display: flex; + flex-flow: row wrap; } .wpfc-sermon-main { padding: 24px; + flex: 1; + min-width: 500px; } .wpfc-sermon-meta-item { From 476bdd4b22116d1646c592f7ce5209faa624e1fa Mon Sep 17 00:00:00 2001 From: Adrian Ionescu <9744973+adrianweb@users.noreply.github.com> Date: Tue, 13 Feb 2018 14:52:37 +0000 Subject: [PATCH 23/87] fix: css class names for default wp themes --- assets/css/sermon.css | 1 - views/partials/wrapper-end.php | 6 ++++-- views/partials/wrapper-start.php | 14 +++++++------- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/assets/css/sermon.css b/assets/css/sermon.css index 277b91c..bf60bb3 100755 --- a/assets/css/sermon.css +++ b/assets/css/sermon.css @@ -369,7 +369,6 @@ h3.wpfc_grid_title a { .wpfc-sermon-main { padding: 24px; flex: 1; - min-width: 500px; } .wpfc-sermon-meta-item { diff --git a/views/partials/wrapper-end.php b/views/partials/wrapper-end.php index e7385ae..dd5f076 100644 --- a/views/partials/wrapper-end.php +++ b/views/partials/wrapper-end.php @@ -4,12 +4,12 @@ switch ( $template ) { case 'twentyeleven' : - echo '
'; + echo '
'; get_sidebar(); - echo '
'; break; case 'twentytwelve' : echo '
'; + get_sidebar(); break; case 'twentythirteen' : echo '
'; @@ -19,10 +19,12 @@ get_sidebar( 'content' ); break; case 'twentyfifteen' : + get_sidebar(); echo '
'; break; case 'twentysixteen' : echo '
'; + get_sidebar(); break; case 'Divi': echo ''; diff --git a/views/partials/wrapper-start.php b/views/partials/wrapper-start.php index 349e018..1ec946f 100644 --- a/views/partials/wrapper-start.php +++ b/views/partials/wrapper-start.php @@ -4,27 +4,27 @@ switch ( $template ) { case 'twentyeleven' : - echo '
'; + echo '
'; break; case 'twentytwelve' : - echo '
'; + echo '
'; break; case 'twentythirteen' : - echo '
'; + echo '
'; break; case 'twentyfourteen' : - echo '
'; + echo '
'; break; case 'twentyfifteen' : - echo '
'; + echo '
'; break; case 'twentysixteen' : - echo '
'; + echo '
'; break; case 'Divi': echo '
'; break; default : - echo '
'; + echo '
'; break; } From 7fa283e28c25babea0e949bf852b1718564c6dfd Mon Sep 17 00:00:00 2001 From: Adrian Ionescu <9744973+adrianweb@users.noreply.github.com> Date: Tue, 13 Feb 2018 15:31:17 +0000 Subject: [PATCH 24/87] fix archive view, horizontal layout --- assets/css/sermon.css | 26 ++++++++++++++++++++------ includes/template-tags.php | 4 ++-- 2 files changed, 22 insertions(+), 8 deletions(-) diff --git a/assets/css/sermon.css b/assets/css/sermon.css index bf60bb3..75ad4d9 100755 --- a/assets/css/sermon.css +++ b/assets/css/sermon.css @@ -349,11 +349,11 @@ h3.wpfc_grid_title a { .wpfc-sermon-image { height: auto; position: relative; - flex: 1 30%; - min-height: 300px; } .wpfc-sermon-image img { - display: none; + display: block; + width: 100%; + max-width: 100%; } .wpfc-sermon-image-img { width: 100%; @@ -363,12 +363,9 @@ h3.wpfc_grid_title a { .wpfc-sermon-inner { background: white; border: 1px solid #ddd; - display: flex; - flex-flow: row wrap; } .wpfc-sermon-main { padding: 24px; - flex: 1; } .wpfc-sermon-meta-item { @@ -419,6 +416,23 @@ h3.wpfc_grid_title a { color: #ddd; } +/* Horizontal Layout */ +.wpfc-sermon-horizontal .wpfc-sermon-inner { + display: flex; + flex-flow: row wrap; +} +.wpfc-sermon-horizontal .wpfc-sermon-image { + flex: 0 30%; +} +.wpfc-sermon-horizontal .wpfc-sermon-image img { + display: none; +} +.wpfc-sermon-horizontal .wpfc-sermon-main { + flex: 1; +} + +/* Vertical Layout */ + /******************************* Sermon Singular *******************************/ .wpfc-sermon-single-image { margin-bottom: 24px; diff --git a/includes/template-tags.php b/includes/template-tags.php index 0e33d24..6a237b4 100755 --- a/includes/template-tags.php +++ b/includes/template-tags.php @@ -672,7 +672,7 @@ function wpfc_sermon_excerpt_v2( $return = false ) { ob_start(); ?> -
+
'; break; + case 'salient': + echo '
'; + break; default : echo '
'; get_sidebar(); diff --git a/views/partials/wrapper-start.php b/views/partials/wrapper-start.php index 1ec946f..28f5f54 100644 --- a/views/partials/wrapper-start.php +++ b/views/partials/wrapper-start.php @@ -24,6 +24,9 @@ case 'Divi': echo '
'; break; + case 'salient' : + echo '
'; + break; default : echo '
'; break; From 67516e94bbeba558e664f0092db3fd1472790dcc Mon Sep 17 00:00:00 2001 From: Adrian Ionescu <9744973+adrianweb@users.noreply.github.com> Date: Tue, 13 Feb 2018 15:39:47 +0000 Subject: [PATCH 26/87] fix for sailent: load sidebar --- views/partials/wrapper-end.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/views/partials/wrapper-end.php b/views/partials/wrapper-end.php index 2dce875..d67e9a5 100644 --- a/views/partials/wrapper-end.php +++ b/views/partials/wrapper-end.php @@ -32,7 +32,9 @@ echo '
'; break; case 'salient': - echo '
'; + echo '
'; + get_sidebar(); + echo '
'; break; default : echo '
'; From 043b5c9cc5f4b9d3b16189667bf701ae3b8d574b Mon Sep 17 00:00:00 2001 From: Adrian Ionescu <9744973+adrianweb@users.noreply.github.com> Date: Wed, 14 Feb 2018 07:09:44 +0000 Subject: [PATCH 27/87] improve theme compatibiliy --- views/single-wpfc_sermon.php | 51 ++++++++---------------------------- 1 file changed, 11 insertions(+), 40 deletions(-) diff --git a/views/single-wpfc_sermon.php b/views/single-wpfc_sermon.php index 68ad323..7160bb1 100755 --- a/views/single-wpfc_sermon.php +++ b/views/single-wpfc_sermon.php @@ -1,46 +1,17 @@ - + -
-
-
-
- -
-
-
-
- - - -
-
-
- - - -
-
- - -
- - + + + Date: Wed, 14 Feb 2018 07:10:49 +0000 Subject: [PATCH 28/87] fix: get footer --- views/archive-wpfc_sermon.php | 2 ++ views/taxonomy-wpfc_bible_book.php | 4 +++- views/taxonomy-wpfc_preacher.php | 4 +++- views/taxonomy-wpfc_sermon_series.php | 4 +++- views/taxonomy-wpfc_sermon_topics.php | 4 +++- views/taxonomy-wpfc_service_type.php | 4 +++- 6 files changed, 17 insertions(+), 5 deletions(-) diff --git a/views/archive-wpfc_sermon.php b/views/archive-wpfc_sermon.php index 71c775c..0d55fe3 100644 --- a/views/archive-wpfc_sermon.php +++ b/views/archive-wpfc_sermon.php @@ -15,3 +15,5 @@ ?> + + - \ No newline at end of file + + + - \ No newline at end of file + + + - \ No newline at end of file + + + - \ No newline at end of file + + + - \ No newline at end of file + + + Date: Wed, 14 Feb 2018 07:13:19 +0000 Subject: [PATCH 29/87] more generic wrapper class, so it works for both archive and single view --- views/partials/wrapper-start.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/views/partials/wrapper-start.php b/views/partials/wrapper-start.php index 28f5f54..cab44f2 100644 --- a/views/partials/wrapper-start.php +++ b/views/partials/wrapper-start.php @@ -4,30 +4,30 @@ switch ( $template ) { case 'twentyeleven' : - echo '
'; + echo '
'; break; case 'twentytwelve' : - echo '
'; + echo '
'; break; case 'twentythirteen' : - echo '
'; + echo '
'; break; case 'twentyfourteen' : echo '
'; break; case 'twentyfifteen' : - echo '
'; + echo '
'; break; case 'twentysixteen' : - echo '
'; + echo '
'; break; case 'Divi': - echo '
'; + echo '
'; break; case 'salient' : echo '
'; break; default : - echo '
'; + echo '
'; break; } From fe3ff419a33b4cfd1d3156d0b9cab477ef57c866 Mon Sep 17 00:00:00 2001 From: Nikola Date: Wed, 14 Feb 2018 09:07:35 +0100 Subject: [PATCH 30/87] Add JS for CSS styling --- assets/js/additional_classes.js | 6 ++++++ sermons.php | 1 + 2 files changed, 7 insertions(+) create mode 100644 assets/js/additional_classes.js diff --git a/assets/js/additional_classes.js b/assets/js/additional_classes.js new file mode 100644 index 0000000..9f55375 --- /dev/null +++ b/assets/js/additional_classes.js @@ -0,0 +1,6 @@ +(function () { + var element = document.getElementById('wpfc-sermon'); + if (element.offsetWidth > 600) { + element.className += " wpfc-sermon-horizontal"; + } +})(); diff --git a/sermons.php b/sermons.php index eb15ac7..6ad6d5a 100755 --- a/sermons.php +++ b/sermons.php @@ -517,6 +517,7 @@ public static function enqueue_scripts_styles() { if ( ! \SermonManager::getOption( 'css' ) ) { wp_enqueue_style( 'wpfc-sm-styles', SM_URL . 'assets/css/sermon.css', array(), SM_VERSION ); wp_enqueue_style( 'dashicons' ); + wp_enqueue_script( 'wpfc-sm-additional_classes', SM_URL . 'assets/js/additional_classes.js', array(), SERMON_MANAGER_VERSION, true ); switch ( \SermonManager::getOption( 'player' ) ) { case 'mediaelement': From d40ef4b318a2c800a9dcfc112ed1e00a0e059aa2 Mon Sep 17 00:00:00 2001 From: Adrian Ionescu <9744973+adrianweb@users.noreply.github.com> Date: Wed, 14 Feb 2018 08:20:49 +0000 Subject: [PATCH 31/87] add post_class and the_ID --- includes/template-tags.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/template-tags.php b/includes/template-tags.php index 6a237b4..61fc73b 100755 --- a/includes/template-tags.php +++ b/includes/template-tags.php @@ -521,7 +521,7 @@ function wpfc_sermon_single_v2( $return = false, $post = '' ) { ob_start(); ?> -
+
>
@@ -672,7 +672,7 @@ function wpfc_sermon_excerpt_v2( $return = false ) { ob_start(); ?> -
+
>
From 8677d335448b565106f1331706e0a90a33c2374a Mon Sep 17 00:00:00 2001 From: Adrian Ionescu <9744973+adrianweb@users.noreply.github.com> Date: Wed, 14 Feb 2018 08:22:44 +0000 Subject: [PATCH 32/87] update css class name --- assets/css/sermon.css | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/assets/css/sermon.css b/assets/css/sermon.css index 75ad4d9..5fcf8a0 100755 --- a/assets/css/sermon.css +++ b/assets/css/sermon.css @@ -322,20 +322,20 @@ h3.wpfc_grid_title a { } /******************************* Sermon Sorting *******************************/ -.wpfc-sermon-archive #wpfc_sermon_sorting { +.wpfc-sermon-container #wpfc_sermon_sorting { padding: 0; margin-bottom: 48px; } -.wpfc-sermon-archive #wpfc_sermon_sorting form { +.wpfc-sermon-container #wpfc_sermon_sorting form { margin: 0; } -.wpfc-sermon-archive #wpfc_sermon_sorting > div { +.wpfc-sermon-container #wpfc_sermon_sorting > div { margin: 0 8px 4px 0; } -.wpfc-sermon-archive #wpfc_sermon_sorting > div:last-child { +.wpfc-sermon-container #wpfc_sermon_sorting > div:last-child { margin: 0 0 4px 0; } @@ -431,8 +431,6 @@ h3.wpfc_grid_title a { flex: 1; } -/* Vertical Layout */ - /******************************* Sermon Singular *******************************/ .wpfc-sermon-single-image { margin-bottom: 24px; From 24a0245909c490ee839410d60d86733152bc4b0f Mon Sep 17 00:00:00 2001 From: Adrian Ionescu <9744973+adrianweb@users.noreply.github.com> Date: Wed, 14 Feb 2018 08:26:25 +0000 Subject: [PATCH 33/87] remove duplicate id --- includes/template-tags.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/template-tags.php b/includes/template-tags.php index 61fc73b..9e4c238 100755 --- a/includes/template-tags.php +++ b/includes/template-tags.php @@ -521,7 +521,7 @@ function wpfc_sermon_single_v2( $return = false, $post = '' ) { ob_start(); ?> -
> +
>
From df3b86286098ba66b2229732fdde7956cb03974e Mon Sep 17 00:00:00 2001 From: Adrian Ionescu <9744973+adrianweb@users.noreply.github.com> Date: Wed, 14 Feb 2018 08:28:42 +0000 Subject: [PATCH 34/87] add theme name as css class --- views/partials/wrapper-start.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/views/partials/wrapper-start.php b/views/partials/wrapper-start.php index cab44f2..6a3a22f 100644 --- a/views/partials/wrapper-start.php +++ b/views/partials/wrapper-start.php @@ -4,28 +4,28 @@ switch ( $template ) { case 'twentyeleven' : - echo '
'; + echo '
'; break; case 'twentytwelve' : - echo '
'; + echo '
'; break; case 'twentythirteen' : - echo '
'; + echo '
'; break; case 'twentyfourteen' : - echo '
'; + echo '
'; break; case 'twentyfifteen' : - echo '
'; + echo '
'; break; case 'twentysixteen' : - echo '
'; + echo '
'; break; case 'Divi': - echo '
'; + echo '
'; break; case 'salient' : - echo '
'; + echo '
'; break; default : echo '
'; From 379899f4683cd0e5a3defe6c0bf7092727c7909c Mon Sep 17 00:00:00 2001 From: Adrian Ionescu <9744973+adrianweb@users.noreply.github.com> Date: Wed, 14 Feb 2018 08:30:14 +0000 Subject: [PATCH 35/87] add twentyseventeen case --- views/partials/wrapper-end.php | 4 ++++ views/partials/wrapper-start.php | 3 +++ 2 files changed, 7 insertions(+) diff --git a/views/partials/wrapper-end.php b/views/partials/wrapper-end.php index d67e9a5..77fa2b7 100644 --- a/views/partials/wrapper-end.php +++ b/views/partials/wrapper-end.php @@ -26,6 +26,10 @@ echo '
'; get_sidebar(); break; + case 'twentyseventeen' : + echo '
'; + get_sidebar(); + break; case 'Divi': echo '
'; get_sidebar(); diff --git a/views/partials/wrapper-start.php b/views/partials/wrapper-start.php index 6a3a22f..521f5dd 100644 --- a/views/partials/wrapper-start.php +++ b/views/partials/wrapper-start.php @@ -21,6 +21,9 @@ case 'twentysixteen' : echo '
'; break; + case 'twentyseventeen' : + echo '
'; + break; case 'Divi': echo '
'; break; From 0108e7f0b896c407a2a8f4fe30593120c11918ba Mon Sep 17 00:00:00 2001 From: Adrian Ionescu <9744973+adrianweb@users.noreply.github.com> Date: Wed, 14 Feb 2018 08:34:35 +0000 Subject: [PATCH 36/87] update js, get element by class name --- assets/js/additional_classes.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/assets/js/additional_classes.js b/assets/js/additional_classes.js index 9f55375..d13843b 100644 --- a/assets/js/additional_classes.js +++ b/assets/js/additional_classes.js @@ -1,6 +1,9 @@ (function () { - var element = document.getElementById('wpfc-sermon'); - if (element.offsetWidth > 600) { - element.className += " wpfc-sermon-horizontal"; + var element = document.getElementsByClassName('wpfc-sermon'); + + for (var i = 0; i < element.length; i++) { + if (element[i].offsetWidth > 600) { + element[i].className += " wpfc-sermon-horizontal"; + } } })(); From 1687f015248ab2d764f969fefdb4609eee98bf2b Mon Sep 17 00:00:00 2001 From: Nikola Date: Wed, 14 Feb 2018 09:35:42 +0100 Subject: [PATCH 37/87] Add classes the right way + remove duplicate ID --- includes/template-tags.php | 4 ++-- sermons.php | 29 +++++++++++++++++++++++++---- 2 files changed, 27 insertions(+), 6 deletions(-) diff --git a/includes/template-tags.php b/includes/template-tags.php index 9e4c238..cd31a73 100755 --- a/includes/template-tags.php +++ b/includes/template-tags.php @@ -521,7 +521,7 @@ function wpfc_sermon_single_v2( $return = false, $post = '' ) { ob_start(); ?> -
> +
>
@@ -672,7 +672,7 @@ function wpfc_sermon_excerpt_v2( $return = false ) { ob_start(); ?> -
> +
>
diff --git a/sermons.php b/sermons.php index 6ad6d5a..4b0960f 100755 --- a/sermons.php +++ b/sermons.php @@ -570,7 +570,13 @@ public static function enqueue_scripts_styles() { * * @return array Modified class list */ - public static function add_additional_sermon_classes( $classes, $class, $ID ) { + public static function add_additional_sermon_classes( $classes, $class, $post_id ) { + if ( get_post_type( $post_id ) !== 'wpfc_sermon' ) { + return $classes; + } + + $additional_classes = array(); + $taxonomies = array( 'wpfc_preacher', 'wpfc_sermon_series', @@ -579,7 +585,7 @@ public static function add_additional_sermon_classes( $classes, $class, $ID ) { ); foreach ( $taxonomies as $taxonomy ) { - foreach ( (array) get_the_terms( $ID, $taxonomy ) as $term ) { + foreach ( (array) get_the_terms( $post_id, $taxonomy ) as $term ) { if ( empty( $term->slug ) ) { continue; } @@ -591,12 +597,27 @@ public static function add_additional_sermon_classes( $classes, $class, $ID ) { $term_class = $term->term_id; } - $classes[] = esc_attr( sanitize_html_class( $taxonomy . '-' . $term_class, $taxonomy . '-' . $term->term_id ) ); + $additional_classes[] = esc_attr( sanitize_html_class( $taxonomy . '-' . $term_class, $taxonomy . '-' . $term->term_id ) ); } } } - return $classes; + if ( is_archive() ) { + $additional_classes[] = 'wpfc-sermon-single'; + } else { + $additional_classes[] = 'wpfc-sermon'; + } + + /** + * Allows filtering of additional Sermon Manager classes + * + * @param array $classes The array of added classes + * + * @since 2.12.0 + */ + $additional_classes = apply_filters( 'wpfc_sermon_classes', $additional_classes, $classes, $post_id ); + + return $additional_classes + $classes; } /** From 3ccd38efca5c1d2de334ee3aeb1b1ab26fe5d94a Mon Sep 17 00:00:00 2001 From: Nikola Date: Wed, 14 Feb 2018 09:37:23 +0100 Subject: [PATCH 38/87] Add filters for sermon output --- includes/template-tags.php | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/includes/template-tags.php b/includes/template-tags.php index cd31a73..a4a5fe5 100755 --- a/includes/template-tags.php +++ b/includes/template-tags.php @@ -505,6 +505,16 @@ function wpfc_sermon_single( $return = false, $post = '' ) { Date: Wed, 14 Feb 2018 08:38:41 +0000 Subject: [PATCH 39/87] add theme specific styling - twentyfiftheen --- assets/css/sermon.css | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/assets/css/sermon.css b/assets/css/sermon.css index 5fcf8a0..76dc1dd 100755 --- a/assets/css/sermon.css +++ b/assets/css/sermon.css @@ -482,4 +482,18 @@ h3.wpfc_grid_title a { } .wpfc-sermon-single-topics { margin-top: 24px; +} + +/******************************* Theme Specific - tewntyfifteen *******************************/ +.wpfc-twentyfifteen #wpfc_sermon_sorting { + margin-left: 8.3333%; + margin-right: 8.3333%; +} + +.wpfc-twentyfifteen .wpfc-sermon-single-image { + margin: 0; +} + +.wpfc-twentyfifteen .wpfc-sermon-single-main { + padding: 10%; } \ No newline at end of file From 77f26d6af7c530e80c7930a0a901762845824a6f Mon Sep 17 00:00:00 2001 From: Nikola Date: Wed, 14 Feb 2018 09:58:38 +0100 Subject: [PATCH 40/87] Tidy up template-tags.php --- includes/sm-deprecated-functions.php | 26 ++ includes/template-tags.php | 354 +++++++++++---------------- 2 files changed, 163 insertions(+), 217 deletions(-) diff --git a/includes/sm-deprecated-functions.php b/includes/sm-deprecated-functions.php index 73fc7c9..706d56a 100644 --- a/includes/sm-deprecated-functions.php +++ b/includes/sm-deprecated-functions.php @@ -47,3 +47,29 @@ function set_service_type( $post_ID ) { } add_action( 'save_post', 'set_service_type', 99 ); + +add_action( 'sermon_media', 'wpfc_sermon_media', 5 ); +add_action( 'sermon_audio', 'wpfc_sermon_audio', 5 ); +add_action( 'sermon_single', 'wpfc_sermon_single' ); +add_action( 'sermon_excerpt', 'wpfc_sermon_excerpt' ); + +/** + * @deprecated - see wpfc_sermon_media() + */ +function wpfc_sermon_files() { + do_action( 'sermon_media' ); +} + +/** + * @deprecated - see wpfc_sermon_single() & wpfc_sermon_single_v2() + */ +function render_wpfc_sermon_single() { + do_action( 'sermon_single' ); +} + +/** + * @deprecated - see wpfc_sermon_excerpt() & wpfc_sermon_excerpt_v2() + */ +function render_wpfc_sermon_excerpt() { + do_action( 'sermon_excerpt' ); +} \ No newline at end of file diff --git a/includes/template-tags.php b/includes/template-tags.php index a4a5fe5..5d6b0f7 100755 --- a/includes/template-tags.php +++ b/includes/template-tags.php @@ -1,110 +1,46 @@ taxonomy . '.php'; + } else { + $default_file = 'archive-wpfc_sermon.php'; } - - return SM_PATH . 'views/single-wpfc_sermon.php'; - endif; - } - - return $template; -} - -// Include template for displaying sermon topics -function sermon_topics_template_include( $template ) { - if ( get_query_var( 'taxonomy' ) == 'wpfc_sermon_topics' ) { - if ( file_exists( get_stylesheet_directory() . '/taxonomy-wpfc_sermon_topics.php' ) ) { - return get_stylesheet_directory() . '/taxonomy-wpfc_sermon_topics.php'; - } - - return SM_PATH . 'views/taxonomy-wpfc_sermon_topics.php'; - } - - return $template; -} - -// Include template for displaying sermons by Preacher -function preacher_template_include( $template ) { - if ( get_query_var( 'taxonomy' ) == 'wpfc_preacher' ) { - if ( file_exists( get_stylesheet_directory() . '/taxonomy-wpfc_preacher.php' ) ) { - return get_stylesheet_directory() . '/taxonomy-wpfc_preacher.php'; - } - - return SM_PATH . 'views/taxonomy-wpfc_preacher.php'; - } - - return $template; -} - -// Include template for displaying sermon series -function series_template_include( $template ) { - if ( get_query_var( 'taxonomy' ) == 'wpfc_sermon_series' ) { - if ( file_exists( get_stylesheet_directory() . '/taxonomy-wpfc_sermon_series.php' ) ) { - return get_stylesheet_directory() . '/taxonomy-wpfc_sermon_series.php'; + } elseif ( is_post_type_archive( 'wpfc_sermon' ) ) { + $default_file = 'archive-wpfc_sermon.php'; + } else { + $default_file = ''; } - return SM_PATH . 'views/taxonomy-wpfc_sermon_series.php'; - } - - return $template; -} + if ( $default_file ) { + if ( file_exists( get_stylesheet_directory() . '/' . $default_file ) ) { + return get_stylesheet_directory() . '/' . $default_file; + } -// Include template for displaying service types -function service_type_template_include( $template ) { - if ( get_query_var( 'taxonomy' ) == 'wpfc_service_type' ) { - if ( file_exists( get_stylesheet_directory() . '/taxonomy-wpfc_service_type.php' ) ) { - return get_stylesheet_directory() . '/taxonomy-wpfc_service_type.php'; + return SM_PATH . 'views/' . $default_file; } - return SM_PATH . 'views/taxonomy-wpfc_service_type.php'; - } - - return $template; + return $template; + } ); } -// Include template for displaying sermons by book -function bible_book_template_include( $template ) { - if ( get_query_var( 'taxonomy' ) == 'wpfc_bible_book' ) { - if ( file_exists( get_stylesheet_directory() . '/taxonomy-wpfc_bible_book.php' ) ) { - return get_stylesheet_directory() . '/taxonomy-wpfc_bible_book.php'; - } - - return SM_PATH . 'views/taxonomy-wpfc_bible_book.php'; - } - - return $template; -} +add_filter( 'the_content', 'add_wpfc_sermon_content' ); +add_filter( 'the_excerpt', 'add_wpfc_sermon_content' ); // render archive entry; depreciated - use render_wpfc_sermon_excerpt() instead function render_wpfc_sermon_archive() { @@ -131,8 +67,8 @@ function render_wpfc_sermon_archive() {

- -
'; @@ -418,11 +352,6 @@ function wpfc_render_audio( $url = '' ) { return apply_filters( 'sm_audio_player', $output, $url ); } -// legacy function -function wpfc_sermon_files() { - do_action( 'sermon_media' ); -} - // just get the sermon audio function wpfc_sermon_audio() { $html = ''; @@ -460,11 +389,6 @@ function wpfc_sermon_attachments() { return apply_filters( 'sm_attachments_html', $html ); } -// legacy function -function render_wpfc_sermon_single() { - do_action( 'sermon_single' ); -} - // single sermon action function wpfc_sermon_single( $return = false, $post = '' ) { if ( $post === '' ) { @@ -530,79 +454,79 @@ function wpfc_sermon_single_v2( $return = false, $post = '' ) { ob_start(); ?> - -
> -
-
- -
-
-
-
+ +
> +
+
+ +
+
+
+
-
-

-
- ID)) :?> -
- - ID, 'wpfc_preacher') ?> -
+
+

+
+ ID ) ) : ?> +
+ + ID, 'wpfc_preacher' ) ?> +
+ + ID ) ) : ?> +
+ + ID, 'wpfc_sermon_series' ) ?> +
+ + ID, 'bible_passage', true ) ) : ?> +
+ + +
- ID)) :?> -
- - ID, 'wpfc_sermon_series') ?> -
- - ID, 'bible_passage', true)) :?> -
- - -
- - ID)) :?> -
- - ID, 'wpfc_service_type') ?> -
- -
-
- -
- - + ID ) ) : ?> +
+ + ID, 'wpfc_service_type' ) ?> +
+ +
+
+ +
+ + - -
- -
+ +
+ +
- - -
- -
+ + +
+ +
-
- -
- -
+
+ +
+ +
- ID)) :?> -
- - ID, 'wpfc_sermon_topics') ?> -
+ ID ) ) : ?> +
+ + ID, 'wpfc_sermon_topics' ) ?> +
-
-
-
- +
+
+
+ -
+
Date: Wed, 14 Feb 2018 10:06:58 +0100 Subject: [PATCH 41/87] Add loader for theme specific styles --- assets/css/sermon.css | 14 -------------- assets/css/theme-specific/twentyfifteen.css | 9 +++++++++ assets/css/theme-specific/twentyfifteen.css.map | 7 +++++++ assets/css/theme-specific/twentyfifteen.scss | 14 ++++++++++++++ sermons.php | 11 ++++++++--- 5 files changed, 38 insertions(+), 17 deletions(-) create mode 100644 assets/css/theme-specific/twentyfifteen.css create mode 100644 assets/css/theme-specific/twentyfifteen.css.map create mode 100644 assets/css/theme-specific/twentyfifteen.scss diff --git a/assets/css/sermon.css b/assets/css/sermon.css index 76dc1dd..e498eaa 100755 --- a/assets/css/sermon.css +++ b/assets/css/sermon.css @@ -483,17 +483,3 @@ h3.wpfc_grid_title a { .wpfc-sermon-single-topics { margin-top: 24px; } - -/******************************* Theme Specific - tewntyfifteen *******************************/ -.wpfc-twentyfifteen #wpfc_sermon_sorting { - margin-left: 8.3333%; - margin-right: 8.3333%; -} - -.wpfc-twentyfifteen .wpfc-sermon-single-image { - margin: 0; -} - -.wpfc-twentyfifteen .wpfc-sermon-single-main { - padding: 10%; -} \ No newline at end of file diff --git a/assets/css/theme-specific/twentyfifteen.css b/assets/css/theme-specific/twentyfifteen.css new file mode 100644 index 0000000..508fa95 --- /dev/null +++ b/assets/css/theme-specific/twentyfifteen.css @@ -0,0 +1,9 @@ +.wpfc-twentyfifteen #wpfc_sermon_sorting { + margin-left: 8.3333%; + margin-right: 8.3333%; } +.wpfc-twentyfifteen .wpfc-sermon-single-image { + margin: 0; } +.wpfc-twentyfifteen .wpfc-sermon-single-main { + padding: 10%; } + +/*# sourceMappingURL=twentyfifteen.css.map */ diff --git a/assets/css/theme-specific/twentyfifteen.css.map b/assets/css/theme-specific/twentyfifteen.css.map new file mode 100644 index 0000000..c4e8484 --- /dev/null +++ b/assets/css/theme-specific/twentyfifteen.css.map @@ -0,0 +1,7 @@ +{ +"version": 3, +"mappings": "AACE,wCAAqB;EACnB,WAAW,EAAE,OAAO;EACpB,YAAY,EAAE,OAAO;AAGvB,6CAA0B;EACxB,MAAM,EAAE,CAAC;AAGX,4CAAyB;EACvB,OAAO,EAAE,GAAG", +"sources": ["twentyfifteen.scss"], +"names": [], +"file": "twentyfifteen.css" +} \ No newline at end of file diff --git a/assets/css/theme-specific/twentyfifteen.scss b/assets/css/theme-specific/twentyfifteen.scss new file mode 100644 index 0000000..1de4be5 --- /dev/null +++ b/assets/css/theme-specific/twentyfifteen.scss @@ -0,0 +1,14 @@ +.wpfc-twentyfifteen { + #wpfc_sermon_sorting { + margin-left: 8.3333%; + margin-right: 8.3333%; + } + + .wpfc-sermon-single-image { + margin: 0; + } + + .wpfc-sermon-single-main { + padding: 10%; + } +} diff --git a/sermons.php b/sermons.php index 4b0960f..4b15f41 100755 --- a/sermons.php +++ b/sermons.php @@ -517,7 +517,12 @@ public static function enqueue_scripts_styles() { if ( ! \SermonManager::getOption( 'css' ) ) { wp_enqueue_style( 'wpfc-sm-styles', SM_URL . 'assets/css/sermon.css', array(), SM_VERSION ); wp_enqueue_style( 'dashicons' ); - wp_enqueue_script( 'wpfc-sm-additional_classes', SM_URL . 'assets/js/additional_classes.js', array(), SERMON_MANAGER_VERSION, true ); + wp_enqueue_script( 'wpfc-sm-additional_classes', SM_URL . 'assets/js/additional_classes.js', array(), SM_VERSION, true ); + + // load theme-specific styling, if there's any + if ( file_exists( SM_PATH . 'assets/css/theme-specific/' . get_option( 'template' ) . '.css' ) ) { + wp_enqueue_style( 'wpfc-sm-style-' . get_option( 'template' ), SM_URL . 'assets/css/theme-specific/' . get_option( 'template' ) . '.css', array( 'wpfc-sm-styles' ), SM_VERSION ); + } switch ( \SermonManager::getOption( 'player' ) ) { case 'mediaelement': @@ -612,8 +617,8 @@ public static function add_additional_sermon_classes( $classes, $class, $post_id * Allows filtering of additional Sermon Manager classes * * @param array $classes The array of added classes - * - * @since 2.12.0 + * + * @since 2.12.0 */ $additional_classes = apply_filters( 'wpfc_sermon_classes', $additional_classes, $classes, $post_id ); From 5020b7f996409f6149a1a47eb6c6e5deab30af49 Mon Sep 17 00:00:00 2001 From: Adrian Ionescu <9744973+adrianweb@users.noreply.github.com> Date: Wed, 14 Feb 2018 12:32:21 +0000 Subject: [PATCH 42/87] fix: add our own class to main article wrapper --- assets/css/theme-specific/twentrythirteen.css | 5 +++++ assets/css/theme-specific/twentyfifteen.css | 3 ++- assets/css/theme-specific/twentyfifteen.scss | 2 ++ assets/css/theme-specific/twentyfourteen.css | 4 ++++ includes/template-tags.php | 4 ++-- 5 files changed, 15 insertions(+), 3 deletions(-) create mode 100644 assets/css/theme-specific/twentrythirteen.css create mode 100644 assets/css/theme-specific/twentyfourteen.css diff --git a/assets/css/theme-specific/twentrythirteen.css b/assets/css/theme-specific/twentrythirteen.css new file mode 100644 index 0000000..14e9364 --- /dev/null +++ b/assets/css/theme-specific/twentrythirteen.css @@ -0,0 +1,5 @@ +.wpfc-twentrythirteen { + margin: 0 auto; + max-width: 604px; + width: 100%; +} \ No newline at end of file diff --git a/assets/css/theme-specific/twentyfifteen.css b/assets/css/theme-specific/twentyfifteen.css index 508fa95..f27bb5d 100644 --- a/assets/css/theme-specific/twentyfifteen.css +++ b/assets/css/theme-specific/twentyfifteen.css @@ -5,5 +5,6 @@ margin: 0; } .wpfc-twentyfifteen .wpfc-sermon-single-main { padding: 10%; } - +.wpfc-twentyfifteen .hentry { + padding-top: 0; } /*# sourceMappingURL=twentyfifteen.css.map */ diff --git a/assets/css/theme-specific/twentyfifteen.scss b/assets/css/theme-specific/twentyfifteen.scss index 1de4be5..05d095d 100644 --- a/assets/css/theme-specific/twentyfifteen.scss +++ b/assets/css/theme-specific/twentyfifteen.scss @@ -11,4 +11,6 @@ .wpfc-sermon-single-main { padding: 10%; } + + .hentry { padding-top: 0; } } diff --git a/assets/css/theme-specific/twentyfourteen.css b/assets/css/theme-specific/twentyfourteen.css new file mode 100644 index 0000000..cef9647 --- /dev/null +++ b/assets/css/theme-specific/twentyfourteen.css @@ -0,0 +1,4 @@ +.wpfc-twentyfourteen { + margin: 0 auto; + max-width: 474px; +} \ No newline at end of file diff --git a/includes/template-tags.php b/includes/template-tags.php index 5d6b0f7..7b66c74 100755 --- a/includes/template-tags.php +++ b/includes/template-tags.php @@ -455,7 +455,7 @@ function wpfc_sermon_single_v2( $return = false, $post = '' ) { ob_start(); ?> -
> +
> '; From 895a01db56ddd8c538ccfb6e56f4f849c7516af2 Mon Sep 17 00:00:00 2001 From: Adrian Ionescu <9744973+adrianweb@users.noreply.github.com> Date: Wed, 14 Feb 2018 12:40:26 +0000 Subject: [PATCH 44/87] fix: additional sermon classes --- includes/template-tags.php | 4 ++-- sermons.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/includes/template-tags.php b/includes/template-tags.php index 7b66c74..5d6b0f7 100755 --- a/includes/template-tags.php +++ b/includes/template-tags.php @@ -455,7 +455,7 @@ function wpfc_sermon_single_v2( $return = false, $post = '' ) { ob_start(); ?> -
> +
> '; From f182fe6868013ad5610d0938393d88e28ad90726 Mon Sep 17 00:00:00 2001 From: Adrian Ionescu <9744973+adrianweb@users.noreply.github.com> Date: Wed, 14 Feb 2018 13:56:09 +0000 Subject: [PATCH 46/87] archive view image, background position center --- assets/css/sermon.css | 1 + 1 file changed, 1 insertion(+) diff --git a/assets/css/sermon.css b/assets/css/sermon.css index e498eaa..4886af7 100755 --- a/assets/css/sermon.css +++ b/assets/css/sermon.css @@ -359,6 +359,7 @@ h3.wpfc_grid_title a { width: 100%; height: 100%; background-size: cover; + background-position: center; } .wpfc-sermon-inner { background: white; From 46139501aa07094bd1c5ec6f17e7621e26691d9c Mon Sep 17 00:00:00 2001 From: Adrian Ionescu <9744973+adrianweb@users.noreply.github.com> Date: Wed, 14 Feb 2018 14:33:22 +0000 Subject: [PATCH 47/87] css improvements --- assets/css/sermon.css | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/assets/css/sermon.css b/assets/css/sermon.css index 4886af7..2b49bb1 100755 --- a/assets/css/sermon.css +++ b/assets/css/sermon.css @@ -342,6 +342,7 @@ h3.wpfc_grid_title a { /******************************* Sermon Archive *******************************/ .wpfc-sermon { margin-bottom: 48px; + padding: 0; } .wpfc-sermon:last-child { margin-bottom: 0; @@ -351,7 +352,6 @@ h3.wpfc_grid_title a { position: relative; } .wpfc-sermon-image img { - display: block; width: 100%; max-width: 100%; } @@ -365,6 +365,7 @@ h3.wpfc_grid_title a { background: white; border: 1px solid #ddd; } + .wpfc-sermon-main { padding: 24px; } @@ -417,19 +418,19 @@ h3.wpfc_grid_title a { color: #ddd; } -/* Horizontal Layout */ -.wpfc-sermon-horizontal .wpfc-sermon-inner { - display: flex; - flex-flow: row wrap; -} -.wpfc-sermon-horizontal .wpfc-sermon-image { - flex: 0 30%; +/* Horizontal View */ +@media (min-width: 800px) { + .wpfc-sermon-inner { + display: flex; + flex-flow: row wrap; + } + .wpfc-sermon-image { flex: 0 30%; } + .wpfc-sermon-main { flex: 1; } + .wpfc-sermon-image img { display: none; } } -.wpfc-sermon-horizontal .wpfc-sermon-image img { - display: none; -} -.wpfc-sermon-horizontal .wpfc-sermon-main { - flex: 1; + +@media(max-width: 800px) { + .wpfc-sermon-image-img { display: none; } } /******************************* Sermon Singular *******************************/ From 54e64964c05a4d05cd5e1b92e0b612751b50590a Mon Sep 17 00:00:00 2001 From: Adrian Ionescu <9744973+adrianweb@users.noreply.github.com> Date: Wed, 14 Feb 2018 14:35:39 +0000 Subject: [PATCH 48/87] twentyseventeen css fix --- assets/css/theme-specific/twentyseventeen.css | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 assets/css/theme-specific/twentyseventeen.css diff --git a/assets/css/theme-specific/twentyseventeen.css b/assets/css/theme-specific/twentyseventeen.css new file mode 100644 index 0000000..aa8b4f7 --- /dev/null +++ b/assets/css/theme-specific/twentyseventeen.css @@ -0,0 +1,3 @@ +.wpfc-twentyseventeen .archive .site-main > article { + padding: 0; +} \ No newline at end of file From 03df0d61c89ceae80472d1dac80f518c1d462a60 Mon Sep 17 00:00:00 2001 From: Adrian Ionescu <9744973+adrianweb@users.noreply.github.com> Date: Wed, 14 Feb 2018 14:55:04 +0000 Subject: [PATCH 49/87] css improvements --- assets/css/sermon.css | 15 ++++----------- assets/css/theme-specific/twentyseventeen.css | 3 --- 2 files changed, 4 insertions(+), 14 deletions(-) diff --git a/assets/css/sermon.css b/assets/css/sermon.css index 2b49bb1..c61039d 100755 --- a/assets/css/sermon.css +++ b/assets/css/sermon.css @@ -340,13 +340,6 @@ h3.wpfc_grid_title a { } /******************************* Sermon Archive *******************************/ -.wpfc-sermon { - margin-bottom: 48px; - padding: 0; -} -.wpfc-sermon:last-child { - margin-bottom: 0; -} .wpfc-sermon-image { height: auto; position: relative; @@ -420,13 +413,13 @@ h3.wpfc_grid_title a { /* Horizontal View */ @media (min-width: 800px) { - .wpfc-sermon-inner { + .wpfc-sermon-horizontal .wpfc-sermon-inner { display: flex; flex-flow: row wrap; } - .wpfc-sermon-image { flex: 0 30%; } - .wpfc-sermon-main { flex: 1; } - .wpfc-sermon-image img { display: none; } + .wpfc-sermon-horizontal .wpfc-sermon-image { flex: 0 30%; } + .wpfc-sermon-horizontal .wpfc-sermon-main { flex: 1; } + .wpfc-sermon-horizontal .wpfc-sermon-image img { display: none; } } @media(max-width: 800px) { diff --git a/assets/css/theme-specific/twentyseventeen.css b/assets/css/theme-specific/twentyseventeen.css index aa8b4f7..e69de29 100644 --- a/assets/css/theme-specific/twentyseventeen.css +++ b/assets/css/theme-specific/twentyseventeen.css @@ -1,3 +0,0 @@ -.wpfc-twentyseventeen .archive .site-main > article { - padding: 0; -} \ No newline at end of file From 94ca7049f0c310e7f209ca0c2f7b4a4e5a177f8e Mon Sep 17 00:00:00 2001 From: Adrian Ionescu <9744973+adrianweb@users.noreply.github.com> Date: Wed, 14 Feb 2018 17:33:09 +0000 Subject: [PATCH 50/87] fix spacing between sermons on archive view --- assets/css/sermon.css | 6 ++++++ assets/css/theme-specific/twentyseventeen.css | 3 +++ 2 files changed, 9 insertions(+) diff --git a/assets/css/sermon.css b/assets/css/sermon.css index c61039d..27dba94 100755 --- a/assets/css/sermon.css +++ b/assets/css/sermon.css @@ -340,6 +340,12 @@ h3.wpfc_grid_title a { } /******************************* Sermon Archive *******************************/ +.wpfc-sermon { + margin-bottom: 48; +} +.wpfc-sermon:last-child { + margin-bottom: 0; +} .wpfc-sermon-image { height: auto; position: relative; diff --git a/assets/css/theme-specific/twentyseventeen.css b/assets/css/theme-specific/twentyseventeen.css index e69de29..aa8b4f7 100644 --- a/assets/css/theme-specific/twentyseventeen.css +++ b/assets/css/theme-specific/twentyseventeen.css @@ -0,0 +1,3 @@ +.wpfc-twentyseventeen .archive .site-main > article { + padding: 0; +} \ No newline at end of file From c425284f7879231cc07613352105b774dfc42329 Mon Sep 17 00:00:00 2001 From: Adrian Ionescu <9744973+adrianweb@users.noreply.github.com> Date: Thu, 15 Feb 2018 09:57:46 +0000 Subject: [PATCH 51/87] fix typo, add mmargin in px --- assets/css/sermon.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/css/sermon.css b/assets/css/sermon.css index 27dba94..2a4f2bd 100755 --- a/assets/css/sermon.css +++ b/assets/css/sermon.css @@ -341,7 +341,7 @@ h3.wpfc_grid_title a { /******************************* Sermon Archive *******************************/ .wpfc-sermon { - margin-bottom: 48; + margin-bottom: 48px; } .wpfc-sermon:last-child { margin-bottom: 0; From 15f3a2279a594a2dcaa0108c10ae1fe011d68926 Mon Sep 17 00:00:00 2001 From: Adrian Ionescu <9744973+adrianweb@users.noreply.github.com> Date: Thu, 15 Feb 2018 10:22:11 +0000 Subject: [PATCH 52/87] add avada case, @todo fill css class names --- views/partials/wrapper-end.php | 7 ++++++- views/partials/wrapper-start.php | 3 +++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/views/partials/wrapper-end.php b/views/partials/wrapper-end.php index 907f140..1e6ed7d 100644 --- a/views/partials/wrapper-end.php +++ b/views/partials/wrapper-end.php @@ -40,8 +40,13 @@ get_sidebar(); echo '
'; break; - default : + case 'Avada': + echo '
'; + get_sidebar(); echo '
'; + break; + default : + echo '
'; get_sidebar(); echo '
'; break; diff --git a/views/partials/wrapper-start.php b/views/partials/wrapper-start.php index 521f5dd..d70cab9 100644 --- a/views/partials/wrapper-start.php +++ b/views/partials/wrapper-start.php @@ -30,6 +30,9 @@ case 'salient' : echo '
'; break; + case 'Avada' : + echo '
'; + break; default : echo '
'; break; From 5840e3ccfecb392ccee2c2281d4d90535c33722d Mon Sep 17 00:00:00 2001 From: Adrian Ionescu <9744973+adrianweb@users.noreply.github.com> Date: Thu, 15 Feb 2018 10:56:43 +0000 Subject: [PATCH 53/87] display image on side only --- assets/css/sermon.css | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/assets/css/sermon.css b/assets/css/sermon.css index 2a4f2bd..e997a0c 100755 --- a/assets/css/sermon.css +++ b/assets/css/sermon.css @@ -324,7 +324,7 @@ h3.wpfc_grid_title a { /******************************* Sermon Sorting *******************************/ .wpfc-sermon-container #wpfc_sermon_sorting { padding: 0; - margin-bottom: 48px; + margin: 0 0 48px 0; } .wpfc-sermon-container #wpfc_sermon_sorting form { @@ -419,13 +419,13 @@ h3.wpfc_grid_title a { /* Horizontal View */ @media (min-width: 800px) { - .wpfc-sermon-horizontal .wpfc-sermon-inner { + .wpfc-sermon-inner { display: flex; flex-flow: row wrap; } - .wpfc-sermon-horizontal .wpfc-sermon-image { flex: 0 30%; } - .wpfc-sermon-horizontal .wpfc-sermon-main { flex: 1; } - .wpfc-sermon-horizontal .wpfc-sermon-image img { display: none; } + .wpfc-sermon-image { flex: 0 30%; } + .wpfc-sermon-main { flex: 1; } + .wpfc-sermon-image img { display: none; } } @media(max-width: 800px) { From 6abe4078a6a82f0470eb10654afcefb56e86e0fd Mon Sep 17 00:00:00 2001 From: Adrian Ionescu <9744973+adrianweb@users.noreply.github.com> Date: Thu, 15 Feb 2018 10:58:19 +0000 Subject: [PATCH 54/87] remove image on single view --- includes/template-tags.php | 3 --- 1 file changed, 3 deletions(-) diff --git a/includes/template-tags.php b/includes/template-tags.php index 5d6b0f7..25bce3b 100755 --- a/includes/template-tags.php +++ b/includes/template-tags.php @@ -457,9 +457,6 @@ function wpfc_sermon_single_v2( $return = false, $post = '' ) {
>
-
- -
From a18ef4c01c5a428b3da576f457fc9030dec2f3f2 Mon Sep 17 00:00:00 2001 From: Adrian Ionescu <9744973+adrianweb@users.noreply.github.com> Date: Thu, 15 Feb 2018 11:02:05 +0000 Subject: [PATCH 55/87] fix sorting on mobile view --- assets/css/sermon.css | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/assets/css/sermon.css b/assets/css/sermon.css index e997a0c..bf952f8 100755 --- a/assets/css/sermon.css +++ b/assets/css/sermon.css @@ -339,6 +339,17 @@ h3.wpfc_grid_title a { margin: 0 0 4px 0; } +@media (max-width: 650px) { + .wpfc-sermon-container #wpfc_semron_sorting > div { + width: 100%; + margin: 0 0 12px 0; + } + + .wpfc-sermon-container #wpfc_sermon_sorting > div:last-child { + margin: 0; + } +} + /******************************* Sermon Archive *******************************/ .wpfc-sermon { margin-bottom: 48px; From 93f8e3aa91ac2c0930003cbbe8a38b9e585bd2d0 Mon Sep 17 00:00:00 2001 From: Nikola Date: Fri, 16 Feb 2018 08:56:59 +0100 Subject: [PATCH 56/87] Remove 2015 SCSS and leave only CSS --- assets/css/theme-specific/twentyfifteen.css | 18 ++++++++++++------ .../css/theme-specific/twentyfifteen.css.map | 7 ------- assets/css/theme-specific/twentyfifteen.scss | 16 ---------------- 3 files changed, 12 insertions(+), 29 deletions(-) delete mode 100644 assets/css/theme-specific/twentyfifteen.css.map delete mode 100644 assets/css/theme-specific/twentyfifteen.scss diff --git a/assets/css/theme-specific/twentyfifteen.css b/assets/css/theme-specific/twentyfifteen.css index f27bb5d..359f463 100644 --- a/assets/css/theme-specific/twentyfifteen.css +++ b/assets/css/theme-specific/twentyfifteen.css @@ -1,10 +1,16 @@ .wpfc-twentyfifteen #wpfc_sermon_sorting { - margin-left: 8.3333%; - margin-right: 8.3333%; } + margin-left: 8.3333%; + margin-right: 8.3333%; +} + .wpfc-twentyfifteen .wpfc-sermon-single-image { - margin: 0; } + margin: 0; +} + .wpfc-twentyfifteen .wpfc-sermon-single-main { - padding: 10%; } + padding: 10%; +} + .wpfc-twentyfifteen .hentry { - padding-top: 0; } -/*# sourceMappingURL=twentyfifteen.css.map */ + padding-top: 0; +} diff --git a/assets/css/theme-specific/twentyfifteen.css.map b/assets/css/theme-specific/twentyfifteen.css.map deleted file mode 100644 index c4e8484..0000000 --- a/assets/css/theme-specific/twentyfifteen.css.map +++ /dev/null @@ -1,7 +0,0 @@ -{ -"version": 3, -"mappings": "AACE,wCAAqB;EACnB,WAAW,EAAE,OAAO;EACpB,YAAY,EAAE,OAAO;AAGvB,6CAA0B;EACxB,MAAM,EAAE,CAAC;AAGX,4CAAyB;EACvB,OAAO,EAAE,GAAG", -"sources": ["twentyfifteen.scss"], -"names": [], -"file": "twentyfifteen.css" -} \ No newline at end of file diff --git a/assets/css/theme-specific/twentyfifteen.scss b/assets/css/theme-specific/twentyfifteen.scss deleted file mode 100644 index 05d095d..0000000 --- a/assets/css/theme-specific/twentyfifteen.scss +++ /dev/null @@ -1,16 +0,0 @@ -.wpfc-twentyfifteen { - #wpfc_sermon_sorting { - margin-left: 8.3333%; - margin-right: 8.3333%; - } - - .wpfc-sermon-single-image { - margin: 0; - } - - .wpfc-sermon-single-main { - padding: 10%; - } - - .hentry { padding-top: 0; } -} From 7c133a39a595e3fc58e09a0cb449dd523562ff67 Mon Sep 17 00:00:00 2001 From: Nikola Date: Fri, 16 Feb 2018 09:04:38 +0100 Subject: [PATCH 57/87] Add filters for wrappers --- views/partials/wrapper-end.php | 8 ++++---- views/partials/wrapper-start.php | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/views/partials/wrapper-end.php b/views/partials/wrapper-end.php index 1e6ed7d..dbc0fdd 100644 --- a/views/partials/wrapper-end.php +++ b/views/partials/wrapper-end.php @@ -5,7 +5,9 @@ switch ( $template ) { case 'twentyeleven' : echo '
'; - if ( is_archive() ) { get_sidebar(); } + if ( is_archive() ) { + get_sidebar(); + } break; case 'twentytwelve' : echo '
'; @@ -46,8 +48,6 @@ echo '
'; break; default : - echo '
'; - get_sidebar(); - echo '
'; + echo apply_filters( 'sm_templates_wrapper_end', '
' . get_sidebar() . '
' ); break; } diff --git a/views/partials/wrapper-start.php b/views/partials/wrapper-start.php index d70cab9..e764810 100644 --- a/views/partials/wrapper-start.php +++ b/views/partials/wrapper-start.php @@ -34,6 +34,6 @@ echo '
'; break; default : - echo '
'; + echo apply_filters( 'sm_templates_wrapper_start', '
' ); break; } From 41d268c5f987c0b5ce1d47cee5536d43b1045115 Mon Sep 17 00:00:00 2001 From: Adrian Ionescu <9744973+adi8i@users.noreply.github.com> Date: Fri, 16 Feb 2018 10:18:28 +0200 Subject: [PATCH 58/87] Fix typo --- assets/css/theme-specific/twentrythirteen.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/css/theme-specific/twentrythirteen.css b/assets/css/theme-specific/twentrythirteen.css index 14e9364..1f7fde2 100644 --- a/assets/css/theme-specific/twentrythirteen.css +++ b/assets/css/theme-specific/twentrythirteen.css @@ -1,5 +1,5 @@ -.wpfc-twentrythirteen { +.wpfc-twentythirteen { margin: 0 auto; max-width: 604px; width: 100%; -} \ No newline at end of file +} From b5bc84043c57a13f9142ff8502259ba7310971ab Mon Sep 17 00:00:00 2001 From: Nikola Date: Fri, 16 Feb 2018 09:52:04 +0100 Subject: [PATCH 59/87] Add function to get sermon/series image url --- includes/template-tags.php | 37 ++++++++++++++++++++++++++++++++++--- 1 file changed, 34 insertions(+), 3 deletions(-) diff --git a/includes/template-tags.php b/includes/template-tags.php index 25bce3b..ab4f50f 100755 --- a/includes/template-tags.php +++ b/includes/template-tags.php @@ -67,7 +67,7 @@ function render_wpfc_sermon_archive() {

- get_the_ID() + ) ) as $term + ) { + if ( isset( $term->image_id ) && $term->image_id !== 0 ) { + $image = wp_get_attachment_image_url( $term->image_id, 'full' ); + if ( $image ) { + return $image; + } + } + } + } + + return ''; +} + /* * render media files section * for template files use @@ -612,9 +644,8 @@ function wpfc_sermon_excerpt_v2( $return = false ) {
From ab6d7cb5ebb336c399dc08b21fe62fb4c2e7bce9 Mon Sep 17 00:00:00 2001 From: Adrian Ionescu <9744973+adrianweb@users.noreply.github.com> Date: Fri, 16 Feb 2018 09:01:57 +0000 Subject: [PATCH 60/87] rework sermon image --- assets/css/sermon.css | 11 ++++------- includes/template-tags.php | 37 +++++++++++++++++++++++++++++++++++-- 2 files changed, 39 insertions(+), 9 deletions(-) diff --git a/assets/css/sermon.css b/assets/css/sermon.css index bf952f8..6b9b8c6 100755 --- a/assets/css/sermon.css +++ b/assets/css/sermon.css @@ -340,7 +340,7 @@ h3.wpfc_grid_title a { } @media (max-width: 650px) { - .wpfc-sermon-container #wpfc_semron_sorting > div { + .wpfc-sermon-container #wpfc_sermon_sorting > div { width: 100%; margin: 0 0 12px 0; } @@ -361,10 +361,6 @@ h3.wpfc_grid_title a { height: auto; position: relative; } -.wpfc-sermon-image img { - width: 100%; - max-width: 100%; -} .wpfc-sermon-image-img { width: 100%; height: 100%; @@ -436,11 +432,12 @@ h3.wpfc_grid_title a { } .wpfc-sermon-image { flex: 0 30%; } .wpfc-sermon-main { flex: 1; } - .wpfc-sermon-image img { display: none; } } @media(max-width: 800px) { - .wpfc-sermon-image-img { display: none; } + .wpfc-sermon-image-img { + padding-top: 56.25%; + } } /******************************* Sermon Singular *******************************/ diff --git a/includes/template-tags.php b/includes/template-tags.php index 25bce3b..e66734f 100755 --- a/includes/template-tags.php +++ b/includes/template-tags.php @@ -241,6 +241,38 @@ function render_sermon_image( $size ) { endif; } +/** + * Returns sermon image URL + * + * @param bool $fallback If set to true, it will try to get series image URL if sermon image URL is not set + * + * @return string Image URL or empty string + * + * @since 2.12.0 + */ +function get_sermon_image_url( $fallback = true ) { + if ( get_the_post_thumbnail_url() ) { + return get_the_post_thumbnail_url(); + } + if ( $fallback ) { + foreach ( + apply_filters( 'sermon-images-get-the-terms', '', array( + 'post_id' => get_the_ID() + ) ) as $term + ) { + if ( isset( $term->image_id ) && $term->image_id !== 0 ) { + $image = wp_get_attachment_image_url( $term->image_id, 'full' ); + if ( $image ) { + return $image; + } + } + } + } + + return ''; + +} + /* * render media files section * for template files use @@ -610,13 +642,14 @@ function wpfc_sermon_excerpt_v2( $return = false ) { ?>
> +
ID ) ) : ?>
From ee1c41472c2617f8746a2cee44ed26e28fd64962 Mon Sep 17 00:00:00 2001 From: Adrian Ionescu <9744973+adrianweb@users.noreply.github.com> Date: Fri, 16 Feb 2018 09:34:22 +0000 Subject: [PATCH 61/87] resolve merge conflict --- includes/template-tags.php | 8 -------- 1 file changed, 8 deletions(-) diff --git a/includes/template-tags.php b/includes/template-tags.php index dc89a52..e56a878 100755 --- a/includes/template-tags.php +++ b/includes/template-tags.php @@ -254,10 +254,7 @@ function get_sermon_image_url( $fallback = true ) { if ( get_the_post_thumbnail_url() ) { return get_the_post_thumbnail_url(); } -<<<<<<< HEAD -======= ->>>>>>> 5633bb8557cb6bccd0f58ba4cc49caf40786c9b0 if ( $fallback ) { foreach ( apply_filters( 'sermon-images-get-the-terms', '', array( @@ -272,14 +269,9 @@ function get_sermon_image_url( $fallback = true ) { } } } -<<<<<<< HEAD return ''; -======= - - return ''; ->>>>>>> 5633bb8557cb6bccd0f58ba4cc49caf40786c9b0 } /* From 5d522ce25b5f25fd190d12f317840998b92b9aab Mon Sep 17 00:00:00 2001 From: Adrian Ionescu <9744973+adrianweb@users.noreply.github.com> Date: Fri, 16 Feb 2018 11:39:22 +0000 Subject: [PATCH 62/87] add wrapper class for salient theme --- views/partials/wrapper-start.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/views/partials/wrapper-start.php b/views/partials/wrapper-start.php index e764810..bb2bf5f 100644 --- a/views/partials/wrapper-start.php +++ b/views/partials/wrapper-start.php @@ -28,7 +28,7 @@ echo '
'; break; case 'salient' : - echo '
'; + echo '
'; break; case 'Avada' : echo '
'; From e190ffb52b470d9cba1195b3d030addf7026d6fe Mon Sep 17 00:00:00 2001 From: Adrian Ionescu <9744973+adrianweb@users.noreply.github.com> Date: Fri, 16 Feb 2018 11:40:26 +0000 Subject: [PATCH 63/87] adjust sorting mobile breakpoint --- assets/css/sermon.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/css/sermon.css b/assets/css/sermon.css index 6b9b8c6..9af6213 100755 --- a/assets/css/sermon.css +++ b/assets/css/sermon.css @@ -339,7 +339,7 @@ h3.wpfc_grid_title a { margin: 0 0 4px 0; } -@media (max-width: 650px) { +@media (max-width: 700px) { .wpfc-sermon-container #wpfc_sermon_sorting > div { width: 100%; margin: 0 0 12px 0; From a18323fb7c367df0a2bc44c7b372c379e8f7c10e Mon Sep 17 00:00:00 2001 From: Nikola Date: Mon, 19 Feb 2018 08:37:18 +0100 Subject: [PATCH 64/87] Add option to use home_url for filtering --- includes/admin/settings/class-sm-settings-debug.php | 7 +++++++ includes/template-tags.php | 2 +- readme.txt | 1 + 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/includes/admin/settings/class-sm-settings-debug.php b/includes/admin/settings/class-sm-settings-debug.php index 6602207..dd55bea 100644 --- a/includes/admin/settings/class-sm-settings-debug.php +++ b/includes/admin/settings/class-sm-settings-debug.php @@ -74,6 +74,13 @@ public function get_settings() { 'id' => 'post_excerpt_enabled', 'default' => 1, ), + array( + 'title' => 'Use home_url in dropdown filter', + 'type' => 'checkbox', + 'id' => 'home_url_filtering', + 'desc' => 'Check this if you have HTTP 404 error when you use filtering', + 'default' => 0, + ), array( 'title' => __( 'Execute a specific update function' ), 'type' => 'select', diff --git a/includes/template-tags.php b/includes/template-tags.php index b8c4b0a..f126080 100755 --- a/includes/template-tags.php +++ b/includes/template-tags.php @@ -146,7 +146,7 @@ function render_wpfc_sermon_archive() { * @since 2.5.0 added $args */ function render_wpfc_sorting( $args = array() ) { - $action = site_url() . '/' . ( SermonManager::getOption( 'common_base_slug' ) ? ( SermonManager::getOption( 'archive_slug' ) ?: 'sermons' ) : '' ); + $action = ( SermonManager::getOption( 'home_url_filtering' ) ? home_url() : site_url() ) . '/' . ( SermonManager::getOption( 'common_base_slug' ) ? ( SermonManager::getOption( 'archive_slug' ) ?: 'sermons' ) : '' ); // Filters HTML fields data $filters = array( diff --git a/readme.txt b/readme.txt index cbcbd9a..86af97e 100755 --- a/readme.txt +++ b/readme.txt @@ -105,6 +105,7 @@ Visit the [plugin homepage](https://wpforchurch.com/wordpress-plugins/sermon-man ### 2.12.0 ### * Fix: Audio player defaults to "Browser HTML5" when "Disable Sermon Styles" option is checked * Fix: Plyr sometimes not loading +* Dev: Add an option to use home_url in dropdown filtering * Dev: Load Plyr earlier ### 2.11.3 ### From 04573b37d4f90f61d7b2c6787a68414b5a6f9d52 Mon Sep 17 00:00:00 2001 From: Nikola Date: Mon, 19 Feb 2018 08:37:18 +0100 Subject: [PATCH 65/87] Add option to use home_url for filtering (cherry picked from commit a18323fb7c367df0a2bc44c7b372c379e8f7c10e) --- includes/admin/settings/class-sm-settings-debug.php | 7 +++++++ includes/template-tags.php | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/includes/admin/settings/class-sm-settings-debug.php b/includes/admin/settings/class-sm-settings-debug.php index 6602207..dd55bea 100644 --- a/includes/admin/settings/class-sm-settings-debug.php +++ b/includes/admin/settings/class-sm-settings-debug.php @@ -74,6 +74,13 @@ public function get_settings() { 'id' => 'post_excerpt_enabled', 'default' => 1, ), + array( + 'title' => 'Use home_url in dropdown filter', + 'type' => 'checkbox', + 'id' => 'home_url_filtering', + 'desc' => 'Check this if you have HTTP 404 error when you use filtering', + 'default' => 0, + ), array( 'title' => __( 'Execute a specific update function' ), 'type' => 'select', diff --git a/includes/template-tags.php b/includes/template-tags.php index e56a878..5074fd5 100755 --- a/includes/template-tags.php +++ b/includes/template-tags.php @@ -82,7 +82,7 @@ function render_wpfc_sermon_archive() { * @since 2.5.0 added $args */ function render_wpfc_sorting( $args = array() ) { - $action = site_url() . '/' . ( SermonManager::getOption( 'common_base_slug' ) ? ( SermonManager::getOption( 'archive_slug' ) ?: 'sermons' ) : '' ); + $action = ( SermonManager::getOption( 'home_url_filtering' ) ? home_url() : site_url() ) . '/' . ( SermonManager::getOption( 'common_base_slug' ) ? ( SermonManager::getOption( 'archive_slug' ) ?: 'sermons' ) : '' ); // Filters HTML fields data $filters = array( From 96bcdd78ad43f634a0666bad6d4eabd7659b0866 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nikola=20Miljkovi=C4=87?= Date: Mon, 19 Feb 2018 11:39:57 +0100 Subject: [PATCH 66/87] Remove redundant settings descriptions --- includes/admin/settings/class-sm-settings-general.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/includes/admin/settings/class-sm-settings-general.php b/includes/admin/settings/class-sm-settings-general.php index 718a8ae..fdb6048 100644 --- a/includes/admin/settings/class-sm-settings-general.php +++ b/includes/admin/settings/class-sm-settings-general.php @@ -72,14 +72,12 @@ public function get_settings() { array( 'title' => __( 'Display audio player or video on archive pages', 'sermon-manager-for-wordpress' ), 'type' => 'checkbox', - 'desc' => __( 'Display audio player or video on archive pages', 'sermon-manager-for-wordpress' ), 'id' => 'archive_player', 'default' => 'no', ), array( 'title' => __( 'Display attachments on archive pages', 'sermon-manager-for-wordpress' ), 'type' => 'checkbox', - 'desc' => __( 'Display attachments on archive pages', 'sermon-manager-for-wordpress' ), 'id' => 'archive_meta', 'default' => 'no', ), From e4cace54989b223e45f904dcc771e71679fe286a Mon Sep 17 00:00:00 2001 From: Adrian Ionescu <9744973+adrianweb@users.noreply.github.com> Date: Mon, 19 Feb 2018 11:35:23 +0000 Subject: [PATCH 67/87] fix spacing on 20 14 --- assets/css/theme-specific/twentyfourteen.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/css/theme-specific/twentyfourteen.css b/assets/css/theme-specific/twentyfourteen.css index cef9647..0a69a78 100644 --- a/assets/css/theme-specific/twentyfourteen.css +++ b/assets/css/theme-specific/twentyfourteen.css @@ -1,4 +1,4 @@ -.wpfc-twentyfourteen { +.wpfc-sermon { margin: 0 auto; max-width: 474px; } \ No newline at end of file From 1d053472bf926b43bbff62a863cddd8e3ca36cb8 Mon Sep 17 00:00:00 2001 From: Adrian Ionescu <9744973+adrianweb@users.noreply.github.com> Date: Mon, 19 Feb 2018 11:47:10 +0000 Subject: [PATCH 68/87] fix spacing on 20 14 --- assets/css/theme-specific/twentyfourteen.css | 22 ++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/assets/css/theme-specific/twentyfourteen.css b/assets/css/theme-specific/twentyfourteen.css index 0a69a78..74b74be 100644 --- a/assets/css/theme-specific/twentyfourteen.css +++ b/assets/css/theme-specific/twentyfourteen.css @@ -1,4 +1,22 @@ -.wpfc-sermon { +#wpfc_sermon_sorting { + margin: 0 auto 48px auto !important; +} + +#wpfc_sermon_sorting, +.wpfc-sermon, +.wpfc-sermon-single { + max-width: 474px !important; +} + +.wpfc-sermon, +.wpfc-sermon-single { margin: 0 auto; - max-width: 474px; +} + +.wpfc-sermon:last-child { + margin-bottom: 48px; +} + +.full-width .site-content .hentry.has-post-thumbnail:first-child { + margin-top: 0 !important; } \ No newline at end of file From 867c5799104197503140d5ca1f917f7e36b1e4c5 Mon Sep 17 00:00:00 2001 From: Adrian Ionescu <9744973+adrianweb@users.noreply.github.com> Date: Mon, 19 Feb 2018 11:49:31 +0000 Subject: [PATCH 69/87] fix spacing on 20 17 --- assets/css/theme-specific/twentyseventeen.css | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/assets/css/theme-specific/twentyseventeen.css b/assets/css/theme-specific/twentyseventeen.css index aa8b4f7..0a943a0 100644 --- a/assets/css/theme-specific/twentyseventeen.css +++ b/assets/css/theme-specific/twentyseventeen.css @@ -1,3 +1,7 @@ .wpfc-twentyseventeen .archive .site-main > article { padding: 0; +} + +.wpfc-sermon { + margin: 0; } \ No newline at end of file From 862ef7ddc61cb7b097ec8a1bab01c0a6a1bfe686 Mon Sep 17 00:00:00 2001 From: Adrian Ionescu <9744973+adrianweb@users.noreply.github.com> Date: Mon, 19 Feb 2018 11:54:42 +0000 Subject: [PATCH 70/87] fix spacing on 20 13 --- assets/css/theme-specific/twentrythirteen.css | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/assets/css/theme-specific/twentrythirteen.css b/assets/css/theme-specific/twentrythirteen.css index 1f7fde2..bebb23c 100644 --- a/assets/css/theme-specific/twentrythirteen.css +++ b/assets/css/theme-specific/twentrythirteen.css @@ -3,3 +3,11 @@ max-width: 604px; width: 100%; } + +#wpfc_sermon_sorting { + margin: 40px 0 0 !important; +} + +.wpfc-sermon { + margin: 0; +} From 3a54cd325b136a45b02a2a88528f8c247e4fc0f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nikola=20Miljkovi=C4=87?= Date: Wed, 21 Feb 2018 12:45:45 +0100 Subject: [PATCH 71/87] Add more error checking to importing --- includes/admin/import/class-sm-import-sb.php | 28 ++++++++++-- includes/admin/import/class-sm-import-se.php | 48 ++++++++++++-------- readme.txt | 1 + 3 files changed, 53 insertions(+), 24 deletions(-) diff --git a/includes/admin/import/class-sm-import-sb.php b/includes/admin/import/class-sm-import-sb.php index 2383beb..26b3532 100644 --- a/includes/admin/import/class-sm-import-sb.php +++ b/includes/admin/import/class-sm-import-sb.php @@ -137,7 +137,12 @@ private function _import_books() { $this->log( 'Term "' . $book->book_name . '" already exists. (ID: ' . $term_data['term_id'] . ')' ); } else { $term_data = wp_insert_term( $book->book_name, 'wpfc_bible_book' ); - $this->log( 'Term "' . $book->book_name . '" imported. (ID: ' . $term_data['term_id'] . ')' ); + if ( ! $term_data instanceof WP_Error ) { + $this->log( 'Term "' . $book->book_name . '" imported. (ID: ' . $term_data['term_id'] . ')' ); + } else { + $this->log( 'Term "' . $book->book_name . '" not imported. (' . $term_data->get_error_code() . ': ' . $term_data->get_error_message() . ')' ); + continue; + } } $this->_imported_books[ $book->id ] = array( @@ -195,7 +200,12 @@ private function _import_preachers() { $term_data = wp_insert_term( $preacher->name, 'wpfc_preacher', array( 'desc' => apply_filters( 'sm_import_sb_preacher_description', $preacher->description ?: '' ) ) ); - $this->log( 'Term "' . $preacher->name . '" imported. (ID: ' . $term_data['term_id'] . ')' ); + if ( ! $term_data instanceof WP_Error ) { + $this->log( 'Term "' . $preacher->name . '" imported. (ID: ' . $term_data['term_id'] . ')' ); + } else { + $this->log( 'Term "' . $preacher->name . '" not imported. (' . $term_data->get_error_code() . ': ' . $term_data->get_error_message() . ')' ); + continue; + } } if ( $preacher->image !== '' ) { @@ -237,7 +247,12 @@ private function _import_series() { $this->log( 'Term "' . $item->name . '" already exists. (ID: ' . $term_data['term_id'] . ')' ); } else { $term_data = wp_insert_term( $item->name, 'wpfc_sermon_series' ); - $this->log( 'Term "' . $item->name . '" imported. (ID: ' . $term_data['term_id'] . ')' ); + if ( ! $term_data instanceof WP_Error ) { + $this->log( 'Term "' . $item->name . '" imported. (ID: ' . $term_data['term_id'] . ')' ); + } else { + $this->log( 'Term "' . $item->name . '" not imported. (' . $term_data->get_error_code() . ': ' . $term_data->get_error_message() . ')' ); + continue; + } } $this->_imported_series[ $item->id ] = array( @@ -264,7 +279,12 @@ private function _import_service_types() { $this->log( 'Term "' . $service->name . '" already exists. (ID: ' . $term_data['term_id'] . ')' ); } else { $term_data = wp_insert_term( $service->name, 'wpfc_sermon_series' ); - $this->log( 'Term "' . $service->name . '" imported. (ID: ' . $term_data['term_id'] . ')' ); + if ( ! $term_data instanceof WP_Error ) { + $this->log( 'Term "' . $service->name . '" imported. (ID: ' . $term_data['term_id'] . ')' ); + } else { + $this->log( 'Term "' . $service->name . '" not imported. (' . $term_data->get_error_code() . ': ' . $term_data->get_error_message() . ')' ); + continue; + } } $this->_imported_service_types[ $service->id ] = array( diff --git a/includes/admin/import/class-sm-import-se.php b/includes/admin/import/class-sm-import-se.php index 0be2b2d..cd795bf 100644 --- a/includes/admin/import/class-sm-import-se.php +++ b/includes/admin/import/class-sm-import-se.php @@ -62,9 +62,11 @@ private function _import_books() { $term_data = wp_insert_term( $book->book_name, 'wpfc_bible_book' ); } - $this->_imported_books[ $book->book_id ] = array( - 'new_id' => $term_data['term_id'], - ); + if ( ! $term_data instanceof WP_Error ) { + $this->_imported_books[ $book->book_id ] = array( + 'new_id' => $term_data['term_id'], + ); + } } } @@ -123,9 +125,11 @@ private function _import_speakers() { $term_data = wp_insert_term( trim( $speaker->first_name . ' ' . $speaker->last_name ), 'wpfc_preacher' ); } - $this->_imported_speakers[ $speaker->speaker_id ] = array( - 'new_id' => $term_data['term_id'], - ); + if ( ! $term_data instanceof WP_Error ) { + $this->_imported_speakers[ $speaker->speaker_id ] = array( + 'new_id' => $term_data['term_id'], + ); + } } } @@ -149,17 +153,19 @@ private function _import_series() { ) ); } - // Set image - $attachment_id = sm_import_and_set_post_thumbnail( $item->thumbnail_url, 0 ); - if ( is_int( $attachment_id ) ) { - $assigned_images = get_option( 'sermon_image_plugin' ); - $assigned_images[ $term_data['term_id'] ] = $attachment_id; - update_option( 'sermon_image_plugin', $assigned_images ); - } + if ( ! $term_data instanceof WP_Error ) { + // Set image + $attachment_id = sm_import_and_set_post_thumbnail( $item->thumbnail_url, 0 ); + if ( is_int( $attachment_id ) ) { + $assigned_images = get_option( 'sermon_image_plugin' ); + $assigned_images[ $term_data['term_id'] ] = $attachment_id; + update_option( 'sermon_image_plugin', $assigned_images ); + } - $this->_imported_series[ $item->series_id ] = array( - 'new_id' => $term_data['term_id'], - ); + $this->_imported_series[ $item->series_id ] = array( + 'new_id' => $term_data['term_id'], + ); + } } } @@ -181,9 +187,11 @@ private function _import_topics() { $term_data = wp_insert_term( $topic->name, 'wpfc_sermon_topics' ); } - $this->_imported_topics[ $topic->topic_id ] = array( - 'new_id' => $term_data['term_id'], - ); + if ( ! $term_data instanceof WP_Error ) { + $this->_imported_topics[ $topic->topic_id ] = array( + 'new_id' => $term_data['term_id'], + ); + } } } @@ -264,7 +272,7 @@ private function _import_messages() { ) ) ); } - if ( $id === 0 ) { + if ( $id === 0 || $id instanceof WP_Error) { // silently skip if error continue; } diff --git a/readme.txt b/readme.txt index 86af97e..5fbfd7c 100755 --- a/readme.txt +++ b/readme.txt @@ -103,6 +103,7 @@ Visit the [plugin homepage](https://wpforchurch.com/wordpress-plugins/sermon-man ## Changelog ## ### 2.12.0 ### +* Fix: Add more error checking to importing * Fix: Audio player defaults to "Browser HTML5" when "Disable Sermon Styles" option is checked * Fix: Plyr sometimes not loading * Dev: Add an option to use home_url in dropdown filtering From ed30211d73ccf9e0c260676c25dff4d7ad0b3f91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nikola=20Miljkovi=C4=87?= Date: Wed, 21 Feb 2018 12:50:11 +0100 Subject: [PATCH 72/87] Add a checkbox for enabling PHP errors --- .../settings/class-sm-settings-debug.php | 6 +++++ readme.txt | 1 + sermons.php | 23 +++++++++++-------- 3 files changed, 21 insertions(+), 9 deletions(-) diff --git a/includes/admin/settings/class-sm-settings-debug.php b/includes/admin/settings/class-sm-settings-debug.php index dd55bea..7a28dbf 100644 --- a/includes/admin/settings/class-sm-settings-debug.php +++ b/includes/admin/settings/class-sm-settings-debug.php @@ -25,6 +25,12 @@ public function get_settings() { 'desc' => '', 'id' => 'debug_settings' ), + array( + 'title' => __( 'Enable output of PHP errors in Sermon Manager (disable in production)', 'sermon-manager-for-wordpress' ), + 'type' => 'checkbox', + 'id' => 'sm_debug', + 'default' => 'no', + ), array( 'title' => __( 'Force Sermon Manager\'s WP_Background_Updater class', 'sermon-manager-for-wordpress' ), 'type' => 'checkbox', diff --git a/readme.txt b/readme.txt index 5fbfd7c..5ded38d 100755 --- a/readme.txt +++ b/readme.txt @@ -106,6 +106,7 @@ Visit the [plugin homepage](https://wpforchurch.com/wordpress-plugins/sermon-man * Fix: Add more error checking to importing * Fix: Audio player defaults to "Browser HTML5" when "Disable Sermon Styles" option is checked * Fix: Plyr sometimes not loading +* Dev: Add an option to enable output of PHP errors in Sermon Manager * Dev: Add an option to use home_url in dropdown filtering * Dev: Load Plyr earlier diff --git a/sermons.php b/sermons.php index 796597e..0f78590 100755 --- a/sermons.php +++ b/sermons.php @@ -520,17 +520,17 @@ public static function enqueue_scripts_styles() { } switch ( \SermonManager::getOption( 'player' ) ) { - case 'mediaelement': - wp_enqueue_script( 'wp-mediaelement' ); + case 'mediaelement': + wp_enqueue_script( 'wp-mediaelement' ); - break; - case 'plyr': - wp_enqueue_script( 'wpfc-sm-plyr', SM_URL . 'assets/js/plyr.js', array(), SM_VERSION ); - wp_enqueue_style( 'wpfc-sm-plyr-css', SM_URL . 'assets/css/plyr.css', array(), SM_VERSION ); - wp_add_inline_script( 'wpfc-sm-plyr', 'window.addEventListener(\'DOMContentLoaded\', function() {plyr.setup(document.querySelectorAll(\'.wpfc-sermon-player, .wpfc-sermon-video-player\'));})' ); + break; + case 'plyr': + wp_enqueue_script( 'wpfc-sm-plyr', SM_URL . 'assets/js/plyr.js', array(), SM_VERSION ); + wp_enqueue_style( 'wpfc-sm-plyr-css', SM_URL . 'assets/css/plyr.css', array(), SM_VERSION ); + wp_add_inline_script( 'wpfc-sm-plyr', 'window.addEventListener(\'DOMContentLoaded\', function() {plyr.setup(document.querySelectorAll(\'.wpfc-sermon-player, .wpfc-sermon-video-player\'));})' ); - break; - } + break; + } if ( ! \SermonManager::getOption( 'verse_popup' ) ) { wp_enqueue_script( 'wpfc-sm-verse-script', SM_URL . 'assets/js/verse.js', array(), SM_VERSION ); @@ -632,5 +632,10 @@ function php_notice_handler() { } } +if ( SermonManager::getOption( 'sm_debug' ) || ( defined( 'SM_DEBUG' ) && SM_DEBUG === true ) ) { + error_reporting( E_ALL ); + ini_set( 'display_errors', 'On' ); +} + // Initialize Sermon Manager SermonManager::get_instance(); From 282bd916571455df721f7674efc17e0047616023 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nikola=20Miljkovi=C4=87?= Date: Sat, 24 Feb 2018 11:51:02 +0100 Subject: [PATCH 73/87] Add sorting shortcode options for hiding fields --- includes/shortcodes.php | 4 ++++ includes/template-tags.php | 17 ++++++++++++++--- readme.txt | 1 + 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/includes/shortcodes.php b/includes/shortcodes.php index a87b8b9..132700d 100755 --- a/includes/shortcodes.php +++ b/includes/shortcodes.php @@ -653,6 +653,10 @@ public function displaySermonSorting( $atts = array() ) { 'topics' => '', 'books' => '', 'visibility' => 'suggest', + 'hide_topics' => '', + 'hide_series' => '', + 'hide_preachers' => '', + 'hide_books' => '', ); // merge default and user options diff --git a/includes/template-tags.php b/includes/template-tags.php index f126080..c07fdcc 100755 --- a/includes/template-tags.php +++ b/includes/template-tags.php @@ -173,9 +173,20 @@ function render_wpfc_sorting( $args = array() ) { ), ); + $visibility_mapping = array( + 'wpfc_sermon_topics' => 'hide_topics', + 'wpfc_sermon_series' => 'hide_series', + 'wpfc_preacher' => 'hide_preachers', + 'wpfc_bible_book' => 'hide_books', + ); + ob_start(); ?>
+ + + +
@@ -359,10 +370,10 @@ function wpfc_render_video( $url = '' ) { $output = wp_video_shortcode( $attr ); } else { - $is_youtube_long = strpos( strtolower( $url ), 'youtube.com' ); + $is_youtube_long = strpos( strtolower( $url ), 'youtube.com' ); $is_youtube_short = strpos( strtolower( $url ), 'youtu.be' ); - $is_youtube = $is_youtube_long || $is_youtube_short; - $is_vimeo = strpos( strtolower( $url ), 'vimeo.com' ); + $is_youtube = $is_youtube_long || $is_youtube_short; + $is_vimeo = strpos( strtolower( $url ), 'vimeo.com' ); if ( $is_youtube || $is_vimeo ) { $output = '
'; diff --git a/readme.txt b/readme.txt index 5ded38d..5732b5b 100755 --- a/readme.txt +++ b/readme.txt @@ -103,6 +103,7 @@ Visit the [plugin homepage](https://wpforchurch.com/wordpress-plugins/sermon-man ## Changelog ## ### 2.12.0 ### +* New: Add more options to sorting shortcode * Fix: Add more error checking to importing * Fix: Audio player defaults to "Browser HTML5" when "Disable Sermon Styles" option is checked * Fix: Plyr sometimes not loading From 266e530173ca90db421080a18d184504f98b16f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nikola=20Miljkovi=C4=87?= Date: Sun, 25 Feb 2018 13:31:06 +0100 Subject: [PATCH 74/87] Make sure that import/export functions are executed only on those pages --- readme.txt | 1 + sermons.php | 52 +++++++++++++++++++++++++++------------------------- 2 files changed, 28 insertions(+), 25 deletions(-) diff --git a/readme.txt b/readme.txt index 5732b5b..1312e73 100755 --- a/readme.txt +++ b/readme.txt @@ -110,6 +110,7 @@ Visit the [plugin homepage](https://wpforchurch.com/wordpress-plugins/sermon-man * Dev: Add an option to enable output of PHP errors in Sermon Manager * Dev: Add an option to use home_url in dropdown filtering * Dev: Load Plyr earlier +* Dev: Make sure that import/export functions are executed only on import/export page ### 2.11.3 ### * Fix: Sermon date not being saved when date format is changed diff --git a/sermons.php b/sermons.php index 0f78590..661de8e 100755 --- a/sermons.php +++ b/sermons.php @@ -131,33 +131,35 @@ public function __construct() { // temporary hook for importing until API is properly done add_action( 'admin_init', function () { - if ( isset( $_GET['doimport'] ) ) { - $class = null; - - switch ( $_GET['doimport'] ) { - case 'sb': - $class = new SM_Import_SB(); - break; - case 'se': - $class = new SM_Import_SE(); - break; - } + if ( isset( $_GET['page'] ) && $_GET['page'] === 'sm-import-export' ) { + if ( isset( $_GET['doimport'] ) ) { + $class = null; + + switch ( $_GET['doimport'] ) { + case 'sb': + $class = new SM_Import_SB(); + break; + case 'se': + $class = new SM_Import_SE(); + break; + } - if ( $class !== null ) { - $class->import(); - add_action( 'admin_notices', function () { - if ( ! ! \SermonManager::getOption( 'debug_import' ) ) : ?> -
-

Debug info:

-
-
- + if ( $class !== null ) { + $class->import(); + add_action( 'admin_notices', function () { + if ( ! ! \SermonManager::getOption( 'debug_import' ) ) : ?> +
+

Debug info:

+
+
+ -
-

-
- +

+
+ Date: Wed, 28 Feb 2018 17:37:46 +0100 Subject: [PATCH 75/87] Add logic for loading templates --- includes/admin/settings/class-sm-settings-general.php | 10 ++++------ includes/template-tags.php | 6 +++++- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/includes/admin/settings/class-sm-settings-general.php b/includes/admin/settings/class-sm-settings-general.php index 718a8ae..adb8f3a 100644 --- a/includes/admin/settings/class-sm-settings-general.php +++ b/includes/admin/settings/class-sm-settings-general.php @@ -51,13 +51,11 @@ public function get_settings() { 'default' => 'no', ), array( - 'title' => __( 'Enable Template Files', 'sermon-manager-for-wordpress' ), + 'title' => __( 'Theme Compatibility', 'sermon-manager-for-wordpress' ), 'type' => 'checkbox', - // translators: %s effectively /views - // translators: Since /views is a locale independent folder name it MUST NOT be localized - 'desc' => wp_sprintf( __( 'Enable template files found in the %s folder', 'sermon-manager-for-wordpress' ), '/views' ), - 'desc_tip' => __( 'This is for users upgrading from an older version who have issues with version 1.5+.', 'sermon-manager-for-wordpress' ), - 'id' => 'template', + 'desc' => __( 'Enable this if your sermon layout looks broken.', 'sermon-manager-for-wordpress' ), + 'desc_tip' => __( 'This will disable full-page layout override, and use alternative layout algorithm.', 'sermon-manager-for-wordpress' ), + 'id' => 'theme_compatibility', 'default' => 'no', ), array( diff --git a/includes/template-tags.php b/includes/template-tags.php index 5074fd5..eb16c93 100755 --- a/includes/template-tags.php +++ b/includes/template-tags.php @@ -4,7 +4,7 @@ /** * Include template files */ -if ( \SermonManager::getOption( 'template' ) ) { +if ( ! \SermonManager::getOption( 'theme_compatibility' ) ) { add_filter( 'template_include', function ( $template ) { if ( is_singular( 'wpfc_sermon' ) ) { $default_file = 'single-wpfc_sermon.php'; @@ -18,6 +18,10 @@ is_tax( 'wpfc_service_type' ) ) { $default_file = 'taxonomy-' . $term->taxonomy . '.php'; + + if ( ! file_exists( get_stylesheet_directory() . '/' . $default_file ) ) { + $default_file = 'archive-wpfc_sermon.php'; + } } else { $default_file = 'archive-wpfc_sermon.php'; } From 9c756a406f60538b20ffbf5988724ccfedcdd54e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nikola=20Miljkovi=C4=87?= Date: Wed, 28 Feb 2018 18:10:19 +0100 Subject: [PATCH 76/87] Clean up template-tags.php, and finalize content rendering --- .../settings/class-sm-settings-debug.php | 7 + includes/sm-deprecated-functions.php | 268 ++++++++++- includes/template-tags.php | 430 ++++-------------- 3 files changed, 365 insertions(+), 340 deletions(-) diff --git a/includes/admin/settings/class-sm-settings-debug.php b/includes/admin/settings/class-sm-settings-debug.php index dd55bea..0215430 100644 --- a/includes/admin/settings/class-sm-settings-debug.php +++ b/includes/admin/settings/class-sm-settings-debug.php @@ -89,6 +89,13 @@ public function get_settings() { 'options' => sm_debug_get_update_functions(), 'desc' => '[AE] - Already Executed; [NE] - Not Executed', ), + array( + 'title' => 'Disable override of the_excerpt', + 'type' => 'checkbox', + 'id' => 'disable_the_excerpt', + 'desc' => 'Check this if you have double sermon content on archive page', + 'default' => 0, + ), array( 'type' => 'sectionend', 'id' => 'debug_settings' ), ) ); diff --git a/includes/sm-deprecated-functions.php b/includes/sm-deprecated-functions.php index 706d56a..09c4ec0 100644 --- a/includes/sm-deprecated-functions.php +++ b/includes/sm-deprecated-functions.php @@ -72,4 +72,270 @@ function render_wpfc_sermon_single() { */ function render_wpfc_sermon_excerpt() { do_action( 'sermon_excerpt' ); -} \ No newline at end of file +} + +/** + * Renders v0 archive the_content + * + * @deprecated 2.12.0 + */ +function render_wpfc_sermon_archive() { + global $post; ?> +
> +

+
+ +
+
+

+ ', ' ' ); + the_terms( $post->ID, 'wpfc_service_type', ' (', ' ', ')' ); + ?>

+

' . __( 'Bible Text: ', 'sermon-manager-for-wordpress' ), ' | ' ); + the_terms( $post->ID, 'wpfc_preacher', '', ' ', '' ); + the_terms( $post->ID, 'wpfc_sermon_series', '

' . __( 'Series: ', 'sermon-manager-for-wordpress' ), ' ', '

' ); + ?> +

+
+
+ +
+
+ +
+
+

+ ', ' ' ); + the_terms( $post->ID, 'wpfc_service_type', ' (', ' ', ')' ); + ?> +

+

+ ' . __( 'Bible Text: ', 'sermon-manager-for-wordpress' ), ' | ' ); + the_terms( $post->ID, 'wpfc_preacher', '', ', ', '' ); + ?> +

+

+ ID, 'wpfc_sermon_series', '' . __( 'Series: ', 'sermon-manager-for-wordpress' ), ' ', '' ); ?> +

+
+ +
+ + + + + + +
+ +
+ +
+
+ +
+
+

+ ', ' ' ); + the_terms( $post->ID, 'wpfc_service_type', ' (', ' ', ')' ); + ?>

+

' . __( 'Bible Text: ', 'sermon-manager-for-wordpress' ), ' | ' ); + the_terms( $post->ID, 'wpfc_preacher', '', ', ', '' ); + the_terms( $post->ID, 'wpfc_sermon_series', '

' . __( 'Series: ', 'sermon-manager-for-wordpress' ), ' ', '

' ); + ?> +

+
+
+
+ + + + + + + + ID, 'wpfc_sermon_topics', '

' . __( 'Sermon Topics: ', 'sermon-manager-for-wordpress' ), ',', '

' ); ?> + +
+ '; + $html .= wpfc_render_audio( get_wpfc_sermon_meta( 'sermon_audio' ) ); + $html .= '
'; + + return $html; +} + +/** + * Render sermon image, if not set try series image, if not set too - try preacher + * + * @param string $size Image size, supports WP image size + * + * @deprecated 2.12.0 + */ +function render_sermon_image( $size ) { + //$size = any defined image size in WordPress + if ( has_post_thumbnail() ) : + the_post_thumbnail( $size ); + elseif ( apply_filters( 'sermon-images-list-the-terms', '', array( 'taxonomy' => 'wpfc_sermon_series', ) ) ) : + // get series image + print apply_filters( 'sermon-images-list-the-terms', '', array( + 'image_size' => $size, + 'taxonomy' => 'wpfc_sermon_series', + 'after' => '', + 'after_image' => '', + 'before' => '', + 'before_image' => '' + ) ); + elseif ( ! has_post_thumbnail() && ! apply_filters( 'sermon-images-list-the-terms', '', array( 'taxonomy' => 'wpfc_sermon_series', ) ) ) : + // get speaker image + print apply_filters( 'sermon-images-list-the-terms', '', array( + 'image_size' => $size, + 'taxonomy' => 'wpfc_preacher', + 'after' => '', + 'after_image' => '', + 'before' => '', + 'before_image' => '' + ) ); + endif; +} + +/** + * Renders video and/or audio with wrapper HTML + * + * @return string The HTML + * + * @deprecated 2.12.0 + */ +function wpfc_sermon_media() { + $html = ''; + + if ( get_wpfc_sermon_meta( 'sermon_video_link' ) ) { + $html .= ''; + } else { + $html .= '
'; + $html .= do_shortcode( get_wpfc_sermon_meta( 'sermon_video' ) ); + $html .= '
'; + } + + if ( get_wpfc_sermon_meta( 'sermon_audio' ) ) { + $html .= '
'; + $html .= wpfc_render_audio( get_wpfc_sermon_meta( 'sermon_audio' ) ); + $html .= '
'; + } + + return $html; +} + +/** + * @deprecated 2.12.0 + */ +function wpfc_sermon_author_filter() { + _deprecated_function( __FUNCTION__, '2.12.0', null ); +} diff --git a/includes/template-tags.php b/includes/template-tags.php index eb16c93..fd50593 100755 --- a/includes/template-tags.php +++ b/includes/template-tags.php @@ -43,39 +43,32 @@ } ); } +/** + * Replaces default the_content and/or the_excerpt with proper sermon content + * + * @param string $content The default content + * + * @return string The modified content if it's Sermon related data + */ +function add_wpfc_sermon_content( $content ) { + if ( 'wpfc_sermon' === get_post_type() && in_the_loop() == true ) { + if ( ! is_feed() && ( is_archive() || is_search() ) ) { + $content = wpfc_sermon_excerpt_v2( true ); + } elseif ( is_singular() && is_main_query() ) { + $content = wpfc_sermon_single_v2( true ); + } + } + + return $content; +} + add_filter( 'the_content', 'add_wpfc_sermon_content' ); -add_filter( 'the_excerpt', 'add_wpfc_sermon_content' ); - -// render archive entry; depreciated - use render_wpfc_sermon_excerpt() instead -function render_wpfc_sermon_archive() { - global $post; ?> -
> -

-
- -
-
-

- ', ' ' ); - the_terms( $post->ID, 'wpfc_service_type', ' (', ' ', ')' ); - ?>

-

' . __( 'Bible Text: ', 'sermon-manager-for-wordpress' ), ' | ' ); - the_terms( $post->ID, 'wpfc_preacher', '', ' ', '' ); - the_terms( $post->ID, 'wpfc_sermon_series', '

' . __( 'Series: ', 'sermon-manager-for-wordpress' ), ' ', '

' ); - ?> -

-
-
- ID, $args, true ); - if ( $data != '' ) { - echo $before . $data . $after; - } - - echo ''; +/** + * Echo sermon meta key content from inside a loop + * + * @param string $meta_key The meta key name + * @param string $before Content before key value + * @param string $after Content after key value + */ +function wpfc_sermon_meta( $meta_key = '', $before = '', $after = '' ) { + echo $before . get_wpfc_sermon_meta( $meta_key ) . $after; } -// return any sermon meta -function get_wpfc_sermon_meta( $args ) { +/** + * Return single sermon meta key content from inside a loop + * + * @param string $meta_key The meta key name + * + * @return mixed|null The meta key content/null if it's blank + */ +function get_wpfc_sermon_meta( $meta_key = '' ) { global $post; - $data = get_post_meta( $post->ID, $args, true ); - if ( $data != '' ) { + $data = get_post_meta( $post->ID, $meta_key, true ); + if ( $data !== '' ) { return $data; } return null; } +/** + * Pass sermon content through WordPres functions, to render shortcodes, etc + * + * @param string $meta_key Sermon meta key + * @param int $post_id Post ID + * + * @return string The processed content + */ function process_wysiwyg_output( $meta_key, $post_id = 0 ) { global $wp_embed; @@ -197,52 +204,23 @@ function process_wysiwyg_output( $meta_key, $post_id = 0 ) { return $content; } -// render/return sermon description +/** + * Render sermon description + * + * @param string $before content before description + * @param string $after content after description + * @param bool $return True to return, false to echo (default) + * + * @return string The HTML, if $return is set to true + */ function wpfc_sermon_description( $before = '', $after = '', $return = false ) { - global $post; $output = $before . wpautop( process_wysiwyg_output( 'sermon_description', get_the_ID() ) ) . $after; - if ( $return ) { - return $output; - } else { + if ( ! $return ) { echo $output; } -} -// Change the_author to the preacher on frontend display -function wpfc_sermon_author_filter() { - global $post; - $preacher = the_terms( $post->ID, 'wpfc_preacher', '', ', ', ' ' ); - - return $preacher; -} - -// render sermon image - loops through featured image, series image, speaker image, none -function render_sermon_image( $size ) { - //$size = any defined image size in WordPress - if ( has_post_thumbnail() ) : - the_post_thumbnail( $size ); - elseif ( apply_filters( 'sermon-images-list-the-terms', '', array( 'taxonomy' => 'wpfc_sermon_series', ) ) ) : - // get series image - print apply_filters( 'sermon-images-list-the-terms', '', array( - 'image_size' => $size, - 'taxonomy' => 'wpfc_sermon_series', - 'after' => '', - 'after_image' => '', - 'before' => '', - 'before_image' => '' - ) ); - elseif ( ! has_post_thumbnail() && ! apply_filters( 'sermon-images-list-the-terms', '', array( 'taxonomy' => 'wpfc_sermon_series', ) ) ) : - // get speaker image - print apply_filters( 'sermon-images-list-the-terms', '', array( - 'image_size' => $size, - 'taxonomy' => 'wpfc_preacher', - 'after' => '', - 'after_image' => '', - 'before' => '', - 'before_image' => '' - ) ); - endif; + return $output; } /** @@ -273,37 +251,8 @@ function get_sermon_image_url( $fallback = true ) { } } } - - return ''; - -} - -/* - * render media files section - * for template files use - * do_action ('sermon_media'); - * - */ -function wpfc_sermon_media() { - $html = ''; - - if ( get_wpfc_sermon_meta( 'sermon_video_link' ) ) { - $html .= ''; - } else { - $html .= '
'; - $html .= do_shortcode( get_wpfc_sermon_meta( 'sermon_video' ) ); - $html .= '
'; - } - - if ( get_wpfc_sermon_meta( 'sermon_audio' ) ) { - $html .= '
'; - $html .= wpfc_render_audio( get_wpfc_sermon_meta( 'sermon_audio' ) ); - $html .= '
'; - } - return $html; + return ''; } /** @@ -389,20 +338,12 @@ function wpfc_render_audio( $url = '' ) { return apply_filters( 'sm_audio_player', $output, $url ); } -// just get the sermon audio -function wpfc_sermon_audio() { - $html = ''; - $html .= '
'; - $html .= wpfc_render_audio( get_wpfc_sermon_meta( 'sermon_audio' ) ); - $html .= '
'; - - return $html; -} - -// render additional files +/** + * Render sermon attachments HTML + * + * @return string + */ function wpfc_sermon_attachments() { - global $post; - if ( ! get_wpfc_sermon_meta( 'sermon_audio' ) && ! get_wpfc_sermon_meta( 'sermon_notes' ) && ! get_wpfc_sermon_meta( 'sermon_bulletin' ) ) { @@ -426,66 +367,16 @@ function wpfc_sermon_attachments() { return apply_filters( 'sm_attachments_html', $html ); } -// single sermon action -function wpfc_sermon_single( $return = false, $post = '' ) { - if ( $post === '' ) { - global $post; - } - - ob_start(); - ?> -
-
- -
-
-

- ', ' ' ); - the_terms( $post->ID, 'wpfc_service_type', ' (', ' ', ')' ); - ?>

-

' . __( 'Bible Text: ', 'sermon-manager-for-wordpress' ), ' | ' ); - the_terms( $post->ID, 'wpfc_preacher', '', ', ', '' ); - the_terms( $post->ID, 'wpfc_sermon_series', '

' . __( 'Series: ', 'sermon-manager-for-wordpress' ), ' ', '

' ); - ?> -

-
-
-
- - - - - - - - ID, 'wpfc_sermon_topics', '

' . __( 'Sermon Topics: ', 'sermon-manager-for-wordpress' ), ',', '

' ); ?> - -
- -
-
- -
-
-

- ', ' ' ); - the_terms( $post->ID, 'wpfc_service_type', ' (', ' ', ')' ); - ?> -

-

- ' . __( 'Bible Text: ', 'sermon-manager-for-wordpress' ), ' | ' ); - the_terms( $post->ID, 'wpfc_preacher', '', ', ', '' ); - ?> -

-

- ID, 'wpfc_sermon_series', '' . __( 'Series: ', 'sermon-manager-for-wordpress' ), ' ', '' ); ?> -

-
- -
- - - - - - -
- -
-
>
- -
- -
-
-
- + +
+
ID ) ) : ?>
@@ -710,93 +549,6 @@ function wpfc_sermon_excerpt_v2( $return = false ) { return $output; } -function add_wpfc_sermon_content( $content ) { - if ( 'wpfc_sermon' == get_post_type() && in_the_loop() == true ) { - if ( ! is_feed() && ( is_archive() || is_search() ) ) { - $content = wpfc_sermon_excerpt( true ); - } elseif ( is_singular() && is_main_query() ) { - $content = wpfc_sermon_single( true ); - } - } - - return $content; -} - -//Podcast Feed URL -function wpfc_podcast_url( $feed_type = false ) { - if ( $feed_type == false ) { //return URL to feed page - return site_url() . '/feed/podcast'; - } else { //return URL to itpc itunes-loaded feed page - $itunes_url = str_replace( "http", "itpc", site_url() ); - - return $itunes_url . '/feed/podcast'; - } -} - -/** - * Display series info on an individual sermon - */ -function wpfc_footer_series() { - global $post; - $terms = get_the_terms( $post->ID, 'wpfc_sermon_series' ); - if ( $terms ) { - foreach ( $terms as $term ) { - if ( $term->description ) { - echo '
'; - echo '', - 'after_image' => '', - 'before' => ''; - echo '
'; - } - } - } -} - -/** - * Display preacher info on an individual sermon - */ -function wpfc_footer_preacher() { - global $post; - $terms = get_the_terms( $post->ID, 'wpfc_preacher' ); - if ( $terms ) { - foreach ( $terms as $term ) { - if ( $term->description ) { - echo '
'; - echo '', - 'after_image' => '', - 'before' => ''; - echo '
'; - } - } - } -} - /** * Build - - - - 1 ): ?> - - - - - - - - - 1 ): ?> - - - - - - - - - -
- - -
- ID, $meta_key, true ); - if ( $data !== '' ) { - return $data; - } - - return null; -} - -/** - * Pass sermon content through WordPres functions, to render shortcodes, etc - * - * @param string $meta_key Sermon meta key - * @param int $post_id Post ID - * - * @return string The processed content - */ -function process_wysiwyg_output( $meta_key, $post_id = 0 ) { - global $wp_embed; - - $post_id = $post_id ? $post_id : get_the_id(); - - $content = get_post_meta( $post_id, $meta_key, true ); - $content = $wp_embed->autoembed( $content ); - $content = $wp_embed->run_shortcode( $content ); - $content = wpautop( $content ); - $content = do_shortcode( $content ); - - return $content; -} - -/** - * Render sermon description - * - * @param string $before content before description - * @param string $after content after description - * @param bool $return True to return, false to echo (default) - * - * @return string The HTML, if $return is set to true - */ -function wpfc_sermon_description( $before = '', $after = '', $return = false ) { - $output = $before . wpautop( process_wysiwyg_output( 'sermon_description', get_the_ID() ) ) . $after; - - if ( ! $return ) { - echo $output; - } - - return $output; -} - -/** - * Returns sermon image URL - * - * @param bool $fallback If set to true, it will try to get series image URL if sermon image URL is not set - * - * @return string Image URL or empty string - * - * @since 2.12.0 - */ -function get_sermon_image_url( $fallback = true ) { - if ( get_the_post_thumbnail_url() ) { - return get_the_post_thumbnail_url(); - } - - if ( $fallback ) { - foreach ( - apply_filters( 'sermon-images-get-the-terms', '', array( - 'post_id' => get_the_ID() - ) ) as $term - ) { - if ( isset( $term->image_id ) && $term->image_id !== 0 ) { - $image = wp_get_attachment_image_url( $term->image_id, 'full' ); - if ( $image ) { - return $image; - } - } - } - } - - return ''; -} - -/** - * Renders the video player - * - * @param string $url The URL of the video file - * - * @return string Video player HTML - * - * @since 2.11.0 - */ -function wpfc_render_video( $url = '' ) { - if ( ! is_string( $url ) || trim( $url ) === '' ) { - return ''; - } - - $player = \SermonManager::getOption( 'player' ) ?: 'plyr'; - - if ( $player === 'wordpress' ) { - $attr = array( - 'src' => $url, - 'preload' => 'none' - ); - - $output = wp_video_shortcode( $attr ); - } else { - $is_youtube_long = strpos( strtolower( $url ), 'youtube.com' ); - $is_youtube_short = strpos( strtolower( $url ), 'youtu.be' ); - $is_youtube = $is_youtube_long || $is_youtube_short; - $is_vimeo = strpos( strtolower( $url ), 'vimeo.com' ); - - if ( $is_youtube || $is_vimeo ) { - $output = '
'; - } else { - $output = ''; - } - } - - /** - * Allows changing of the video player to any HTML - * - * @param string $output Video player HTML - * @param string $url Video source URL - */ - return apply_filters( 'sm_video_player', $output, $url ); -} - -/** - * Renders the audio player - * - * @param string $url The URL of the audio file - * - * @return string Audio player HTML - */ -function wpfc_render_audio( $url = '' ) { - if ( ! is_string( $url ) || trim( $url ) === '' ) { - return ''; - } - - $player = \SermonManager::getOption( 'player' ) ?: 'plyr'; - - if ( $player === 'wordpress' ) { - $attr = array( - 'src' => $url, - 'preload' => 'none' - ); - - $output = wp_audio_shortcode( $attr ); - } else { - $output = ''; - } - - /** - * Allows changing of the audio player to any HTML - * - * @param string $output Audio player HTML - * @param string $url Audio source URL - */ - return apply_filters( 'sm_audio_player', $output, $url ); -} - -/** - * Render sermon attachments HTML - * - * @return string - */ -function wpfc_sermon_attachments() { - if ( ! get_wpfc_sermon_meta( 'sermon_audio' ) && - ! get_wpfc_sermon_meta( 'sermon_notes' ) && - ! get_wpfc_sermon_meta( 'sermon_bulletin' ) ) { - return ''; - } - - $html = '
'; - $html .= '

' . __( 'Download Files', 'sermon-manager-for-wordpress' ) . ''; - if ( get_wpfc_sermon_meta( 'sermon_audio' ) ) { - $html .= '' . __( 'MP3', 'sermon-manager-for-wordpress' ) . ''; - } - if ( get_wpfc_sermon_meta( 'sermon_notes' ) ) { - $html .= '' . __( 'Notes', 'sermon-manager-for-wordpress' ) . ''; - } - if ( get_wpfc_sermon_meta( 'sermon_bulletin' ) ) { - $html .= '' . __( 'Bulletin', 'sermon-manager-for-wordpress' ) . ''; - } - $html .= '

'; - $html .= '
'; - - return apply_filters( 'sm_attachments_html', $html ); -} - -/** - * Renders updates single sermon view - * - * @param bool $return True to return output, false to echo (default) - * @param WP_Post $post WP_Post instance of the sermon - * - * @return string The HTML if $return is set to true - */ -function wpfc_sermon_single_v2( $return = false, $post = null ) { - if ( $post === null ) { - global $post; - } - - ob_start(); - ?> - -
> -
-
-
-
- -
-

-
- ID ) ) : ?> -
- - ID, 'wpfc_preacher' ) ?> -
- - ID ) ) : ?> -
- - ID, 'wpfc_sermon_series' ) ?> -
- - ID, 'bible_passage', true ) ) : ?> -
- - -
- - ID ) ) : ?> -
- - ID, 'wpfc_service_type' ) ?> -
- -
-
- -
- - - - -
- -
- - - -
- -
- -
- -
- -
- - ID ) ) : ?> -
- - ID, 'wpfc_sermon_topics' ) ?> -
- -
-
-
- - -
> -
- -
- -
-
-
- -
- ID ) ) : ?> -
- ID, 'wpfc_sermon_series' ) ?> -
- -

- -

-
- -
-
- -
-
-
- - fields for > + + + + + 1 ): ?> + + + + + + + + + 1 ): ?> + + + + + + + + + +
+ + +
+ ID, $meta_key, true ); + if ( $data !== '' ) { + return $data; + } + + return null; +} + +/** + * Pass sermon content through WordPres functions, to render shortcodes, etc + * + * @param string $meta_key Sermon meta key + * @param int $post_id Post ID + * + * @return string The processed content + */ +function process_wysiwyg_output( $meta_key, $post_id = 0 ) { + global $wp_embed; + + $post_id = $post_id ? $post_id : get_the_id(); + + $content = get_post_meta( $post_id, $meta_key, true ); + $content = $wp_embed->autoembed( $content ); + $content = $wp_embed->run_shortcode( $content ); + $content = wpautop( $content ); + $content = do_shortcode( $content ); + + return $content; +} + +/** + * Render sermon description + * + * @param string $before content before description + * @param string $after content after description + * @param bool $return True to return, false to echo (default) + * + * @return string The HTML, if $return is set to true + */ +function wpfc_sermon_description( $before = '', $after = '', $return = false ) { + $output = $before . wpautop( process_wysiwyg_output( 'sermon_description', get_the_ID() ) ) . $after; + + if ( ! $return ) { + echo $output; + } + + return $output; +} + +/** + * Returns sermon image URL + * + * @param bool $fallback If set to true, it will try to get series image URL if sermon image URL is not set + * + * @return string Image URL or empty string + * + * @since 2.12.0 + */ +function get_sermon_image_url( $fallback = true ) { + if ( get_the_post_thumbnail_url() ) { + return get_the_post_thumbnail_url(); + } + + if ( $fallback ) { + foreach ( + apply_filters( 'sermon-images-get-the-terms', '', array( + 'post_id' => get_the_ID() + ) ) as $term + ) { + if ( isset( $term->image_id ) && $term->image_id !== 0 ) { + $image = wp_get_attachment_image_url( $term->image_id, 'full' ); + if ( $image ) { + return $image; + } + } + } + } + + return ''; +} + +/** + * Renders the video player + * + * @param string $url The URL of the video file + * + * @return string Video player HTML + * + * @since 2.11.0 + */ +function wpfc_render_video( $url = '' ) { + if ( ! is_string( $url ) || trim( $url ) === '' ) { + return ''; + } + + $player = \SermonManager::getOption( 'player' ) ?: 'plyr'; + + if ( $player === 'wordpress' ) { + $attr = array( + 'src' => $url, + 'preload' => 'none' + ); + + $output = wp_video_shortcode( $attr ); + } else { + $is_youtube_long = strpos( strtolower( $url ), 'youtube.com' ); + $is_youtube_short = strpos( strtolower( $url ), 'youtu.be' ); + $is_youtube = $is_youtube_long || $is_youtube_short; + $is_vimeo = strpos( strtolower( $url ), 'vimeo.com' ); + + if ( $is_youtube || $is_vimeo ) { + $output = '
'; + } else { + $output = ''; + } + } + + /** + * Allows changing of the video player to any HTML + * + * @param string $output Video player HTML + * @param string $url Video source URL + */ + return apply_filters( 'sm_video_player', $output, $url ); +} + +/** + * Renders the audio player + * + * @param string $url The URL of the audio file + * + * @return string Audio player HTML + */ +function wpfc_render_audio( $url = '' ) { + if ( ! is_string( $url ) || trim( $url ) === '' ) { + return ''; + } + + $player = \SermonManager::getOption( 'player' ) ?: 'plyr'; + + if ( $player === 'wordpress' ) { + $attr = array( + 'src' => $url, + 'preload' => 'none' + ); + + $output = wp_audio_shortcode( $attr ); + } else { + $output = ''; + } + + /** + * Allows changing of the audio player to any HTML + * + * @param string $output Audio player HTML + * @param string $url Audio source URL + */ + return apply_filters( 'sm_audio_player', $output, $url ); +} + +/** + * Render sermon attachments HTML + * + * @return string + */ +function wpfc_sermon_attachments() { + if ( ! get_wpfc_sermon_meta( 'sermon_audio' ) && + ! get_wpfc_sermon_meta( 'sermon_notes' ) && + ! get_wpfc_sermon_meta( 'sermon_bulletin' ) ) { + return ''; + } + + $html = '
'; + $html .= '

' . __( 'Download Files', 'sermon-manager-for-wordpress' ) . ''; + if ( get_wpfc_sermon_meta( 'sermon_audio' ) ) { + $html .= '' . __( 'MP3', 'sermon-manager-for-wordpress' ) . ''; + } + if ( get_wpfc_sermon_meta( 'sermon_notes' ) ) { + $html .= '' . __( 'Notes', 'sermon-manager-for-wordpress' ) . ''; + } + if ( get_wpfc_sermon_meta( 'sermon_bulletin' ) ) { + $html .= '' . __( 'Bulletin', 'sermon-manager-for-wordpress' ) . ''; + } + $html .= '

'; + $html .= '
'; + + return apply_filters( 'sm_attachments_html', $html ); +} + +/** + * Renders updates single sermon view + * + * @param bool $return True to return output, false to echo (default) + * @param WP_Post $post WP_Post instance of the sermon + * + * @return string The HTML if $return is set to true + */ +function wpfc_sermon_single_v2( $return = false, $post = null ) { + if ( $post === null ) { + global $post; + } + + ob_start(); + ?> + +
> +
+
+
+
+ +
+

+
+ ID ) ) : ?> +
+ + ID, 'wpfc_preacher' ) ?> +
+ + ID ) ) : ?> +
+ + ID, 'wpfc_sermon_series' ) ?> +
+ + ID, 'bible_passage', true ) ) : ?> +
+ + +
+ + ID ) ) : ?> +
+ + ID, 'wpfc_service_type' ) ?> +
+ +
+
+ +
+ + + + +
+ +
+ + + +
+ +
+ +
+ +
+ +
+ + ID ) ) : ?> +
+ + ID, 'wpfc_sermon_topics' ) ?> +
+ +
+
+
+ + +
> +
+ +
+ +
+
+
+ +
+ ID ) ) : ?> +
+ ID, 'wpfc_sermon_series' ) ?> +
+ +

+ +

+
+ +
+
+ +
+
+
+ + fields for + + +

+ + + +
  • @@ -44,10 +66,9 @@
  • @@ -66,6 +74,12 @@

    -
    - - - -
    From 36eb00f6dfdf492b3bd8503d603bd706a69dde21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nikola=20Miljkovi=C4=87?= Date: Fri, 2 Mar 2018 16:54:47 +0100 Subject: [PATCH 84/87] Revert deleted code --- sermons.php | 76 +++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 54 insertions(+), 22 deletions(-) diff --git a/sermons.php b/sermons.php index 11a2cae..b85bb4b 100755 --- a/sermons.php +++ b/sermons.php @@ -234,6 +234,8 @@ public function __construct() { $skip_content_check = true; + $sm = SermonManager::get_instance(); + // All sermons $sermons = $wpdb->get_results( $wpdb->prepare( "SELECT ID FROM $wpdb->posts WHERE post_type = %s", 'wpfc_sermon' ) ); @@ -241,7 +243,7 @@ public function __construct() { $sermon_ID = $sermon->ID; if ( $value === 11 ) { - $this->render_sermon_into_content( $sermon_ID, null, true ); + $sm->render_sermon_into_content( $sermon_ID, null, true ); } else { $wpdb->query( "UPDATE $wpdb->posts SET `post_content` = '' WHERE `ID` = $sermon_ID" ); } @@ -263,6 +265,8 @@ public function __construct() { $skip_excerpt_check = true; + $sm = SermonManager::get_instance(); + // All sermons $sermons = $wpdb->get_results( $wpdb->prepare( "SELECT ID FROM $wpdb->posts WHERE post_type = %s", 'wpfc_sermon' ) ); @@ -270,7 +274,7 @@ public function __construct() { $sermon_ID = $sermon->ID; if ( $value === 11 ) { - $this->render_sermon_into_content( $sermon_ID, null, true ); + $sm->render_sermon_into_content( $sermon_ID, null, true ); } else { $wpdb->query( "UPDATE $wpdb->posts SET `post_excerpt` = '' WHERE `ID` = $sermon_ID" ); } @@ -309,7 +313,7 @@ private function _includes() { 'includes/entry-views.php', // Entry Views Tracking 'includes/shortcodes.php', // Shortcodes 'includes/widgets.php', // Widgets - 'includes/template-tags.php', // Template Tags + 'includes/sm-template-functions.php', // Template functions 'includes/podcast-functions.php', // Podcast Functions 'includes/helper-functions.php', // Global Helper Functions ); @@ -356,6 +360,19 @@ public static function getOption( $name = '', $default = '' ) { return SM_Admin_Settings::get_option( $name, $default ); } + /** + * Creates or returns an instance of this class. + * + * @return SermonManager A single instance of this class. + */ + public static function get_instance() { + if ( null == self::$instance ) { + self::$instance = new self; + } + + return self::$instance; + } + /** * Saves whole Sermon HTML markup into post content for better search compatibility * @@ -485,19 +502,6 @@ public static function fix_sermons_ordering( $query ) { } } - /** - * Creates or returns an instance of this class. - * - * @return SermonManager A single instance of this class. - */ - public static function get_instance() { - if ( null == self::$instance ) { - self::$instance = new self; - } - - return self::$instance; - } - /** * Load plugin translations * @@ -527,6 +531,13 @@ public static function enqueue_scripts_styles() { if ( ! \SermonManager::getOption( 'css' ) ) { wp_enqueue_style( 'wpfc-sm-styles', SM_URL . 'assets/css/sermon.css', array(), SM_VERSION ); wp_enqueue_style( 'dashicons' ); + + wp_enqueue_script( 'wpfc-sm-additional_classes', SM_URL . 'assets/js/additional_classes.js', array(), SM_VERSION, true ); + + // load theme-specific styling, if there's any + if ( file_exists( SM_PATH . 'assets/css/theme-specific/' . get_option( 'template' ) . '.css' ) ) { + wp_enqueue_style( 'wpfc-sm-style-' . get_option( 'template' ), SM_URL . 'assets/css/theme-specific/' . get_option( 'template' ) . '.css', array( 'wpfc-sm-styles' ), SM_VERSION ); + } } switch ( \SermonManager::getOption( 'player' ) ) { @@ -535,7 +546,7 @@ public static function enqueue_scripts_styles() { break; case 'plyr': - wp_enqueue_script( 'wpfc-sm-plyr', SM_URL . 'assets/js/plyr.js', array(), SM_VERSION, \SermonManager::getOption('player_js_footer') ); + wp_enqueue_script( 'wpfc-sm-plyr', SM_URL . 'assets/js/plyr.js', array(), SM_VERSION, \SermonManager::getOption( 'player_js_footer' ) ); wp_enqueue_style( 'wpfc-sm-plyr-css', SM_URL . 'assets/css/plyr.css', array(), SM_VERSION ); wp_add_inline_script( 'wpfc-sm-plyr', 'window.addEventListener(\'DOMContentLoaded\', function() {plyr.setup(document.querySelectorAll(\'.wpfc-sermon-player, .wpfc-sermon-video-player\'));})' ); @@ -575,11 +586,17 @@ public static function enqueue_scripts_styles() { * * @param array $classes An array of existing post classes * @param array $class An array of additional classes added to the post (not needed) - * @param int $ID The post ID + * @param int $post_id The post ID * * @return array Modified class list */ - public static function add_additional_sermon_classes( $classes, $class, $ID ) { + public static function add_additional_sermon_classes( $classes, $class, $post_id ) { + if ( get_post_type( $post_id ) !== 'wpfc_sermon' ) { + return $classes; + } + + $additional_classes = array(); + $taxonomies = array( 'wpfc_preacher', 'wpfc_sermon_series', @@ -588,7 +605,7 @@ public static function add_additional_sermon_classes( $classes, $class, $ID ) { ); foreach ( $taxonomies as $taxonomy ) { - foreach ( (array) get_the_terms( $ID, $taxonomy ) as $term ) { + foreach ( (array) get_the_terms( $post_id, $taxonomy ) as $term ) { if ( empty( $term->slug ) ) { continue; } @@ -600,12 +617,27 @@ public static function add_additional_sermon_classes( $classes, $class, $ID ) { $term_class = $term->term_id; } - $classes[] = esc_attr( sanitize_html_class( $taxonomy . '-' . $term_class, $taxonomy . '-' . $term->term_id ) ); + $additional_classes[] = esc_attr( sanitize_html_class( $taxonomy . '-' . $term_class, $taxonomy . '-' . $term->term_id ) ); } } } - return $classes; + if ( is_archive() ) { + $additional_classes[] = 'wpfc-sermon'; + } else { + $additional_classes[] = 'wpfc-sermon-single'; + } + + /** + * Allows filtering of additional Sermon Manager classes + * + * @param array $classes The array of added classes + * + * @since 2.12.0 + */ + $additional_classes = apply_filters( 'wpfc_sermon_classes', $additional_classes, $classes, $post_id ); + + return $additional_classes + $classes; } /** From ca3c6fea1359b5e2db7f2c51197f912bd5057020 Mon Sep 17 00:00:00 2001 From: Igor Cerjan Date: Fri, 2 Mar 2018 17:54:21 +0000 Subject: [PATCH 85/87] Add missing files --- assets/css/_import-export.css | 72 +++++++++++++++++++++++++++++++ assets/css/_import-export.css.map | 7 +++ assets/js/admin/import-export.js | 16 +++++++ 3 files changed, 95 insertions(+) create mode 100644 assets/css/_import-export.css create mode 100644 assets/css/_import-export.css.map create mode 100644 assets/js/admin/import-export.js diff --git a/assets/css/_import-export.css b/assets/css/_import-export.css new file mode 100644 index 0000000..e3298f8 --- /dev/null +++ b/assets/css/_import-export.css @@ -0,0 +1,72 @@ +.wp-list-table { + overflow: hidden; + height: 100%; } + +.plugin-card { + position: relative; } + .plugin-card > h2 { + position: absolute; + left: 50%; + top: 50%; + transform: translate(-50%, -50%); + z-index: 1; + color: #4a4a4a !important; + margin: 0; + font-size: 1.7rem; + font-weight: 100; + letter-spacing: 2px; + font-family: 'Roboto', sans-serif; + text-transform: uppercase; + opacity: 0; + transition: opacity .2s; + cursor: default; + width: 100%; + text-align: center; } + .plugin-card.not-available:before { + content: ""; + background: repeating-linear-gradient(45deg, rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 10px, rgba(0, 0, 0, 0.1) 10px, rgba(0, 0, 0, 0.1) 20px); + width: 100%; + height: 100%; + position: absolute; + left: 0; + top: 0; + z-index: 1; } + .plugin-card.not-available:hover > h2 { + opacity: 1; } + .plugin-card.not-available:hover .plugin-card-top { + -webkit-filter: blur(1px); + filter: blur(1px); } + .plugin-card.not-available * { + color: #ccc; } + .plugin-card.not-available .plugin-icon { + filter: opacity(0.2); } + .plugin-card .plugin-card-top { + padding: 0; } + .plugin-card .plugin-card-top:hover .import-note { + display: block; } + .plugin-card .plugin-card-top .import-note { + display: none; + color: rgba(0, 0, 0, 0.5); } + .plugin-card .plugin-card-top .name { + margin-top: 20px; } + .plugin-card .plugin-card-top .desc, .plugin-card .plugin-card-top .name { + margin-left: 185px; } + .plugin-card .plugin-card-top .action-links { + top: 0; } + .plugin-card .plugin-card-top .plugin-icon { + font-size: 5rem; + color: #656565; + left: 0; + top: 0; + height: 168px; + width: 168px; + margin: -20px 20px 0 0; } + .plugin-card .plugin-card-top .plugin-icon.dashicons { + margin-top: 1rem; } + .plugin-card .plugin-card-top .plugin-card-empty-space { + display: inline-block; + width: 1px; + height: 30px; + background: transparent; } + +/*# sourceMappingURL=_import-export.css.map */ diff --git a/assets/css/_import-export.css.map b/assets/css/_import-export.css.map new file mode 100644 index 0000000..7c3f7b5 --- /dev/null +++ b/assets/css/_import-export.css.map @@ -0,0 +1,7 @@ +{ +"version": 3, +"mappings": "AAAA,cAAe;EACb,QAAQ,EAAE,MAAM;EAChB,MAAM,EAAE,IAAI;;AAGd,YAAa;EACX,QAAQ,EAAE,QAAQ;EAElB,iBAAK;IACH,QAAQ,EAAE,QAAQ;IAClB,IAAI,EAAE,GAAG;IACT,GAAG,EAAE,GAAG;IACR,SAAS,EAAE,qBAAqB;IAChC,OAAO,EAAE,CAAC;IACV,KAAK,EAAE,kBAAkB;IACzB,MAAM,EAAE,CAAC;IACT,SAAS,EAAE,MAAM;IACjB,WAAW,EAAE,GAAG;IAChB,cAAc,EAAE,GAAG;IACnB,WAAW,EAAE,oBAAoB;IACjC,cAAc,EAAE,SAAS;IACzB,OAAO,EAAE,CAAC;IACV,UAAU,EAAE,WAAW;IACvB,MAAM,EAAE,OAAO;IACf,KAAK,EAAE,IAAI;IACX,UAAU,EAAE,MAAM;EAIlB,iCAAS;IACP,OAAO,EAAE,EAAE;IACX,UAAU,EAAE,iIAAiI;IAC7I,KAAK,EAAE,IAAI;IACX,MAAM,EAAE,IAAI;IACZ,QAAQ,EAAE,QAAQ;IAClB,IAAI,EAAE,CAAC;IACP,GAAG,EAAE,CAAC;IACN,OAAO,EAAE,CAAC;EAIV,qCAAK;IACH,OAAO,EAAE,CAAC;EAGZ,iDAAiB;IACf,cAAc,EAAE,SAAS;IACzB,MAAM,EAAE,SAAS;EAIrB,4BAAE;IACA,KAAK,EAAE,IAAI;EAGb,uCAAa;IACX,MAAM,EAAE,YAAY;EAIxB,6BAAiB;IACf,OAAO,EAAE,CAAC;IAEV,gDAAqB;MACnB,OAAO,EAAE,KAAK;IAGhB,0CAAa;MACX,OAAO,EAAE,IAAI;MACb,KAAK,EAAE,kBAAkB;IAG3B,mCAAM;MACJ,UAAU,EAAE,IAAI;IAGlB,wEAAa;MACX,WAAW,EAAE,KAAK;IAGpB,2CAAc;MACZ,GAAG,EAAE,CAAC;IAGR,0CAAa;MACX,SAAS,EAAE,IAAI;MACf,KAAK,EAAE,OAAO;MACd,IAAI,EAAE,CAAC;MACP,GAAG,EAAE,CAAC;MACN,MAAM,EAAE,KAAK;MACb,KAAK,EAAE,KAAK;MACZ,MAAM,EAAE,cAAc;MAEtB,oDAAY;QACV,UAAU,EAAE,IAAI;IAIpB,sDAAyB;MACvB,OAAO,EAAE,YAAY;MACrB,KAAK,EAAE,GAAG;MACV,MAAM,EAAE,IAAI;MACZ,UAAU,EAAE,WAAW", +"sources": ["_import-export.scss"], +"names": [], +"file": "_import-export.css" +} \ No newline at end of file diff --git a/assets/js/admin/import-export.js b/assets/js/admin/import-export.js new file mode 100644 index 0000000..ed92d2f --- /dev/null +++ b/assets/js/admin/import-export.js @@ -0,0 +1,16 @@ +jQuery(document).ready(function () { + var smImportForm = jQuery('#sm-import-upload-form'); + if (smImportForm.length) { + var fileField = smImportForm.find('#upload'); + var importTrigger = smImportForm.siblings('#sm-import-trigger'); + var submitButton = smImportForm.find('#submit'); + importTrigger.click(function() { + fileField.click(); + }); + fileField.change(function (){ + importTrigger.find('.import-sniper').css('display', 'inline-block'); + importTrigger.attr('disabled', true); + submitButton.click(); + }); + } +}); \ No newline at end of file From 30c67a4b0e50719dc76b0fc4e3bc454e412ea46c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nikola=20Miljkovi=C4=87?= Date: Fri, 2 Mar 2018 22:11:05 +0100 Subject: [PATCH 86/87] Styling fixes when compatibility mode is used --- assets/css/sermon.css | 3 ++ includes/sm-template-functions.php | 78 ++++++++++++++++-------------- sermons.php | 6 ++- 3 files changed, 50 insertions(+), 37 deletions(-) diff --git a/assets/css/sermon.css b/assets/css/sermon.css index 9af6213..986a878 100755 --- a/assets/css/sermon.css +++ b/assets/css/sermon.css @@ -371,6 +371,9 @@ h3.wpfc_grid_title a { background: white; border: 1px solid #ddd; } +.wpfc-sermon.noborder .wpfc-sermon-inner { + border: none; +} .wpfc-sermon-main { padding: 24px; diff --git a/includes/sm-template-functions.php b/includes/sm-template-functions.php index 632c9a8..23260ba 100755 --- a/includes/sm-template-functions.php +++ b/includes/sm-template-functions.php @@ -484,49 +484,55 @@ function wpfc_sermon_excerpt_v2( $return = false ) { ob_start(); ?> -
    > -
    - -
    - -
    -
    + +
    > + +
    + +
    + +
    +
    +
    + +
    + ID ) ) : ?> +
    + ID, 'wpfc_sermon_series' ) ?>
    -
    - ID ) ) : ?> -
    - ID, 'wpfc_sermon_series' ) ?> -
    - +

    -
    - -
    -
    - + +
    + +
    +
    +
    -
    +
    + +
    + Date: Fri, 2 Mar 2018 22:19:25 +0100 Subject: [PATCH 87/87] Update versions --- readme.txt | 4 ++-- sermons.php | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/readme.txt b/readme.txt index 954e148..ec46217 100755 --- a/readme.txt +++ b/readme.txt @@ -3,9 +3,9 @@ Contributors: wpforchurch, nikolam Donate link: http://wpforchurch.com/ Tags: church, sermon, sermons, preaching, podcasting, manage, managing, podcasts, itunes Requires at least: 4.5 -Tested up to: 4.9.3 +Tested up to: 4.9.4 Requires PHP: 5.3 -Stable tag: 2.11.3 +Stable tag: 2.12.0 License: GPLv2 License URI: https://www.gnu.org/licenses/gpl-2.0.html diff --git a/sermons.php b/sermons.php index e28d5e1..56d2540 100755 --- a/sermons.php +++ b/sermons.php @@ -3,11 +3,11 @@ * Plugin Name: Sermon Manager for WordPress * Plugin URI: https://www.wpforchurch.com/products/sermon-manager-for-wordpress/ * Description: Add audio and video sermons, manage speakers, series, and more. - * Version: 2.11.3 + * Version: 2.12.0 * Author: WP for Church * Author URI: https://www.wpforchurch.com/ * Requires at least: 4.5 - * Tested up to: 4.9.3 + * Tested up to: 4.9.4 * * Text Domain: sermon-manager-for-wordpress * Domain Path: /languages/ @@ -684,4 +684,4 @@ function php_notice_handler() { } // Initialize Sermon Manager -SermonManager::get_instance(); \ No newline at end of file +SermonManager::get_instance();