Organizes some files.
This commit is contained in:
parent
f00990ba69
commit
0d0aac813b
|
@ -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';
|
||||
|
|
|
@ -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',
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
/* Nothing here so far! */
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
* The template for displaying all single items
|
||||
* The template for displaying all single Tainacan items
|
||||
*
|
||||
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/#single-post
|
||||
*
|
||||
|
@ -29,9 +29,10 @@ if ($page_structure_type == 'type-gm' || $page_structure_type == 'type-mg') {
|
|||
$template_columns_style = 'grid-template-columns: ' . $column_metadata_width . '% calc(' . $column_documents_attachments_width . '% - 32px)';
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
echo '<div class="tainacan-item-single tainacan-item-single--layout-'. $page_structure_type . '" style="' . $template_columns_style .'">';
|
||||
|
||||
<div class="tainacan-item-single tainacan-item-single--layout-'. $page_structure_type . '" style="' . $template_columns_style .'">
|
||||
<?php
|
||||
get_template_part( 'template-parts/tainacan-item-single-document' );
|
||||
do_action( 'blocksy-tainacan-single-item-after-document' );
|
||||
|
||||
|
@ -40,7 +41,7 @@ echo '<div class="tainacan-item-single tainacan-item-single--layout-'. $page_str
|
|||
|
||||
get_template_part( 'template-parts/tainacan-item-single-metadata' );
|
||||
do_action( 'blocksy-tainacan-single-item-after-metadata' );
|
||||
?>
|
||||
</div>
|
||||
|
||||
echo '</div>';
|
||||
|
||||
do_action( 'blocksy-tainacan-single-item-bottom' ); ?>
|
||||
<?php do_action( 'blocksy-tainacan-single-item-bottom' ); ?>
|
||||
|
|
Loading…
Reference in New Issue