Version 0.3.4.

This commit is contained in:
mateuswetah 2024-09-16 15:22:27 -03:00
parent 2c92c089e6
commit e3914b7f15
6 changed files with 67 additions and 25 deletions

View File

@ -3,9 +3,9 @@ Author: tainacan
Contributors: wetah, vnmedeiros, leogermani, tainacan Contributors: wetah, vnmedeiros, leogermani, tainacan
Tags: museums, archives, collections, tainacan, blocksy Tags: museums, archives, collections, tainacan, blocksy
Requires at least: 5.9 Requires at least: 5.9
Tested up to: 6.5 Tested up to: 6.6
Requires PHP: 7.0 Requires PHP: 7.0
Stable tag: 0.3.3 Stable tag: 0.3.4
Requires Plugins: tainacan Requires Plugins: tainacan
License: GPLv2 or later License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-3.0.html License URI: http://www.gnu.org/licenses/gpl-3.0.html
@ -59,6 +59,9 @@ License details: https://github.com/tainacan/blocksy-tainacan/blob/master/LICENS
== Changelog == == Changelog ==
= 0.3.4 =
* Adds support for variable items width in related items carousel
= 0.3.3 = = 0.3.3 =
* Adds support for horizontal filters options * Adds support for horizontal filters options
* Basic styles for mosaic view mode * Basic styles for mosaic view mode

View File

@ -4,7 +4,7 @@ Plugin Name: Tainacan Support for Blocksy
Plugin URI: https://tainacan.org/ Plugin URI: https://tainacan.org/
Description: Tainacan plugin support for Blocksy theme Description: Tainacan plugin support for Blocksy theme
Author: tainacan Author: tainacan
Version: 0.3.3 Version: 0.3.4
Text Domain: tainacan-blocksy Text Domain: tainacan-blocksy
License: GPLv2 or later License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-3.0.html License URI: http://www.gnu.org/licenses/gpl-3.0.html
@ -15,7 +15,7 @@ if (! defined('WP_DEBUG') ) {
} }
/** Theme/plugin version */ /** Theme/plugin version */
const TAINACAN_BLOCKSY_VERSION = '0.3.3'; const TAINACAN_BLOCKSY_VERSION = '0.3.4';
const TAINACAN_BLOCKSY_IS_CHILD_THEME = false; const TAINACAN_BLOCKSY_IS_CHILD_THEME = false;
/* Tools to define our next constants */ /* Tools to define our next constants */

View File

