diff --git a/src/README.txt b/src/README.txt index d4a5f44..79051a1 100644 --- a/src/README.txt +++ b/src/README.txt @@ -2,7 +2,7 @@ Contributors: andrebenedito, daltonmartins, fabianobn, jacsonp, leogermani, weryques, wetah, eduardohumberto, ravipassos, jessicafpx, marinagiolo, omarceloavila, r-guimaraes Requires at least: WordPress 5.9 Tested up to: 6.5.2 -Version: 2.7.4 +Version: 2.7.8 Requires PHP: 7.0 Stable tag: trunk License: GNU General Public License v3 diff --git a/src/assets/scss/style.scss b/src/assets/scss/style.scss index a5e38cb..096105b 100644 --- a/src/assets/scss/style.scss +++ b/src/assets/scss/style.scss @@ -4,7 +4,7 @@ Author: Tainacan Author URI: https://tainacan.org Theme URI: https://tainacan.org/blog/category/tema/ Description: This is the default theme for the Tainacan project. Use this in conjunction with Tainacan plugin to easily manage and publish you digital collections with a beautiful faceted search interface. Ideal for museums, galleries, libraries and anyone who have a digital repository. -Version: 2.7.4 +Version: 2.7.8 Tested up to: 6.5.2 Requires PHP: 7.0 License: GNU General Public License v3 diff --git a/src/functions.php b/src/functions.php index 99f643c..adde410 100644 --- a/src/functions.php +++ b/src/functions.php @@ -1,7 +1,7 @@ rewrite; if (!is_page() && get_post_type() != 'tainacan-collection' && get_post_type() != 'tainacan-taxonomy' ) { echo ''; _e( 'Collections', 'tainacan-interface' ); echo ' ' . $delimiter . ' '; } - echo '' . $post_type->labels->singular_name . ''; + echo '' . $post_type->labels->singular_name . ''; if ($showCurrent == 1) echo ' ' . $delimiter . ' ' . $before . get_the_title() . $after; } else { $cat = get_the_category(); $cat = $cat[0]; diff --git a/src/functions/customizer/tainacan-items-page-filters-panel.php b/src/functions/customizer/tainacan-items-page-filters-panel.php index c28f355..4537f10 100644 --- a/src/functions/customizer/tainacan-items-page-filters-panel.php +++ b/src/functions/customizer/tainacan-items-page-filters-panel.php @@ -133,6 +133,62 @@ if ( !function_exists('tainacan_interface_customize_register_tainacan_items_page 'description' => __( 'Toggle to make filters load inside a modal instead of a side panel.', 'tainacan-interface' ) ) ); + if (version_compare(TAINACAN_VERSION, '0.21.7') >= 0) { + /** + * Adds option to disable the behavior of hiding filters on mobile inside a modal. + */ + $wp_customize->add_setting( 'tainacan_items_page_should_not_hide_filters_on_mobile', array( + 'type' => 'theme_mod', + 'capability' => 'edit_theme_options', + 'default' => false, + 'transport' => 'refresh', + 'sanitize_callback' => 'tainacan_callback_sanitize_checkbox' + ) ); + $wp_customize->add_control( 'tainacan_items_page_should_not_hide_filters_on_mobile', array( + 'type' => 'checkbox', + 'priority' => 10, // Within the section. + 'section' => 'tainacan_items_page_filters_panel', + 'label' => __( 'Should not hide filters even on mobile', 'tainacan-interface' ), + 'description' => __( 'Toggle to keep filters area visible even on small screen sizes.', 'tainacan-interface' ) + ) ); + + /** + * Adds option to display filters horizontally. + */ + $wp_customize->add_setting( 'tainacan_items_page_display_filters_horizontally', array( + 'type' => 'theme_mod', + 'capability' => 'edit_theme_options', + 'default' => false, + 'transport' => 'refresh', + 'sanitize_callback' => 'tainacan_callback_sanitize_checkbox' + ) ); + $wp_customize->add_control( 'tainacan_items_page_display_filters_horizontally', array( + 'type' => 'checkbox', + 'priority' => 10, // Within the section. + 'section' => 'tainacan_items_page_filters_panel', + 'label' => __( 'Display filters horizontally', 'tainacan-interface' ), + 'description' => __( 'Toggle to show filters in an horizontal pane above the search control instead of a vertical sidebar. This layout fits better with select and textual input filters. Must not to be used combined with "Filters as a modal".', 'tainacan-interface' ) + ) ); + + /** + * Adds option to hide the "Collapse all" filters button. + */ + $wp_customize->add_setting( 'tainacan_items_page_hide_filter_collapses', array( + 'type' => 'theme_mod', + 'capability' => 'edit_theme_options', + 'default' => false, + 'transport' => 'refresh', + 'sanitize_callback' => 'tainacan_callback_sanitize_checkbox' + ) ); + $wp_customize->add_control( 'tainacan_items_page_hide_filter_collapses', array( + 'type' => 'checkbox', + 'priority' => 10, // Within the section. + 'section' => 'tainacan_items_page_filters_panel', + 'label' => __( 'Hide filter collapses button', 'tainacan-interface' ), + 'description' => __( 'Toggle to not display each filter label as a collapsable button. This is suggested when you have a small amount of filters.', 'tainacan-interface' ) + ) ); + } + /** * Adds section to settings related to pagination section . --------------------------------------------------------- */ diff --git a/src/functions/enqueues.php b/src/functions/enqueues.php index b021d96..7edacaa 100644 --- a/src/functions/enqueues.php +++ b/src/functions/enqueues.php @@ -40,7 +40,7 @@ if ( ! function_exists( 'tainacan_enqueues' ) ) { if ( defined ('TAINACAN_VERSION' ) ) { $settings = array( - 'theme_items_list_url' => esc_url_raw( get_site_url() ) . '/' . \Tainacan\Theme_Helper::get_instance()->get_items_list_slug(), + 'theme_items_list_url' => esc_url_raw( get_site_url( null, \Tainacan\Theme_Helper::get_instance()->get_items_list_slug()) ), 'theme_collection_list_url' => get_post_type_archive_link( 'tainacan-collection' ), 'theme_taxonomy_list_url' => get_post_type_archive_link( 'tainacan-taxonomy' ), 'site_url' => get_site_url() diff --git a/src/functions/single-functions.php b/src/functions/single-functions.php index d0511a2..07e9f36 100644 --- a/src/functions/single-functions.php +++ b/src/functions/single-functions.php @@ -18,9 +18,11 @@ function tainacan_comments_callback( $comment, $args, $depth ) { ?>
- - comment_ID ) ); ?> - + comment_ID ) ) : ?> + + comment_ID ) ); ?> + +

