Change showcase param name to min_width
This commit is contained in:
parent
108e646b2d
commit
6c8be9eca1
@ -402,7 +402,7 @@ function fictioneer_get_shortcode_tax_query( $args ) {
|
||||
* @param string|null $attr['seamless'] Optional. Whether to render the image seamless. Default false (Customizer).
|
||||
* @param string|null $attr['aspect_ratio'] Optional. Aspect ratio of the item. Default empty.
|
||||
* @param string|null $attr['height'] Optional. Override the item height. Default empty.
|
||||
* @param string|null $attr['height'] Optional. Override the item minimum width. Default empty.
|
||||
* @param string|null $attr['min_width'] Optional. Override the item minimum width. Default empty.
|
||||
* @param string|null $attr['lightbox'] Optional. Whether the thumbnail is opened in the lightbox. Default true.
|
||||
* @param string|null $attr['thumbnail'] Optional. Whether to show the thumbnail. Default true (Customizer).
|
||||
* @param string|null $attr['class'] Optional. Additional CSS classes, separated by whitespace.
|
||||
@ -422,7 +422,7 @@ function fictioneer_shortcode_showcase( $attr ) {
|
||||
|
||||
// Height/Width
|
||||
$args['height'] = sanitize_text_field( $attr['height'] ?? '' );
|
||||
$args['width'] = sanitize_text_field( $attr['width'] ?? '' );
|
||||
$args['min_width'] = sanitize_text_field( $attr['min_width'] ?? '' );
|
||||
|
||||
// Specifics
|
||||
$args['no_cap'] = filter_var( $attr['no_cap'] ?? 0, FILTER_VALIDATE_BOOLEAN );
|
||||
|
@ -26,8 +26,9 @@
|
||||
* @internal $args['relation'] Relationship between taxonomies.
|
||||
* @internal $args['classes'] String of additional CSS classes. Default empty.
|
||||
* @internal $args['splide'] Configuration JSON for the Splide slider. Default empty.
|
||||
* @internal $args['aspect_ratio'] Aspect ratio of the item.
|
||||
* @internal $args['height'] Override the item height. Default empty.
|
||||
* @internal $args['width'] Override the item minimum width. Default empty.
|
||||
* @internal $args['min_width'] Override the item minimum width. Default empty.
|
||||
* @internal $args['aspect_ratio'] Aspect ratio of the item. Default empty.
|
||||
*/
|
||||
|
||||
@ -102,8 +103,8 @@ if ( $splide ) {
|
||||
$attributes[] = "data-splide='{$splide}'";
|
||||
}
|
||||
|
||||
if ( $args['width'] ) {
|
||||
$attributes[] .= "style='--showcase-item-min-width: {$args['width']};'";
|
||||
if ( $args['min_width'] ) {
|
||||
$attributes[] .= "style='--showcase-item-min-width: {$args['min_width']};'";
|
||||
$args['classes'] .= ' _custom-min-width';
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user