From 0d0aac813b409aab64f2d479cafd16e9c82eb538 Mon Sep 17 00:00:00 2001 From: mateuswetah Date: Wed, 17 Feb 2021 22:52:55 -0300 Subject: [PATCH] Organizes some files. --- functions.php | 8 ++++---- js/attachments-carousel.js | 28 +--------------------------- js/scripts.js | 1 + tainacan/item-single-page.php | 13 +++++++------ 4 files changed, 13 insertions(+), 37 deletions(-) diff --git a/functions.php b/functions.php index 5bec582..8e13ec7 100644 --- a/functions.php +++ b/functions.php @@ -435,7 +435,7 @@ function blocksy_tainacan_custom_post_types_single_options( $options, $post_type $post_type_object->labels->name ); - // Extra options to the archive items list + // Extra options to the single item template $item_extra_options = blocksy_get_options(get_stylesheet_directory() . '/inc/options/posts/tainacan-item-single.php', [ 'post_type' => $post_type_object, 'is_general_cpt' => true @@ -528,9 +528,9 @@ function filter_the_content_in_the_main_loop( $content ) { add_filter( 'the_content', 'filter_the_content_in_the_main_loop'); /** - * Enqueues js scripts related to swiper, only if in TainacanSingleItem pages + * Enqueues js general scripts and those related to swiper, only if in TainacanSingleItem pages */ -function blocksy_tainacan_swiper_scripts() { +function blocksy_tainacan_enqueue_scripts() { // This should only happen if we have Tainacan plugin installed if ( defined ('TAINACAN_VERSION') ) { @@ -550,7 +550,7 @@ function blocksy_tainacan_swiper_scripts() { wp_enqueue_script( 'blocksy-tainacan-scripts', get_stylesheet_directory_uri() . '/js/scripts.js', [], BLOCKSY_TAINACAN_VERSION, true ); } } -add_action( 'wp_enqueue_scripts', 'blocksy_tainacan_swiper_scripts' ); +add_action( 'wp_enqueue_scripts', 'blocksy_tainacan_enqueue_scripts' ); /* Requires helpers */ require get_stylesheet_directory() . '/helpers/blocksy-integration.php'; diff --git a/js/attachments-carousel.js b/js/attachments-carousel.js index 16dc4a3..8ad5983 100644 --- a/js/attachments-carousel.js +++ b/js/attachments-carousel.js @@ -1,33 +1,7 @@ +// 1 of 4 : SWIPER JS ####################################### const attachmentsThumbsSwiper = new Swiper('.swiper-container-thumbs', { spaceBetween: 16, slidesPerView: 'auto', - // Responsive breakpoints - // breakpoints: { - // // when window width is >= 320px - // 320: { - // slidesPerView: 1 - // }, - // // when window width is >= 480px - // 480: { - // slidesPerView: 2 - // }, - // // when window width is >= 640px - // 768: { - // slidesPerView: 3 - // }, - // // when window width is >= 640px - // 960: { - // slidesPerView: 4 - // }, - // // when window width is >= 640px - // 1024: { - // slidesPerView: 5 - // }, - // // when window width is >= 640px - // 1280: { - // slidesPerView: 6 - // } - // }, navigation: { nextEl: '.swiper-button-next', prevEl: '.swiper-button-prev', diff --git a/js/scripts.js b/js/scripts.js index e69de29..88e3386 100644 --- a/js/scripts.js +++ b/js/scripts.js @@ -0,0 +1 @@ +/* Nothing here so far! */ \ No newline at end of file diff --git a/tainacan/item-single-page.php b/tainacan/item-single-page.php index 820ee99..832a43c 100644 --- a/tainacan/item-single-page.php +++ b/tainacan/item-single-page.php @@ -1,6 +1,6 @@ -echo '
'; - +
+ +
-echo '
'; - -do_action( 'blocksy-tainacan-single-item-bottom' ); ?> +