Fixes misspelling of hide filter collapses option.
This commit is contained in:
parent
bf2571230e
commit
13cf319b9d
|
@ -37,7 +37,7 @@ class Theme_Helper {
|
||||||
// Replace collections permalink to post type archive if cover not enabled
|
// Replace collections permalink to post type archive if cover not enabled
|
||||||
add_filter('post_type_link', array($this, 'permalink_filter'), 10, 3);
|
add_filter('post_type_link', array($this, 'permalink_filter'), 10, 3);
|
||||||
|
|
||||||
// Replace single query to the page content set as cover for the colllection
|
// Replace single query to the page content set as cover for the collection
|
||||||
// Redirect to post type archive if no cover page is set
|
// Redirect to post type archive if no cover page is set
|
||||||
add_action('wp', array($this, 'collection_single_redirect'));
|
add_action('wp', array($this, 'collection_single_redirect'));
|
||||||
|
|
||||||
|
|
|
@ -4,12 +4,12 @@
|
||||||
--tainacan-mosaic-view-mode-min-height: 180px;
|
--tainacan-mosaic-view-mode-min-height: 180px;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
grid-gap: calc(2em + 16px) var(--tainacan-mosaic-view-mode-gap, 12px);
|
grid-gap: calc(2em + 18px) var(--tainacan-mosaic-view-mode-gap, 12px);
|
||||||
list-style: none;
|
list-style: none;
|
||||||
height: auto;
|
height: auto;
|
||||||
min-height: 0px; /* While most view modes set this to 50vh, this causes a bug for this one if there are few items to display */
|
min-height: 0px; /* While most view modes set this to 50vh, this causes a bug for this one if there are few items to display */
|
||||||
margin: 0;
|
margin: 0;
|
||||||
margin-bottom: calc(2em + 16px + var(--tainacan-container-padding));
|
margin-bottom: calc(2em + 18px + var(--tainacan-container-padding));
|
||||||
padding: 0;
|
padding: 0;
|
||||||
list-style: none;
|
list-style: none;
|
||||||
animation-name: appear;
|
animation-name: appear;
|
||||||
|
|
|
@ -221,7 +221,7 @@
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
"default": false
|
"default": false
|
||||||
},
|
},
|
||||||
"hideFilterColllapses": {
|
"hideFilterCollapses": {
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
"default": false
|
"default": false
|
||||||
},
|
},
|
||||||
|
|
|
@ -79,7 +79,7 @@ export default function({ attributes, setAttributes, isSelected, clientId }) {
|
||||||
collectionOrderByType,
|
collectionOrderByType,
|
||||||
shouldNotHideFiltersOnMobile,
|
shouldNotHideFiltersOnMobile,
|
||||||
displayFiltersHorizontally,
|
displayFiltersHorizontally,
|
||||||
hideFilterColllapses,
|
hideFilterCollapses,
|
||||||
filtersInlineWidth
|
filtersInlineWidth
|
||||||
} = attributes;
|
} = attributes;
|
||||||
|
|
||||||
|
@ -535,10 +535,10 @@ export default function({ attributes, setAttributes, isSelected, clientId }) {
|
||||||
<ToggleControl
|
<ToggleControl
|
||||||
label={ __('Hide filter collapses button', 'tainacan') }
|
label={ __('Hide filter collapses button', 'tainacan') }
|
||||||
help={ __('Toggle to not display each filter label as a collapsable button. This is suggested when you have a small amount of filters.', 'tainacan') }
|
help={ __('Toggle to not display each filter label as a collapsable button. This is suggested when you have a small amount of filters.', 'tainacan') }
|
||||||
checked={ hideFilterColllapses }
|
checked={ hideFilterCollapses }
|
||||||
onChange={ ( isChecked ) => {
|
onChange={ ( isChecked ) => {
|
||||||
hideFilterColllapses = isChecked;
|
hideFilterCollapses = isChecked;
|
||||||
setAttributes({ hideFilterColllapses: isChecked });
|
setAttributes({ hideFilterCollapses: isChecked });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
@ -922,7 +922,7 @@ export default function({ attributes, setAttributes, isSelected, clientId }) {
|
||||||
}}
|
}}
|
||||||
className="filters">
|
className="filters">
|
||||||
<div className="fake-filters-heading"></div>
|
<div className="fake-filters-heading"></div>
|
||||||
{ !hideFilterColllapses ? <span className="fake-link"></span> : null }
|
{ !hideFilterCollapses ? <span className="fake-link"></span> : null }
|
||||||
{ Array(2).fill().map( () => {
|
{ Array(2).fill().map( () => {
|
||||||
return <div className="fake-filter">
|
return <div className="fake-filter">
|
||||||
<span className="fake-text"></span>
|
<span className="fake-text"></span>
|
||||||
|
|
|
@ -52,6 +52,7 @@ export default function({ attributes }) {
|
||||||
collectionOrderByType,
|
collectionOrderByType,
|
||||||
shouldNotHideFiltersOnMobile,
|
shouldNotHideFiltersOnMobile,
|
||||||
displayFiltersHorizontally,
|
displayFiltersHorizontally,
|
||||||
|
hideFilterCollapses,
|
||||||
filtersInlineWidth
|
filtersInlineWidth
|
||||||
} = attributes;
|
} = attributes;
|
||||||
|
|
||||||
|
@ -64,7 +65,7 @@ export default function({ attributes }) {
|
||||||
|
|
||||||
// Gets attributes such as style, that are automatically added by the editor hook
|
// Gets attributes such as style, that are automatically added by the editor hook
|
||||||
const blockProps = useBlockProps.save();
|
const blockProps = useBlockProps.save();
|
||||||
|
console.log(hideFilterCollapses)
|
||||||
return <div
|
return <div
|
||||||
style={{
|
style={{
|
||||||
'font-size': baseFontSize + 'px',
|
'font-size': baseFontSize + 'px',
|
||||||
|
@ -118,6 +119,7 @@ export default function({ attributes }) {
|
||||||
data-default-orderby-meta = { updatedListType == 'collection' ? (collectionOrderByMeta ? collectionOrderByMeta : '') : (orderByMeta ? orderByMeta : '') }
|
data-default-orderby-meta = { updatedListType == 'collection' ? (collectionOrderByMeta ? collectionOrderByMeta : '') : (orderByMeta ? orderByMeta : '') }
|
||||||
data-default-orderby-type = { updatedListType == 'collection' ? (collectionOrderByType ? collectionOrderByType : '') : (orderByType ? orderByType : '') }
|
data-default-orderby-type = { updatedListType == 'collection' ? (collectionOrderByType ? collectionOrderByType : '') : (orderByType ? orderByType : '') }
|
||||||
data-should-not-hide-filters-on-mobile = { shouldNotHideFiltersOnMobile ? shouldNotHideFiltersOnMobile.toString() : 'false' }
|
data-should-not-hide-filters-on-mobile = { shouldNotHideFiltersOnMobile ? shouldNotHideFiltersOnMobile.toString() : 'false' }
|
||||||
|
data-hide-filter-collapses = { hideFilterCollapses ? hideFilterCollapses.toString() : 'false' }
|
||||||
data-display-filters-horizontally = { displayFiltersHorizontally ? displayFiltersHorizontally.toString() : 'false' } >
|
data-display-filters-horizontally = { displayFiltersHorizontally ? displayFiltersHorizontally.toString() : 'false' } >
|
||||||
</main>
|
</main>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue