Several adjustments to add new options on single item page customizer.
This commit is contained in:
parent
f56691fd7b
commit
cd7bdde088
|
@ -10,11 +10,23 @@ const BLOCKSY_TAINACAN_VERSION = '0.0.1';
|
||||||
* Enqueue scripts and styles.
|
* Enqueue scripts and styles.
|
||||||
*/
|
*/
|
||||||
add_action( 'wp_enqueue_scripts', function () {
|
add_action( 'wp_enqueue_scripts', function () {
|
||||||
|
|
||||||
|
// First, we enqueue parent theme styles
|
||||||
wp_enqueue_style( 'blocksy-parent-style', get_template_directory_uri() . '/style.css' );
|
wp_enqueue_style( 'blocksy-parent-style', get_template_directory_uri() . '/style.css' );
|
||||||
|
|
||||||
|
// Then, this child theme styles
|
||||||
wp_enqueue_style( 'tainacan-blocksy-style',
|
wp_enqueue_style( 'tainacan-blocksy-style',
|
||||||
get_stylesheet_directory_uri() . '/style.min.css',
|
get_stylesheet_directory_uri() . '/style.min.css',
|
||||||
array( 'blocksy-parent-style' )
|
array( 'blocksy-parent-style' )
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Now, some dynamic css that is generated using blocksy dynamic css logic
|
||||||
|
add_action('blocksy:global-dynamic-css:enqueue', function ($args) {
|
||||||
|
blocksy_theme_get_dynamic_styles(array_merge([
|
||||||
|
'path' => get_stylesheet_directory() . '/global.php',
|
||||||
|
'chunk' => 'global'
|
||||||
|
], $args));
|
||||||
|
}, 10, 3);
|
||||||
});
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -192,8 +204,13 @@ function blocksy_tainacan_swiper_scripts() {
|
||||||
if ( in_array($post_type, $collections_post_types) ) {
|
if ( in_array($post_type, $collections_post_types) ) {
|
||||||
wp_enqueue_style( 'swiper', 'https://unpkg.com/swiper/swiper-bundle.min.css', array(), BLOCKSY_TAINACAN_VERSION );
|
wp_enqueue_style( 'swiper', 'https://unpkg.com/swiper/swiper-bundle.min.css', array(), BLOCKSY_TAINACAN_VERSION );
|
||||||
wp_enqueue_script( 'swiper', 'https://unpkg.com/swiper/swiper-bundle.min.js', array(), BLOCKSY_TAINACAN_VERSION, true );
|
wp_enqueue_script( 'swiper', 'https://unpkg.com/swiper/swiper-bundle.min.js', array(), BLOCKSY_TAINACAN_VERSION, true );
|
||||||
wp_enqueue_script( 'blocksy-tainacan-scripts', get_stylesheet_directory_uri() . '/js/attachments-carousel.js', ['swiper'], BLOCKSY_TAINACAN_VERSION, true );
|
wp_enqueue_script( 'blocksy-tainacan-scripts__swiper', get_stylesheet_directory_uri() . '/js/attachments-carousel.js', ['swiper'], BLOCKSY_TAINACAN_VERSION, true );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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_swiper_scripts' );
|
||||||
|
|
||||||
|
/* Requires helpers */
|
||||||
|
require get_stylesheet_directory() . '/helpers/blocksy-integration.php';
|
|
@ -0,0 +1,23 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
if (! isset($prefix)) {
|
||||||
|
$prefix = '';
|
||||||
|
} else {
|
||||||
|
$prefix = $prefix . '_';
|
||||||
|
}
|
||||||
|
|
||||||
|
blc_call_fnc(['fnc' => 'blocksy_output_responsive'], [
|
||||||
|
'css' => $css,
|
||||||
|
'tablet_css' => $tablet_css,
|
||||||
|
'mobile_css' => $mobile_css,
|
||||||
|
'selector' => ".single-item-collection--metadata",
|
||||||
|
'variableName' => 'column-width',
|
||||||
|
'value' => get_theme_mod($prefix . '_metadata_columns', [
|
||||||
|
'mobile' => '200px',
|
||||||
|
'tablet' => '300px',
|
||||||
|
'desktop' => '400px',
|
||||||
|
]),
|
||||||
|
'unit' => ''
|
||||||
|
]);
|
||||||
|
|
||||||
|
?>
|
|
@ -0,0 +1,30 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is a dummy copy of the blc_call_fn function used in the blocksy-companion plugin
|
||||||
|
* Check their /framework/helpers/blocksy-integration.php file for more details
|
||||||
|
* I renamed the usage from 'fn' to 'fnc' to avoid future conflicts
|
||||||
|
*/
|
||||||
|
if (! function_exists('blc_call_fnc')) {
|
||||||
|
function blc_call_fnc($args = [], ...$params) {
|
||||||
|
$args = wp_parse_args(
|
||||||
|
$args,
|
||||||
|
[
|
||||||
|
'fnc' => null,
|
||||||
|
|
||||||
|
// string | null | array
|
||||||
|
'default' => ''
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
if (! $args['fnc']) {
|
||||||
|
throw new Error('$fnc must be specified!');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (! function_exists($args['fnc'])) {
|
||||||
|
return $args['default'];
|
||||||
|
}
|
||||||
|
|
||||||
|
return call_user_func($args['fnc'], ...$params);
|
||||||
|
}
|
||||||
|
}
|
|
@ -9,6 +9,14 @@ if (! isset($is_bbpress)) {
|
||||||
}
|
}
|
||||||
|
|
||||||
$options = [
|
$options = [
|
||||||
|
blocksy_get_options(get_stylesheet_directory() . '/inc/options/single-elements/section-labels.php', [
|
||||||
|
'prefix' => $post_type->name . '_single',
|
||||||
|
'enabled' => 'yes'
|
||||||
|
], false),
|
||||||
|
blocksy_get_options(get_stylesheet_directory() . '/inc/options/single-elements/hide-download-button.php', [
|
||||||
|
'prefix' => $post_type->name . '_single',
|
||||||
|
'enabled' => 'no'
|
||||||
|
], false),
|
||||||
blocksy_get_options(get_stylesheet_directory() . '/inc/options/single-elements/show-title-metadata.php', [
|
blocksy_get_options(get_stylesheet_directory() . '/inc/options/single-elements/show-title-metadata.php', [
|
||||||
'prefix' => $post_type->name . '_single',
|
'prefix' => $post_type->name . '_single',
|
||||||
'enabled' => 'yes'
|
'enabled' => 'yes'
|
||||||
|
@ -17,8 +25,7 @@ $options = [
|
||||||
'prefix' => $post_type->name . '_single',
|
'prefix' => $post_type->name . '_single',
|
||||||
'enabled' => 'no'
|
'enabled' => 'no'
|
||||||
], false),
|
], false),
|
||||||
blocksy_get_options(get_stylesheet_directory() . '/inc/options/single-elements/section-labels.php', [
|
blocksy_get_options(get_stylesheet_directory() . '/inc/options/single-elements/metadata-columns.php', [
|
||||||
'prefix' => $post_type->name . '_single',
|
'prefix' => $post_type->name . '_single'
|
||||||
'enabled' => 'yes'
|
], false),
|
||||||
], false)
|
|
||||||
];
|
];
|
|
@ -0,0 +1,24 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
if (! isset($prefix)) {
|
||||||
|
$prefix = '';
|
||||||
|
} else {
|
||||||
|
$prefix = $prefix . '_';
|
||||||
|
}
|
||||||
|
|
||||||
|
if (! isset($enabled)) {
|
||||||
|
$enabled = 'no';
|
||||||
|
}
|
||||||
|
|
||||||
|
$options = [
|
||||||
|
$prefix . 'hide_download_button' => [
|
||||||
|
'label' => __( ' Document download button', 'blocksy-tainacan' ),
|
||||||
|
'type' => 'ct-switch',
|
||||||
|
'value' => $enabled,
|
||||||
|
'setting' => [ 'transport' => 'postMessage' ],
|
||||||
|
'desc' => __( 'Toggle to never display a "Download" button when hovering the document.', 'blocksy-tainacan' ),
|
||||||
|
'sync' => blocksy_sync_single_post_container([
|
||||||
|
'prefix' => $prefix
|
||||||
|
])
|
||||||
|
]
|
||||||
|
];
|
|
@ -0,0 +1,34 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
if (! isset($prefix)) {
|
||||||
|
$prefix = '';
|
||||||
|
} else {
|
||||||
|
$prefix = $prefix . '_';
|
||||||
|
}
|
||||||
|
|
||||||
|
$options = [
|
||||||
|
$prefix . 'metadata_columns' => [
|
||||||
|
'label' => __( 'Metadata columns width', 'blocksy' ),
|
||||||
|
'type' => 'ct-slider',
|
||||||
|
'value' => [
|
||||||
|
'mobile' => '200px',
|
||||||
|
'tablet' => '300px',
|
||||||
|
'desktop' => '400px',
|
||||||
|
],
|
||||||
|
'units' => blocksy_units_config([
|
||||||
|
[
|
||||||
|
'unit' => 'px',
|
||||||
|
'min' => 200,
|
||||||
|
'max' => 1200,
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'unit' => 'vw',
|
||||||
|
'min' => 20,
|
||||||
|
'max' => 100,
|
||||||
|
],
|
||||||
|
]),
|
||||||
|
'responsive' => true,
|
||||||
|
'divider' => 'top',
|
||||||
|
'sync' => 'live',
|
||||||
|
],
|
||||||
|
];
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
/* Tainacan Items list customization */
|
/* Tainacan Items list customization */
|
||||||
.theme-items-list {
|
.theme-items-list {
|
||||||
--tainacan-font-family: var(--fontFamily, inherit);
|
--tainacan-font-family: var(--fontFamily, inherit);
|
||||||
|
@ -65,6 +64,10 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&.tainacan-filter-list-fixed {
|
||||||
|
left: 14px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Items list container */
|
/* Items list container */
|
||||||
|
@ -257,7 +260,7 @@ body:not(.tainacan-admin-page) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.collection-thumbnail {
|
.collection-thumbnail {
|
||||||
max-width: var(--tainacan-filter-menu-width-theme, 20%);
|
max-width: calc(var(--tainacan-filter-menu-width-theme, 20%) - 24px);
|
||||||
float: left;
|
float: left;
|
||||||
margin-right: 24px;
|
margin-right: 24px;
|
||||||
|
|
||||||
|
|
|
@ -67,14 +67,15 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.single-item-collection--document {
|
.single-item-collection--document {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
position: relative;
|
||||||
&:hover {
|
&:hover {
|
||||||
.tainacan-item-file-download {
|
.tainacan-item-file-download {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
transform: scale(1);
|
transform: scale(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
|
|
||||||
> iframe, img.attachment-large {
|
> iframe, img.attachment-large {
|
||||||
display: block;
|
display: block;
|
||||||
|
@ -174,7 +175,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.s-item-collection--metadata {
|
.single-item-collection--metadata {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
|
||||||
div {
|
div {
|
||||||
|
@ -192,24 +193,18 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@media only screen and (min-width: 768px) {
|
@media only screen and (min-width: 768px) {
|
||||||
-moz-column-count: 2;
|
|
||||||
-moz-column-gap: 0;
|
-moz-column-gap: 0;
|
||||||
-moz-column-rule: none;
|
-moz-column-rule: none;
|
||||||
-webkit-column-count: 2;
|
|
||||||
-webkit-column-gap: 0;
|
-webkit-column-gap: 0;
|
||||||
-webkit-column-rule: none;
|
-webkit-column-rule: none;
|
||||||
column-count: 2;
|
|
||||||
column-gap: 4rem;;
|
column-gap: 4rem;;
|
||||||
column-rule: none;
|
column-rule: none;
|
||||||
}
|
}
|
||||||
@media only screen and (min-width: 1366px) {
|
@media only screen and (min-width: 1366px) {
|
||||||
-moz-column-count: 3;
|
|
||||||
-moz-column-gap: 7rem;
|
-moz-column-gap: 7rem;
|
||||||
-moz-column-rule: none;
|
-moz-column-rule: none;
|
||||||
-webkit-column-count: 3;
|
|
||||||
-webkit-column-gap: 7rem;
|
-webkit-column-gap: 7rem;
|
||||||
-webkit-column-rule: none;
|
-webkit-column-rule: none;
|
||||||
column-count: 3;
|
|
||||||
column-gap: 7rem;
|
column-gap: 7rem;
|
||||||
column-rule: none;
|
column-rule: none;
|
||||||
}
|
}
|
||||||
|
|
47
style.css
47
style.css
|
@ -86,6 +86,10 @@
|
||||||
margin-bottom: 24px;
|
margin-bottom: 24px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.theme-items-list #filters-modal.tainacan-filter-list-fixed {
|
||||||
|
left: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
.theme-items-list #items-list-area {
|
.theme-items-list #items-list-area {
|
||||||
grid-area: itemslist;
|
grid-area: itemslist;
|
||||||
justify-self: end;
|
justify-self: end;
|
||||||
|
@ -290,7 +294,7 @@ body:not(.tainacan-admin-page) .tainacan-modal-content .modal-card-body {
|
||||||
}
|
}
|
||||||
|
|
||||||
.tainacan-collection-header .tainacan-collection-header__box .collection-thumbnail {
|
.tainacan-collection-header .tainacan-collection-header__box .collection-thumbnail {
|
||||||
max-width: var(--tainacan-filter-menu-width-theme, 20%);
|
max-width: calc(var(--tainacan-filter-menu-width-theme, 20%) - 24px);
|
||||||
float: left;
|
float: left;
|
||||||
margin-right: 24px;
|
margin-right: 24px;
|
||||||
}
|
}
|
||||||
|
@ -380,6 +384,7 @@ body:not(.tainacan-admin-page) .tainacan-modal-content .modal-card-body {
|
||||||
.single-item-data-section .single-item-collection--document {
|
.single-item-data-section .single-item-collection--document {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
.single-item-data-section .single-item-collection--document:hover .tainacan-item-file-download {
|
.single-item-data-section .single-item-collection--document:hover .tainacan-item-file-download {
|
||||||
|
@ -504,11 +509,11 @@ body:not(.tainacan-admin-page) .tainacan-modal-content .modal-card-body {
|
||||||
object-fit: contain;
|
object-fit: contain;
|
||||||
}
|
}
|
||||||
|
|
||||||
.single-item-data-section .s-item-collection--metadata {
|
.single-item-data-section .single-item-collection--metadata {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.single-item-data-section .s-item-collection--metadata div {
|
.single-item-data-section .single-item-collection--metadata div {
|
||||||
-webkit-column-break-inside: avoid;
|
-webkit-column-break-inside: avoid;
|
||||||
page-break-inside: avoid;
|
page-break-inside: avoid;
|
||||||
break-inside: avoid;
|
break-inside: avoid;
|
||||||
|
@ -516,7 +521,7 @@ body:not(.tainacan-admin-page) .tainacan-modal-content .modal-card-body {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.single-item-data-section .s-item-collection--metadata div:last-child {
|
.single-item-data-section .single-item-collection--metadata div:last-child {
|
||||||
-webkit-column-break-inside: auto;
|
-webkit-column-break-inside: auto;
|
||||||
page-break-inside: auto;
|
page-break-inside: auto;
|
||||||
break-inside: auto;
|
break-inside: auto;
|
||||||
|
@ -525,69 +530,63 @@ body:not(.tainacan-admin-page) .tainacan-modal-content .modal-card-body {
|
||||||
}
|
}
|
||||||
|
|
||||||
@media only screen and (min-width: 768px) {
|
@media only screen and (min-width: 768px) {
|
||||||
.single-item-data-section .s-item-collection--metadata {
|
.single-item-data-section .single-item-collection--metadata {
|
||||||
-moz-column-count: 2;
|
|
||||||
-moz-column-gap: 0;
|
-moz-column-gap: 0;
|
||||||
-moz-column-rule: none;
|
-moz-column-rule: none;
|
||||||
-webkit-column-count: 2;
|
|
||||||
-webkit-column-gap: 0;
|
-webkit-column-gap: 0;
|
||||||
-webkit-column-rule: none;
|
-webkit-column-rule: none;
|
||||||
column-count: 2;
|
|
||||||
column-gap: 4rem;
|
column-gap: 4rem;
|
||||||
column-rule: none;
|
column-rule: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media only screen and (min-width: 1366px) {
|
@media only screen and (min-width: 1366px) {
|
||||||
.single-item-data-section .s-item-collection--metadata {
|
.single-item-data-section .single-item-collection--metadata {
|
||||||
-moz-column-count: 3;
|
|
||||||
-moz-column-gap: 7rem;
|
-moz-column-gap: 7rem;
|
||||||
-moz-column-rule: none;
|
-moz-column-rule: none;
|
||||||
-webkit-column-count: 3;
|
|
||||||
-webkit-column-gap: 7rem;
|
-webkit-column-gap: 7rem;
|
||||||
-webkit-column-rule: none;
|
-webkit-column-rule: none;
|
||||||
column-count: 3;
|
|
||||||
column-gap: 7rem;
|
column-gap: 7rem;
|
||||||
column-rule: none;
|
column-rule: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.single-item-data-section .s-item-collection--metadata h3 {
|
.single-item-data-section .single-item-collection--metadata h3 {
|
||||||
padding-right: 1rem;
|
padding-right: 1rem;
|
||||||
margin-bottom: 0.25rem;
|
margin-bottom: 0.25rem;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.single-item-data-section .s-item-collection--metadata h3:first-of-type:last-of-type {
|
.single-item-data-section .single-item-collection--metadata h3:first-of-type:last-of-type {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
}
|
}
|
||||||
|
|
||||||
.single-item-data-section .s-item-collection--metadata h4,
|
.single-item-data-section .single-item-collection--metadata h4,
|
||||||
.single-item-data-section .s-item-collection--metadata label {
|
.single-item-data-section .single-item-collection--metadata label {
|
||||||
padding-right: 0.875rem;
|
padding-right: 0.875rem;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.single-item-data-section .s-item-collection--metadata h4:first-of-type:last-of-type,
|
.single-item-data-section .single-item-collection--metadata h4:first-of-type:last-of-type,
|
||||||
.single-item-data-section .s-item-collection--metadata label:first-of-type:last-of-type {
|
.single-item-data-section .single-item-collection--metadata label:first-of-type:last-of-type {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
}
|
}
|
||||||
|
|
||||||
.single-item-data-section .s-item-collection--metadata p {
|
.single-item-data-section .single-item-collection--metadata p {
|
||||||
word-wrap: break-word;
|
word-wrap: break-word;
|
||||||
}
|
}
|
||||||
|
|
||||||
.single-item-data-section .s-item-collection--metadata .multivalue-separator {
|
.single-item-data-section .single-item-collection--metadata .multivalue-separator {
|
||||||
color: #cbcbcb;
|
color: #cbcbcb;
|
||||||
margin: 0 8px;
|
margin: 0 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.single-item-data-section .s-item-collection--metadata .hierarchy-separator {
|
.single-item-data-section .single-item-collection--metadata .hierarchy-separator {
|
||||||
color: #cbcbcb;
|
color: #cbcbcb;
|
||||||
}
|
}
|
||||||
|
|
||||||
.single-item-data-section .s-item-collection--metadata .metadata-type-compound .multivalue-separator,
|
.single-item-data-section .single-item-collection--metadata .metadata-type-compound .multivalue-separator,
|
||||||
.single-item-data-section .s-item-collection--metadata .metadata-type-textarea .multivalue-separator {
|
.single-item-data-section .single-item-collection--metadata .metadata-type-textarea .multivalue-separator {
|
||||||
display: block;
|
display: block;
|
||||||
max-height: 1px;
|
max-height: 1px;
|
||||||
width: 35px;
|
width: 35px;
|
||||||
|
@ -597,7 +596,7 @@ body:not(.tainacan-admin-page) .tainacan-modal-content .modal-card-body {
|
||||||
margin: 0.875rem auto;
|
margin: 0.875rem auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.single-item-data-section .s-item-collection--metadata .tainacan-compound-group {
|
.single-item-data-section .single-item-collection--metadata .tainacan-compound-group {
|
||||||
padding-left: 1.5rem;
|
padding-left: 1.5rem;
|
||||||
border-left: 1px solid #f2f2f2;
|
border-left: 1px solid #f2f2f2;
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -45,7 +45,6 @@ if (
|
||||||
the_post();
|
the_post();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Note to code reviewers: This line doesn't need to be escaped.
|
* Note to code reviewers: This line doesn't need to be escaped.
|
||||||
* Function blocksy_output_hero_section() used here escapes the value properly.
|
* Function blocksy_output_hero_section() used here escapes the value properly.
|
||||||
|
@ -58,6 +57,25 @@ if (
|
||||||
$container_class = 'ct-container-narrow';
|
$container_class = 'ct-container-narrow';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$content_area_class = 'content-area';
|
||||||
|
|
||||||
|
$post_content = get_the_content();
|
||||||
|
$content_style = blocksy_get_content_style();
|
||||||
|
|
||||||
|
if (
|
||||||
|
(
|
||||||
|
strpos($post_content, 'alignwide') !== false
|
||||||
|
||
|
||||||
|
strpos($post_content, 'alignfull') !== false
|
||||||
|
)
|
||||||
|
&&
|
||||||
|
blocksy_sidebar_position() === 'none'
|
||||||
|
&&
|
||||||
|
blocksy_get_content_style() !== 'boxed'
|
||||||
|
) {
|
||||||
|
$content_area_class .= ' content-area-wide';
|
||||||
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<div id="primary" class="content-area" <?php echo blocksy_get_v_spacing() ?>>
|
<div id="primary" class="content-area" <?php echo blocksy_get_v_spacing() ?>>
|
||||||
|
@ -67,6 +85,7 @@ if (
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
$post_options = blocksy_get_post_options();
|
$post_options = blocksy_get_post_options();
|
||||||
|
|
||||||
$prefix = blocksy_manager()->screen->get_prefix();
|
$prefix = blocksy_manager()->screen->get_prefix();
|
||||||
|
|
||||||
$has_share_box = get_theme_mod(
|
$has_share_box = get_theme_mod(
|
||||||
|
@ -159,9 +178,10 @@ if (
|
||||||
|
|
||||||
$share_box2_location = get_theme_mod($prefix . '_share_box2_location', 'right');
|
$share_box2_location = get_theme_mod($prefix . '_share_box2_location', 'right');
|
||||||
|
|
||||||
$content_class = 'entry-content';
|
|
||||||
$content_editor = blocksy_get_entry_content_editor();
|
$content_editor = blocksy_get_entry_content_editor();
|
||||||
|
|
||||||
|
$content_class = 'entry-content';
|
||||||
|
|
||||||
if (
|
if (
|
||||||
strpos($content_editor, 'classic') === false
|
strpos($content_editor, 'classic') === false
|
||||||
&&
|
&&
|
||||||
|
|
|
@ -38,7 +38,7 @@
|
||||||
<div class="single-item-collection--document">
|
<div class="single-item-collection--document">
|
||||||
<?php
|
<?php
|
||||||
tainacan_the_document();
|
tainacan_the_document();
|
||||||
if ( !get_theme_mod( 'tainacan_single_item_hide_download_document', false ) && function_exists('tainacan_the_item_document_download_link') && tainacan_the_item_document_download_link() != '' ) {
|
if ( get_theme_mod( $prefix . '_hide_download_button', 'no' ) == 'no' && function_exists('tainacan_the_item_document_download_link') && tainacan_the_item_document_download_link() != '' ) {
|
||||||
echo '<span class="tainacan-item-file-download">' . tainacan_the_item_document_download_link() . '</span>';
|
echo '<span class="tainacan-item-file-download">' . tainacan_the_item_document_download_link() . '</span>';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
@ -52,7 +52,7 @@
|
||||||
if ( function_exists('tainacan_get_single_attachment_as_html') ) {
|
if ( function_exists('tainacan_get_single_attachment_as_html') ) {
|
||||||
tainacan_get_single_attachment_as_html($attachment->ID);
|
tainacan_get_single_attachment_as_html($attachment->ID);
|
||||||
}
|
}
|
||||||
if ( !get_theme_mod( 'tainacan_single_item_hide_download_document', false ) && function_exists('tainacan_the_item_attachment_download_link') && tainacan_the_item_attachment_download_link($attachment->ID) != '' ) {
|
if ( get_theme_mod( $prefix . '_hide_download_button', 'no' ) == 'no' && function_exists('tainacan_the_item_attachment_download_link') && tainacan_the_item_attachment_download_link($attachment->ID) != '' ) {
|
||||||
echo '<span class="tainacan-item-file-download">' . tainacan_the_item_attachment_download_link($attachment->ID) . '</span>';
|
echo '<span class="tainacan-item-file-download">' . tainacan_the_item_attachment_download_link($attachment->ID) . '</span>';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -12,12 +12,11 @@
|
||||||
<div class="single-item-collection--document">
|
<div class="single-item-collection--document">
|
||||||
<?php
|
<?php
|
||||||
tainacan_the_document();
|
tainacan_the_document();
|
||||||
if ( !get_theme_mod( 'tainacan_single_item_hide_download_document', false ) && function_exists('tainacan_the_item_document_download_link') && tainacan_the_item_document_download_link() != '' ) {
|
if ( get_theme_mod( $prefix . '_hide_download_button', 'no' ) == 'no' && function_exists('tainacan_the_item_document_download_link') && tainacan_the_item_document_download_link() != '' ) {
|
||||||
echo '<span class="tainacan-item-file-download">' . tainacan_the_item_document_download_link() . '</span>';
|
echo '<span class="tainacan-item-file-download">' . tainacan_the_item_document_download_link() . '</span>';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
|
@ -10,14 +10,12 @@
|
||||||
<section class="tainacan-content single-item-collection margin-two-column">
|
<section class="tainacan-content single-item-collection margin-two-column">
|
||||||
<div class="single-item-collection--information justify-content-center">
|
<div class="single-item-collection--information justify-content-center">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col s-item-collection--metadata">
|
<div class="col single-item-collection--metadata" style="column-width: <?php echo get_theme_mod( $prefix . '_metadata_columns', ['mobile' => '200px', 'tablet' => '300px', 'desktop' => '400px' ] )['desktop'] ?>">
|
||||||
<?php if (has_post_thumbnail() && (get_theme_mod($prefix . '_show_thumbnail', 'no') === 'yes') ): ?>
|
<?php if (has_post_thumbnail() && (get_theme_mod($prefix . '_show_thumbnail', 'no') === 'yes') ): ?>
|
||||||
<div class="tainacan-item-thumbnail-container card">
|
<div class="tainacan-item-thumbnail-container">
|
||||||
<div class="card-body">
|
|
||||||
<h3><?php _e( 'Thumbnail', 'blocksy-tainacan' ); ?></h3>
|
<h3><?php _e( 'Thumbnail', 'blocksy-tainacan' ); ?></h3>
|
||||||
<?php the_post_thumbnail('tainacan-medium-full', array('class' => 'item-card--thumbnail')); ?>
|
<?php the_post_thumbnail('tainacan-medium-full', array('class' => 'item-card--thumbnail')); ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<?php do_action( 'blocksy-tainacan-single-item-metadata-begin' ); ?>
|
<?php do_action( 'blocksy-tainacan-single-item-metadata-begin' ); ?>
|
||||||
<?php
|
<?php
|
||||||
|
|
Loading…
Reference in New Issue