- - __( 'Reply', 'tainacan-interface' ), - 'depth' => $depth, - 'max_depth' => $args['max_depth'], - 'before' => '', - )) - ); - wp_kses_post( edit_comment_link( __( 'Edit', 'tainacan-interface' ), '' ) ); - ?> + 'reply_text' => __( 'Reply', 'tainacan-interface' ), + 'depth' => $depth, + 'max_depth' => $args['max_depth'], + 'before' => '', + )) + ); + wp_kses_post( edit_comment_link( __( 'Edit', 'tainacan-interface' ), '' ) ); + } ?>
- get_theme_mod('tainacan_items_page_default_items_per_page', 12), 'hide_filters' => get_theme_mod('tainacan_items_page_hide_filters', false), 'hide_hide_filters_button' => get_theme_mod('tainacan_items_page_hide_hide_filters_button', false), @@ -15,7 +16,10 @@ 'start_with_filters_hidden' => get_theme_mod('tainacan_items_page_start_with_filters_hidden', false), 'filters_as_modal' => get_theme_mod('tainacan_items_page_filters_as_modal', false), 'show_inline_view_mode_options' => get_theme_mod('tainacan_items_page_show_inline_view_mode_options', false), - 'show_fullscreen_with_view_modes' => get_theme_mod('tainacan_items_page_show_fullscreen_with_view_modes', false) + 'show_fullscreen_with_view_modes' => get_theme_mod('tainacan_items_page_show_fullscreen_with_view_modes', false), + 'should_not_hide_filters_on_mobile' => get_theme_mod('tainacan_items_page_should_not_hide_filters_on_mobile', false), + 'display_filters_horizontally' => get_theme_mod('tainacan_items_page_display_filters_horizontally', false), + 'hide_filter_collapses' => get_theme_mod('tainacan_items_page_hide_filter_collapses', false) ]); ?> get_theme_mod('tainacan_items_page_start_with_filters_hidden', false), 'filters_as_modal' => get_theme_mod('tainacan_items_page_filters_as_modal', false), 'show_inline_view_mode_options' => get_theme_mod('tainacan_items_page_show_inline_view_mode_options', false), - 'show_fullscreen_with_view_modes' => get_theme_mod('tainacan_items_page_show_fullscreen_with_view_modes', false) + 'show_fullscreen_with_view_modes' => get_theme_mod('tainacan_items_page_show_fullscreen_with_view_modes', false), + 'should_not_hide_filters_on_mobile' => get_theme_mod('tainacan_items_page_should_not_hide_filters_on_mobile', false), + 'display_filters_horizontally' => get_theme_mod('tainacan_items_page_display_filters_horizontally', false), + 'hide_filter_collapses' => get_theme_mod('tainacan_items_page_hide_filter_collapses', false) ]); ?> diff --git a/src/tainacan/archive-taxonomy.php b/src/tainacan/archive-taxonomy.php index 2a7a404..9d59868 100644 --- a/src/tainacan/archive-taxonomy.php +++ b/src/tainacan/archive-taxonomy.php @@ -16,7 +16,10 @@ 'start_with_filters_hidden' => get_theme_mod('tainacan_items_page_start_with_filters_hidden', false), 'filters_as_modal' => get_theme_mod('tainacan_items_page_filters_as_modal', false), 'show_inline_view_mode_options' => get_theme_mod('tainacan_items_page_show_inline_view_mode_options', false), - 'show_fullscreen_with_view_modes' => get_theme_mod('tainacan_items_page_show_fullscreen_with_view_modes', false) + 'show_fullscreen_with_view_modes' => get_theme_mod('tainacan_items_page_show_fullscreen_with_view_modes', false), + 'should_not_hide_filters_on_mobile' => get_theme_mod('tainacan_items_page_should_not_hide_filters_on_mobile', false), + 'display_filters_horizontally' => get_theme_mod('tainacan_items_page_display_filters_horizontally', false), + 'hide_filter_collapses' => get_theme_mod('tainacan_items_page_hide_filter_collapses', false) ]); ?>