Changeset 2120393
- Timestamp:
- 07/10/2019 01:17:04 AM (7 years ago)
- Location:
- sermon-manager-for-wordpress/trunk
- Files:
-
- 3 edited
-
includes/class-sm-shortcodes.php (modified) (1 diff)
-
includes/sm-template-functions.php (modified) (15 diffs)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
sermon-manager-for-wordpress/trunk/includes/class-sm-shortcodes.php
r2028753 r2120393 631 631 switch ( $default_orderby ) { 632 632 case 'date_preached': 633 case 'date': 633 634 $query_args += array( 634 635 'orderby' => 'meta_value_num', -
sermon-manager-for-wordpress/trunk/includes/sm-template-functions.php
r2118409 r2120393 13 13 * Include template files. 14 14 */ 15 if ( ! \SermonManager::getOption( 'theme_compatibility' ) ) { 16 add_filter( 'template_include', function ( $template ) { 17 return sm_get_views_path( $template ); 18 } ); 15 if ( ! SermonManager::getOption( 'theme_compatibility' ) ) { 16 add_filter( 17 'template_include', 18 function ( $template ) { 19 return sm_get_views_path( $template ); 20 } 21 ); 19 22 } 20 23 … … 39 42 40 43 add_filter( 'the_content', 'add_wpfc_sermon_content' ); 41 if ( ! \SermonManager::getOption( 'disable_the_excerpt' ) ) {44 if ( ! SermonManager::getOption( 'disable_the_excerpt' ) ) { 42 45 add_filter( 'the_excerpt', 'add_wpfc_sermon_content' ); 43 46 } … … 49 52 * @param array $args Display options. See the 'sermon_sort_fields' shortcode for array items. 50 53 * 54 * @return string The HTML. 55 * 51 56 * @see WPFC_Shortcodes->displaySermonSorting() 52 *53 * @return string The HTML.54 57 * 55 58 * @since 2.5.0 added $args … … 61 64 62 65 // Filters HTML fields data. 63 $filters = apply_filters( 'render_wpfc_sorting_filters', array( 66 $filters = apply_filters( 67 'render_wpfc_sorting_filters', 64 68 array( 65 'className' => 'sortPreacher', 66 'taxonomy' => 'wpfc_preacher', 67 'title' => sm_get_taxonomy_field( 'wpfc_preacher', 'singular_name' ), 68 ), 69 array( 70 'className' => 'sortPreacher', 71 'taxonomy' => 'wpfc_preacher', 72 'title' => sm_get_taxonomy_field( 'wpfc_preacher', 'singular_name' ), 73 ), 74 array( 75 'className' => 'sortSeries', 76 'taxonomy' => 'wpfc_sermon_series', 77 'title' => __( 'Series', 'sermon-manager-for-wordpress' ), 78 ), 79 array( 80 'className' => 'sortTopics', 81 'taxonomy' => 'wpfc_sermon_topics', 82 'title' => __( 'Topic', 'sermon-manager-for-wordpress' ), 83 ), 84 array( 85 'className' => 'sortBooks', 86 'taxonomy' => 'wpfc_bible_book', 87 'title' => __( 'Book', 'sermon-manager-for-wordpress' ), 88 ), 89 array( 90 'className' => 'sortServiceTypes', 91 'taxonomy' => 'wpfc_service_type', 92 'title' => sm_get_taxonomy_field( 'wpfc_service_type', 'singular_name' ), 93 ), 94 ) 95 ); 96 97 $visibility_mapping = apply_filters( 98 'render_wpfc_sorting_visibility_mapping', 69 99 array( 70 'className' => 'sortSeries', 71 'taxonomy' => 'wpfc_sermon_series', 72 'title' => __( 'Series', 'sermon-manager-for-wordpress' ), 73 ), 74 array( 75 'className' => 'sortTopics', 76 'taxonomy' => 'wpfc_sermon_topics', 77 'title' => __( 'Topic', 'sermon-manager-for-wordpress' ), 78 ), 79 array( 80 'className' => 'sortBooks', 81 'taxonomy' => 'wpfc_bible_book', 82 'title' => __( 'Book', 'sermon-manager-for-wordpress' ), 83 ), 84 array( 85 'className' => 'sortServiceTypes', 86 'taxonomy' => 'wpfc_service_type', 87 'title' => sm_get_taxonomy_field( 'wpfc_service_type', 'singular_name' ), 88 ), 89 ) ); 90 91 $visibility_mapping = apply_filters( 'render_wpfc_sorting_visibility_mapping', array( 92 'wpfc_sermon_topics' => 'hide_topics', 93 'wpfc_sermon_series' => 'hide_series', 94 'wpfc_preacher' => 'hide_preachers', 95 'wpfc_bible_book' => 'hide_books', 96 'wpfc_service_type' => 'hide_service_types', 97 'wpfc_dates' => 'hide_dates', 98 ) ); 100 'wpfc_sermon_topics' => 'hide_topics', 101 'wpfc_sermon_series' => 'hide_series', 102 'wpfc_preacher' => 'hide_preachers', 103 'wpfc_bible_book' => 'hide_books', 104 'wpfc_service_type' => 'hide_service_types', 105 'wpfc_dates' => 'hide_dates', 106 ) 107 ); 99 108 100 109 // Save orig args for filters. … … 139 148 * Allows to filter filtering args. 140 149 * 141 * @since 2.13.5142 * @since 2.15.0 - add other args, except $args.143 *144 150 * @param array $args The args. 145 151 * @param array $orig_args The unmodified args. … … 147 153 * @param array $filters Filters HTML form data. i.e. no idea. 148 154 * @param array $visibility_mapping Taxonomy slug -> args parameter name 155 * 156 * @since 2.15.0 - add other args, except $args. 157 * 158 * @since 2.13.5 149 159 */ 150 160 $args = apply_filters( 'sm_render_wpfc_sorting_args', $args, $orig_args, $action, $filters, $visibility_mapping ); … … 154 164 /** 155 165 * Allows to skip rendering of filtering completely. 156 *157 * @since 2.13.5158 * @since 2.15.0 - add other parameters, except $hide_filters.159 166 * 160 167 * @param bool $hide_filters True to show, false to hide. Default as it is defined in settings. … … 164 171 * @param array $filters Filters HTML form data. i.e. no idea. 165 172 * @param array $visibility_mapping Taxonomy slug -> args parameter name 173 * 174 * @since 2.13.5 175 * @since 2.15.0 - add other parameters, except $hide_filters. 166 176 */ 167 177 if ( apply_filters( 'sm_render_wpfc_sorting', $hide_filters, $args, $orig_args, $action, $filters, $visibility_mapping ) ) { 168 $content = wpfc_get_partial( 'content-sermon-filtering', array( 169 'action' => $action, 170 'filters' => $filters, 171 'visibility_mapping' => $visibility_mapping, 172 'args' => $args, 173 ) ); 178 $content = wpfc_get_partial( 179 'content-sermon-filtering', 180 array( 181 'action' => $action, 182 'filters' => $filters, 183 'visibility_mapping' => $visibility_mapping, 184 'args' => $args, 185 ) 186 ); 174 187 } else { 175 188 $content = ''; … … 271 284 * false to disable auto detection. 272 285 * 286 * @return string Video player HTML. 287 * @since 2.12.3 added $seek 288 * 273 289 * @since 2.11.0 274 * @since 2.12.3 added $seek275 *276 * @return string Video player HTML.277 290 */ 278 291 function wpfc_render_video( $url = '', $seek = true ) { … … 289 302 } 290 303 291 $player = strtolower( \SermonManager::getOption( 'player' ) ?: 'plyr' );304 $player = strtolower( SermonManager::getOption( 'player' ) ?: 'plyr' ); 292 305 293 306 if ( strtolower( 'WordPress' ) === $player ) { … … 344 357 * @param int $seek Seek to specific second in audio file. 345 358 * 359 * @return string|false Audio player HTML or false if sermon has no audio. 360 * @since 2.15.15 The sermon can be used as first parameter 361 * 346 362 * @since 2.12.3 added $seek 347 * @since 2.15.15 The sermon can be used as first parameter348 *349 * @return string|false Audio player HTML or false if sermon has no audio.350 363 */ 351 364 function wpfc_render_audio( $source = '', $seek = null ) { … … 381 394 382 395 // Get the current player. 383 $player = strtolower( \SermonManager::getOption( 'player' ) ?: 'plyr' );396 $player = strtolower( SermonManager::getOption( 'player' ) ?: 'plyr' ); 384 397 385 398 switch ( strtolower( $player ) ) { … … 534 547 $html = ''; 535 548 536 $terms = get_terms( array( 537 'taxonomy' => $taxonomy, 538 'hide_empty' => false, // todo: add option to disable/enable this globally. 539 ) ); 540 541 if ( 'wpfc_bible_book' === $taxonomy && \SermonManager::getOption( 'sort_bible_books', true ) ) { 549 $terms = get_terms( 550 array( 551 'taxonomy' => $taxonomy, 552 'hide_empty' => false, // todo: add option to disable/enable this globally. 553 ) 554 ); 555 556 if ( 'wpfc_bible_book' === $taxonomy && SermonManager::getOption( 'sort_bible_books', true ) ) { 542 557 // Book order. 543 558 $books = array( … … 720 735 * Returns SM template path. 721 736 * 722 * @param string $template 737 * @param string $template The template. 723 738 * 724 739 * @return string The template path. … … 734 749 $term = get_queried_object(); 735 750 736 if ( is_tax( array( 737 'wpfc_preacher', 738 'wpfc_sermon_series', 739 'wpfc_sermon_topics', 740 'wpfc_bible_book', 741 'wpfc_service_type', 742 ) ) ) { 751 if ( is_tax( 752 array( 753 'wpfc_preacher', 754 'wpfc_sermon_series', 755 'wpfc_sermon_topics', 756 'wpfc_bible_book', 757 'wpfc_service_type', 758 ) 759 ) ) { 743 760 $default_file = 'taxonomy-' . $term->taxonomy . '.php'; 744 761 -
sermon-manager-for-wordpress/trunk/readme.txt
r2118409 r2120393 129 129 * Fix: Vimeo videos not seeking to the predefined timestamp 130 130 * Fix: Preacher label not being replaced everywhere 131 * Fix: Not getting the real latest series image via "latest_series" shortcode 131 132 * Dev: Add a filter to disable sidebar on supported themes 132 133
Note: See TracChangeset
for help on using the changeset viewer.