Makes fixed filters logic disabled by default.

This commit is contained in:
mateuswetah 2020-11-06 15:48:46 -03:00
parent 420a4449e8
commit 92cc62ad81
3 changed files with 25 additions and 24 deletions

View File

@ -1166,7 +1166,7 @@ function tainacan_customize_register( $wp_customize ) {
$wp_customize->add_setting( 'tainacan_items_page_filters_fixed_on_scroll', array( $wp_customize->add_setting( 'tainacan_items_page_filters_fixed_on_scroll', array(
'type' => 'theme_mod', 'type' => 'theme_mod',
'capability' => 'edit_theme_options', 'capability' => 'edit_theme_options',
'default' => true, 'default' => false,
'transport' => 'refresh', 'transport' => 'refresh',
'sanitize_callback' => 'tainacan_callback_sanitize_checkbox' 'sanitize_callback' => 'tainacan_callback_sanitize_checkbox'
) ); ) );
@ -1175,7 +1175,7 @@ function tainacan_customize_register( $wp_customize ) {
'priority' => 10, // Within the section. 'priority' => 10, // Within the section.
'section' => 'tainacan_items_page_filters_panel', 'section' => 'tainacan_items_page_filters_panel',
'label' => __( 'Filters side panel fixed on scroll', 'tainacan-interface' ), 'label' => __( 'Filters side panel fixed on scroll', 'tainacan-interface' ),
'description' => __( 'Toggle to if you don\'t want filters panel to get fixed on screen when scrolling down the items list. This will only take effect if the items list itself is taller than the screen height.', 'tainacan-interface' ) 'description' => __( 'Toggle to if you want filters panel to get fixed on screen when scrolling down the items list. This will only take effect if the items list itself is taller than the screen height.', 'tainacan-interface' )
) ); ) );
} }
@ -2379,7 +2379,7 @@ add_action( 'wp_head', 'tainacan_single_item_metadata_columns_count_output');
* @see wp_add_inline_style() * @see wp_add_inline_style()
*/ */
function tainacan_items_page_filters_fixed_on_scroll_output() { function tainacan_items_page_filters_fixed_on_scroll_output() {
$should_use_fixed_filters_logic = get_theme_mod( 'tainacan_items_page_filters_fixed_on_scroll', true ); $should_use_fixed_filters_logic = (version_compare(TAINACAN_VERSION, '0.17RC') >= 0) && get_theme_mod( 'tainacan_items_page_filters_fixed_on_scroll', false );
if (!$should_use_fixed_filters_logic) if (!$should_use_fixed_filters_logic)
return; return;
@ -2392,6 +2392,7 @@ function tainacan_items_page_filters_fixed_on_scroll_output() {
:not(.wp-block-tainacan-faceted-search)>.theme-items-list:not(.is-fullscreen).is-filters-menu-open.is-filters-menu-fixed-at-top .filters-menu:not(.filters-menu-modal) { :not(.wp-block-tainacan-faceted-search)>.theme-items-list:not(.is-fullscreen).is-filters-menu-open.is-filters-menu-fixed-at-top .filters-menu:not(.filters-menu-modal) {
position: fixed; position: fixed;
top: 0px !important; top: 0px !important;
z-index: 9;
} }
:not(.wp-block-tainacan-faceted-search)>.theme-items-list:not(.is-fullscreen).is-filters-menu-open.is-filters-menu-fixed-at-top .filters-menu:not(.filters-menu-modal) .modal-content { :not(.wp-block-tainacan-faceted-search)>.theme-items-list:not(.is-fullscreen).is-filters-menu-open.is-filters-menu-fixed-at-top .filters-menu:not(.filters-menu-modal) .modal-content {
position: absolute; position: absolute;

Binary file not shown.

View File

@ -5,7 +5,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: WordPress Blank Pot v1.0.0\n" "Project-Id-Version: WordPress Blank Pot v1.0.0\n"
"Report-Msgid-Bugs-To: Translator Name <translations@example.com>\n" "Report-Msgid-Bugs-To: Translator Name <translations@example.com>\n"
"POT-Creation-Date: 2020-10-30 17:30-0300\n" "POT-Creation-Date: 2020-11-06 15:47-0300\n"
"PO-Revision-Date: \n" "PO-Revision-Date: \n"
"Last-Translator: \n" "Last-Translator: \n"
"Language-Team: Your Team <translations@example.com>\n" "Language-Team: Your Team <translations@example.com>\n"
@ -172,24 +172,24 @@ msgstr "Roxo"
msgid "Violet" msgid "Violet"
msgstr "Violeta" msgstr "Violeta"
#: functions.php:240 #: functions.php:249
msgid "Tainacan Sidebar Right" msgid "Tainacan Sidebar Right"
msgstr "Barra lateral direita do Tainacan" msgstr "Barra lateral direita do Tainacan"
#: functions.php:255 #: functions.php:264
msgid "Tainacan Sidebar Footer" msgid "Tainacan Sidebar Footer"
msgstr "Rodapé do Tainacan" msgstr "Rodapé do Tainacan"
#: functions.php:276 #: functions.php:285
msgctxt "Block pattern category" msgctxt "Block pattern category"
msgid "Tainacan Interface" msgid "Tainacan Interface"
msgstr "Tainacan Interface" msgstr "Tainacan Interface"
#: functions.php:283 #: functions.php:292
msgid "Tainacan heading section" msgid "Tainacan heading section"
msgstr "Sessão de título Tainacan" msgstr "Sessão de título Tainacan"
#: functions.php:284 #: functions.php:293
msgctxt "Block pattern description" msgctxt "Block pattern description"
msgid "" msgid ""
"A left-aligned heading section containing a light sub-heading and an " "A left-aligned heading section containing a light sub-heading and an "
@ -198,33 +198,33 @@ msgstr ""
"Uma sessão de título alinhada à esquerda contendo um discreto sub-título e " "Uma sessão de título alinhada à esquerda contendo um discreto sub-título e "
"uma linha abaixo do título." "uma linha abaixo do título."
#: functions.php:285 functions.php:303 functions.php:365 #: functions.php:294 functions.php:312 functions.php:374
msgid "Section title" msgid "Section title"
msgstr "Título da sessão" msgstr "Título da sessão"
#: functions.php:285 #: functions.php:294
msgid "Section optional description..." msgid "Section optional description..."
msgstr "Descrição opcional da sessão..." msgstr "Descrição opcional da sessão..."
#: functions.php:292 #: functions.php:301
msgid "Tainacan highlight section" msgid "Tainacan highlight section"
msgstr "Sessão de destaque Tainacan" msgstr "Sessão de destaque Tainacan"
#: functions.php:293 #: functions.php:302
msgctxt "Block pattern description" msgctxt "Block pattern description"
msgid "A hero section with a background color and columns for image and text." msgid "A hero section with a background color and columns for image and text."
msgstr "" msgstr ""
"Uma sessão de destaque com uma cor de fundo e colunas para imagem e texto." "Uma sessão de destaque com uma cor de fundo e colunas para imagem e texto."
#: functions.php:325 functions.php:381 #: functions.php:334 functions.php:390
msgid "View more..." msgid "View more..."
msgstr "Veja mais..." msgstr "Veja mais..."
#: functions.php:343 #: functions.php:352
msgid "Tainacan highlight section (alt)" msgid "Tainacan highlight section (alt)"
msgstr "Sessão de destaque Tainacan (alt)" msgstr "Sessão de destaque Tainacan (alt)"
#: functions.php:344 #: functions.php:353
msgctxt "Block pattern description" msgctxt "Block pattern description"
msgid "" msgid ""
"Another hero section with a background color and columns for image headings " "Another hero section with a background color and columns for image headings "
@ -233,11 +233,11 @@ msgstr ""
"Outra sessão de destaque com um fundo colorido e colunas para imagens, " "Outra sessão de destaque com um fundo colorido e colunas para imagens, "
"títulos e texto." "títulos e texto."
#: functions.php:437 #: functions.php:446
msgid "Navigation menu below header" msgid "Navigation menu below header"
msgstr "Menu de navegação abaixo do cabeçalho" msgstr "Menu de navegação abaixo do cabeçalho"
#: functions.php:482 functions/breadcrumb.php:51 functions/breadcrumb.php:91 #: functions.php:491 functions/breadcrumb.php:51 functions/breadcrumb.php:91
#: functions/customizer.php:199 searchform.php:66 #: functions/customizer.php:199 searchform.php:66
msgid "Collections" msgid "Collections"
msgstr "Coleções" msgstr "Coleções"
@ -875,13 +875,13 @@ msgstr "Painel lateral dos filtros fixo no scroll"
#: functions/customizer.php:1178 #: functions/customizer.php:1178
msgid "" msgid ""
"Toggle to if you don't want filters panel to get fixed on screen when " "Toggle to if you want filters panel to get fixed on screen when scrolling "
"scrolling down the items list. This will only take effect if the items list " "down the items list. This will only take effect if the items list itself is "
"itself is taller than the screen height." "taller than the screen height."
msgstr "" msgstr ""
"Troque se você não quiser que o painel de filtros fique fixado na tela " "Troque se você quiser que o painel de filtros fique fixado na tela quando se "
"quando se aplica scroll para baixo na lista de itens. Isto só tem efeito se " "aplica scroll para baixo na lista de itens. Isto só tem efeito se a lista de "
"a lista de itens em si é mais alta que a altura da tela." "itens em si é mais alta que a altura da tela."
#: functions/customizer.php:1196 #: functions/customizer.php:1196
msgid "Filters as modal." msgid "Filters as modal."