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
|
||||
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
|
||||
add_action('wp', array($this, 'collection_single_redirect'));
|
||||
|
||||
|
|
|
@ -4,12 +4,12 @@
|
|||
--tainacan-mosaic-view-mode-min-height: 180px;
|
||||
display: flex;
|
||||
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;
|
||||
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 */
|
||||
margin: 0;
|
||||
margin-bottom: calc(2em + 16px + var(--tainacan-container-padding));
|
||||
margin-bottom: calc(2em + 18px + var(--tainacan-container-padding));
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
animation-name: appear;
|
||||
|
|
|
@ -221,7 +221,7 @@
|
|||
"type": "boolean",
|
||||
"default": false
|
||||
},
|
||||
"hideFilterColllapses": {
|
||||
"hideFilterCollapses": {
|
||||
"type": "boolean",
|
||||
"default": false
|
||||
},
|
||||
|
|
|
@ -79,7 +79,7 @@ export default function({ attributes, setAttributes, isSelected, clientId }) {
|
|||
collectionOrderByType,
|
||||
shouldNotHideFiltersOnMobile,
|
||||
displayFiltersHorizontally,
|
||||
hideFilterColllapses,
|
||||
hideFilterCollapses,
|
||||
filtersInlineWidth
|
||||
} = attributes;
|
||||
|
||||
|
@ -535,10 +535,10 @@ export default function({ attributes, setAttributes, isSelected, clientId }) {
|
|||
<ToggleControl
|
||||
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') }
|
||||
checked={ hideFilterColllapses }
|
||||
checked={ hideFilterCollapses }
|
||||
onChange={ ( isChecked ) => {
|
||||
hideFilterColllapses = isChecked;
|
||||
setAttributes({ hideFilterColllapses: isChecked });
|
||||
hideFilterCollapses = isChecked;
|
||||
setAttributes({ hideFilterCollapses: isChecked });
|
||||
}
|
||||
}
|
||||
/>
|
||||
|
@ -922,7 +922,7 @@ export default function({ attributes, setAttributes, isSelected, clientId }) {
|
|||
}}
|
||||
className="filters">
|
||||
<div className="fake-filters-heading"></div>
|
||||
{ !hideFilterColllapses ? <span className="fake-link"></span> : null }
|
||||
{ !hideFilterCollapses ? <span className="fake-link"></span> : null }
|
||||
{ Array(2).fill().map( () => {
|
||||
return <div className="fake-filter">
|
||||
<span className="fake-text"></span>
|
||||
|
|
|
@ -52,6 +52,7 @@ export default function({ attributes }) {
|
|||
collectionOrderByType,
|
||||
shouldNotHideFiltersOnMobile,
|
||||
displayFiltersHorizontally,
|
||||
hideFilterCollapses,
|
||||
filtersInlineWidth
|
||||
} = attributes;
|
||||
|
||||
|
@ -64,7 +65,7 @@ export default function({ attributes }) {
|
|||
|
||||
// Gets attributes such as style, that are automatically added by the editor hook
|
||||
const blockProps = useBlockProps.save();
|
||||
|
||||
console.log(hideFilterCollapses)
|
||||
return <div
|
||||
style={{
|
||||
'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-type = { updatedListType == 'collection' ? (collectionOrderByType ? collectionOrderByType : '') : (orderByType ? orderByType : '') }
|
||||
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' } >
|
||||
</main>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue