diff --git a/src/functions/customizer.php b/src/functions/customizer.php index 9db0606..bf36e65 100644 --- a/src/functions/customizer.php +++ b/src/functions/customizer.php @@ -2314,6 +2314,7 @@ function tainacan_get_color_scheme_css( $colors ) { } .tainacan-title-page ul li, .tainacan-title-page ul li a, + .tainacan-title-page ul li h1, #menubelowHeader .menu-item a::after, .menu-shadow button[data-toggle='dropdown']::after{ color: {$colors['tainacan_link_color']} !important; diff --git a/src/template-parts/single-items-document.php b/src/template-parts/single-items-document.php index 051741e..8e24b33 100644 --- a/src/template-parts/single-items-document.php +++ b/src/template-parts/single-items-document.php @@ -14,6 +14,8 @@ if (version_compare(TAINACAN_VERSION, '0.18RC') >= 0) { $class_slide_metadata .= ' hide-description'; if ($hide_file_caption) $class_slide_metadata .= ' hide-caption'; + + global $post; } if ( tainacan_has_document() && !get_theme_mod( 'tainacan_single_item_gallery_mode', false )) : ?> @@ -25,7 +27,8 @@ if ( tainacan_has_document() && !get_theme_mod( 'tainacan_single_item_gallery_mo
- + + } else { + $media_items_main = array(); + + $class_slide_metadata = ''; + if ($hide_file_name) + $class_slide_metadata .= ' hide-name'; + if ($hide_file_description) + $class_slide_metadata .= ' hide-description'; + if ($hide_file_caption) + $class_slide_metadata .= ' hide-caption'; + + if ( tainacan_has_document() ) { + $is_document_type_attachment = tainacan_get_the_document_type() === 'attachment'; + $media_items_main[] = + tainacan_get_the_media_component_slide(array( + 'after_slide_metadata' => (( !get_theme_mod( 'tainacan_single_item_hide_download_document', false ) && tainacan_the_item_document_download_link() != '' ) ? + ('' . tainacan_the_item_document_download_link() . '') + : ''), + 'media_content' => tainacan_get_the_document(), + 'media_content_full' => $is_document_type_attachment ? tainacan_get_the_document(0, 'full') : ('
' . tainacan_get_the_document(0, 'full') . '
'), + 'media_title' => $is_document_type_attachment ? get_the_title(tainacan_get_the_document_raw()) : '', + 'media_description' => $is_document_type_attachment ? get_the_content(tainacan_get_the_document_raw()) : '', + 'media_caption' => $is_document_type_attachment ? wp_get_attachment_caption(tainacan_get_the_document_raw()) : '', + 'media_type' => tainacan_get_the_document_type(), + 'class_slide_metadata' => $class_slide_metadata + )); + } + + tainacan_the_media_component( + 'tainacan-item-document_id-' . $post->ID, + null, + $media_items_main, + array( + 'class_main_div' => '', + 'class_thumbs_div' => '', + 'swiper_thumbs_options' => '', + 'swiper_main_options' => array( + 'navigation' => array( + 'nextEl' => '.swiper-navigation-next_' . 'tainacan-item-document_id-' . $post->ID . '-main', + 'prevEl' => '.swiper-navigation-prev_' . 'tainacan-item-document_id-' . $post->ID . '-main', + ) + ) + ) + ); + + }?>