Plugin Directory

Changeset 3127695


Ignore:
Timestamp:
07/29/2024 08:29:34 PM (20 months ago)
Author:
tainacan
Message:

Version 0.3.4

Location:
tainacan-blocksy
Files:
3 added
4 edited

Legend:

Unmodified
Added
Removed
  • tainacan-blocksy/trunk/README.txt

    r3110753 r3127695  
    44Tags: museums, archives, collections, tainacan, blocksy
    55Requires at least: 5.9
    6 Tested up to: 6.5
     6Tested up to: 6.6
    77Requires PHP: 7.0
    8 Stable tag: 0.3.3
     8Stable tag: 0.3.4
    99Requires Plugins: tainacan
    1010License: GPLv2 or later
     
    5959
    6060== Changelog ==
     61
     62= 0.3.4 =
     63* Adds support for variable items width in related items carousel
    6164
    6265= 0.3.3 =
  • tainacan-blocksy/trunk/functions.php

    r3110753 r3127695  
    55Description: Tainacan plugin support for Blocksy theme
    66Author: tainacan
    7 Version: 0.3.3
     7Version: 0.3.4
    88Text Domain: tainacan-blocksy
    99License: GPLv2 or later
     
    1616
    1717/** Theme/plugin version */
    18 const TAINACAN_BLOCKSY_VERSION = '0.3.3';
     18const TAINACAN_BLOCKSY_VERSION = '0.3.4';
    1919const TAINACAN_BLOCKSY_IS_CHILD_THEME = false;
    2020
  • tainacan-blocksy/trunk/inc/options/single-elements/items-related-to-this.php

    r3094767 r3127695  
    4646        'choices' => $layout_choices,
    4747        'sync' => '',
    48     ],
    49     blocksy_rand_md5() => [
    50         'type' => 'ct-condition',
    51         'condition' => [
    52             $prefix . 'items_related_to_this_layout'  => 'carousel'
    53         ],
    54         'options' => [
    55             $prefix . 'items_related_to_this_max_items_per_screen' => [
    56                 'label' => __( 'Max amount of items per slide', 'tainacan-blocksy' ),
    57                 'type' => 'ct-number',
    58                 'design' => 'inline',
    59                 'value' => 6,
    60                 'min' => 1,
    61                 'max' => 10,
    62                 'sync' => ''
    63             ]
    64         ]
    6548    ],
    6649    blocksy_rand_md5() => [
     
    158141}
    159142
     143if ( null !== TAINACAN_VERSION && version_compare( TAINACAN_VERSION, '0.21.8' ) >= 0 ) {
     144    $inner_options[blocksy_rand_md5()] = [
     145        'type' => 'ct-condition',
     146        'condition' => [
     147            $prefix . 'items_related_to_this_layout'  => 'carousel',
     148            $prefix . 'items_related_to_this_variable_items_width' => 'no',
     149        ],
     150        'options' => [
     151            $prefix . 'items_related_to_this_max_items_per_screen' => [
     152                'label' => __( 'Max amount of items per slide', 'tainacan-blocksy' ),
     153                'type' => 'ct-number',
     154                'design' => 'inline',
     155                'value' => 6,
     156                'min' => 1,
     157                'max' => 10,
     158                'sync' => ''
     159            ]
     160        ]
     161    ];
     162    $inner_options[blocksy_rand_md5()] = [
     163        'type' => 'ct-condition',
     164        'condition' => [
     165            $prefix . 'items_related_to_this_layout'  => 'carousel'
     166        ],
     167        'options' => [
     168            $prefix . 'items_related_to_this_variable_items_width' => [
     169                'label' => __( 'Variable items width', 'tainacan-blocksy' ),
     170                'type' => 'ct-switch',
     171                'value' => 'no',
     172                'desc' => __( 'Toggle to define each slide size based on its content natural width.', 'tainacan-blocksy' ),
     173                'sync' => ''
     174            ]
     175        ]
     176    ];
     177} else {
     178    $inner_options[blocksy_rand_md5()] = [
     179        'type' => 'ct-condition',
     180        'condition' => [
     181            $prefix . 'items_related_to_this_layout'  => 'carousel',
     182        ],
     183        'options' => [
     184            $prefix . 'items_related_to_this_max_items_per_screen' => [
     185                'label' => __( 'Max amount of items per slide', 'tainacan-blocksy' ),
     186                'type' => 'ct-number',
     187                'design' => 'inline',
     188                'value' => 6,
     189                'min' => 1,
     190                'max' => 10,
     191                'sync' => ''
     192            ]
     193        ]
     194    ];
     195}
     196
    160197$options = [
    161198    $prefix . 'display_items_related_to_this' => [
  • tainacan-blocksy/trunk/template-parts/tainacan-item-single-items-related-to-this.php

    r3094767 r3127695  
    66    $max_columns_count            = get_theme_mod( $prefix . '_items_related_to_this_max_columns_count', 4 );
    77    $max_items_per_screen         = get_theme_mod( $prefix . '_items_related_to_this_max_items_per_screen', 6 );
     8    $variable_items_width         = get_theme_mod( $prefix . '_items_related_to_this_variable_items_width', 'no') === 'yes';
    89    $max_items_number             = get_theme_mod( $prefix . '_items_related_to_this_max_items_number', 12 );
    910    $order_option                 = get_theme_mod( $prefix . '_items_related_to_this_order', 'title_asc' );
     
    5051                    'carousel_args' => [
    5152                        'max_items_per_screen' => $max_items_per_screen,
    52                         'image_size' => $image_size
     53                        'image_size' => $image_size,
     54                        'variable_items_width' => $variable_items_width,
    5355                    ]
    5456                ]);
Note: See TracChangeset for help on using the changeset viewer.