@ -46,23 +46,6 @@ $inner_options = [
'choices' => $layout_choices, 'choices' => $layout_choices,
'sync' => '', 'sync' => '',
], ],
blocksy_rand_md5() => [
'type' => 'ct-condition',
'condition' => [
$prefix . 'items_related_to_this_layout' => 'carousel'
],
'options' => [
$prefix . 'items_related_to_this_max_items_per_screen' => [
'label' => __( 'Max amount of items per slide', 'tainacan-blocksy' ),
'type' => 'ct-number',
'design' => 'inline',
'value' => 6,
'min' => 1,
'max' => 10,
'sync' => ''
]
]
],
blocksy_rand_md5() => [ blocksy_rand_md5() => [
'type' => 'ct-condition', 'type' => 'ct-condition',
'condition' => [ 'condition' => [
@ -157,6 +140,60 @@ if ( null !== TAINACAN_VERSION && version_compare( TAINACAN_VERSION, '0.21.5' )
]; ];
} }
if ( null !== TAINACAN_VERSION && version_compare( TAINACAN_VERSION, '0.21.8' ) >= 0 ) {
$inner_options[blocksy_rand_md5()] = [
'type' => 'ct-condition',
'condition' => [
$prefix . 'items_related_to_this_layout' => 'carousel',
$prefix . 'items_related_to_this_variable_items_width' => 'no',
],
'options' => [
$prefix . 'items_related_to_this_max_items_per_screen' => [
'label' => __( 'Max amount of items per slide', 'tainacan-blocksy' ),
'type' => 'ct-number',
'design' => 'inline',
'value' => 6,
'min' => 1,
'max' => 10,
'sync' => ''
]
]
];
$inner_options[blocksy_rand_md5()] = [
'type' => 'ct-condition',
'condition' => [
$prefix . 'items_related_to_this_layout' => 'carousel'
],
'options' => [
$prefix . 'items_related_to_this_variable_items_width' => [
'label' => __( 'Variable items width', 'tainacan-blocksy' ),
'type' => 'ct-switch',
'value' => 'no',
'desc' => __( 'Toggle to define each slide size based on its content natural width.', 'tainacan-blocksy' ),
'sync' => ''
]
]
];
} else {
$inner_options[blocksy_rand_md5()] = [
'type' => 'ct-condition',
'condition' => [
$prefix . 'items_related_to_this_layout' => 'carousel',
],
'options' => [
$prefix . 'items_related_to_this_max_items_per_screen' => [
'label' => __( 'Max amount of items per slide', 'tainacan-blocksy' ),
'type' => 'ct-number',
'design' => 'inline',
'value' => 6,
'min' => 1,
'max' => 10,
'sync' => ''
]
]
];
}
$options = [ $options = [
$prefix . 'display_items_related_to_this' => [ $prefix . 'display_items_related_to_this' => [
'label' => __( 'Display "Items related to this"', 'tainacan-blocksy' ), 'label' => __( 'Display "Items related to this"', 'tainacan-blocksy' ),

View File

@ -1,12 +1,12 @@
{ {
"name": "tainacan-blocksy", "name": "tainacan-blocksy",
"version": "0.3.3", "version": "0.3.4",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "tainacan-blocksy", "name": "tainacan-blocksy",
"version": "0.3.3", "version": "0.3.4",
"license": "ISC", "license": "ISC",
"devDependencies": { "devDependencies": {
"clean-css-cli": "^4.3.0", "clean-css-cli": "^4.3.0",

View File

@ -1,6 +1,6 @@
{ {
"name": "tainacan-blocksy", "name": "tainacan-blocksy",
"version": "0.3.3", "version": "0.3.4",
"description": "A Blocksy plugin/child theme compatible with Tainacan", "description": "A Blocksy plugin/child theme compatible with Tainacan",
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {

View File

@ -5,6 +5,7 @@
$items_related_to_this_layout = get_theme_mod( $prefix . '_items_related_to_this_layout', 'carousel' ); $items_related_to_this_layout = get_theme_mod( $prefix . '_items_related_to_this_layout', 'carousel' );
$max_columns_count = get_theme_mod( $prefix . '_items_related_to_this_max_columns_count', 4 ); $max_columns_count = get_theme_mod( $prefix . '_items_related_to_this_max_columns_count', 4 );
$max_items_per_screen = get_theme_mod( $prefix . '_items_related_to_this_max_items_per_screen', 6 ); $max_items_per_screen = get_theme_mod( $prefix . '_items_related_to_this_max_items_per_screen', 6 );
$variable_items_width = get_theme_mod( $prefix . '_items_related_to_this_variable_items_width', 'no') === 'yes';
$max_items_number = get_theme_mod( $prefix . '_items_related_to_this_max_items_number', 12 ); $max_items_number = get_theme_mod( $prefix . '_items_related_to_this_max_items_number', 12 );
$order_option = get_theme_mod( $prefix . '_items_related_to_this_order', 'title_asc' ); $order_option = get_theme_mod( $prefix . '_items_related_to_this_order', 'title_asc' );
$hide_collection_heading = get_theme_mod( $prefix . '_items_related_to_this_hide_collection_heading', 'no' ) === 'yes'; $hide_collection_heading = get_theme_mod( $prefix . '_items_related_to_this_hide_collection_heading', 'no' ) === 'yes';
@ -49,7 +50,8 @@
], ],
'carousel_args' => [ 'carousel_args' => [
'max_items_per_screen' => $max_items_per_screen, 'max_items_per_screen' => $max_items_per_screen,
'image_size' => $image_size 'image_size' => $image_size,
'variable_items_width' => $variable_items_width,
] ]
]); ]);
?> ?>