diff --git a/tainacan-blocksy/inc/enqueues.php b/tainacan-blocksy/inc/enqueues.php index fd9fe36..3807692 100644 --- a/tainacan-blocksy/inc/enqueues.php +++ b/tainacan-blocksy/inc/enqueues.php @@ -107,7 +107,7 @@ if ( !function_exists('tainacan_blocksy_gallery_light_color_scheme') ) { $prefix = blocksy_manager()->screen->get_prefix(); $has_light_dark_color_scheme = get_theme_mod( $prefix . '_gallery_color_scheme', 'dark' ) == 'light'; - + if (!$has_light_dark_color_scheme) return; diff --git a/tainacan-blocksy/inc/options/single-elements/gallery-color-scheme.php b/tainacan-blocksy/inc/options/single-elements/gallery-color-scheme.php index 6292b63..440e799 100644 --- a/tainacan-blocksy/inc/options/single-elements/gallery-color-scheme.php +++ b/tainacan-blocksy/inc/options/single-elements/gallery-color-scheme.php @@ -5,7 +5,7 @@ if (! isset($prefix)) { } $options = [ - $prefix . 'galery_color_scheme' => [ + $prefix . 'gallery_color_scheme' => [ 'label' => __('Media gallery color scheme', 'tainacan-blocksy'), 'type' => 'ct-radio', 'value' => 'dark', diff --git a/tainacan-blocksy/template-parts/tainacan-item-single-attachments.php b/tainacan-blocksy/template-parts/tainacan-item-single-attachments.php index 30cef2a..0a1fdaa 100644 --- a/tainacan-blocksy/template-parts/tainacan-item-single-attachments.php +++ b/tainacan-blocksy/template-parts/tainacan-item-single-attachments.php @@ -9,8 +9,8 @@ $hide_file_caption_main = get_theme_mod( $prefix . '_hide_files_caption_main', 'yes') == 'yes'; $hide_file_description_main = get_theme_mod( $prefix . '_hide_files_description_main', 'yes') == 'yes'; $hide_download_button = get_theme_mod( $prefix . '_hide_download_button', 'no' ) == 'yes'; - $disable_gallery_lightbox = get_theme_mod( $prefix . '_disable_gallery_lightbox', 'no'); - + $disable_gallery_lightbox = get_theme_mod( $prefix . '_disable_gallery_lightbox', 'no') == 'yes'; + global $post; if ( function_exists('tainacan_the_media_component') && ( !empty( $attachments ) || ( $is_gallery_mode && tainacan_has_document() ) ) ) { diff --git a/tainacan-blocksy/template-parts/tainacan-item-single-document.php b/tainacan-blocksy/template-parts/tainacan-item-single-document.php index 5b5fe8b..449790d 100644 --- a/tainacan-blocksy/template-parts/tainacan-item-single-document.php +++ b/tainacan-blocksy/template-parts/tainacan-item-single-document.php @@ -7,7 +7,7 @@ $hide_file_caption_main = get_theme_mod( $prefix . '_hide_files_caption_main', 'yes') == 'yes'; $hide_file_description_main = get_theme_mod( $prefix . '_hide_files_description_main', 'yes') == 'yes'; $hide_download_button = get_theme_mod( $prefix . '_hide_download_button', 'no' ) == 'yes'; - $disable_gallery_lightbox = get_theme_mod( $prefix . '_disable_gallery_lightbox', 'no'); + $disable_gallery_lightbox = get_theme_mod( $prefix . '_disable_gallery_lightbox', 'no') == 'yes'; global $post;