Version 2.7.8.
This commit is contained in:
parent
a1f39eac0f
commit
b58250c5ed
|
@ -2,7 +2,7 @@
|
||||||
Contributors: andrebenedito, daltonmartins, fabianobn, jacsonp, leogermani, weryques, wetah, eduardohumberto, ravipassos, jessicafpx, marinagiolo, omarceloavila, r-guimaraes
|
Contributors: andrebenedito, daltonmartins, fabianobn, jacsonp, leogermani, weryques, wetah, eduardohumberto, ravipassos, jessicafpx, marinagiolo, omarceloavila, r-guimaraes
|
||||||
Requires at least: WordPress 5.9
|
Requires at least: WordPress 5.9
|
||||||
Tested up to: 6.5.2
|
Tested up to: 6.5.2
|
||||||
Version: 2.7.4
|
Version: 2.7.8
|
||||||
Requires PHP: 7.0
|
Requires PHP: 7.0
|
||||||
Stable tag: trunk
|
Stable tag: trunk
|
||||||
License: GNU General Public License v3
|
License: GNU General Public License v3
|
||||||
|
|
|
@ -4,7 +4,7 @@ Author: Tainacan
|
||||||
Author URI: https://tainacan.org
|
Author URI: https://tainacan.org
|
||||||
Theme URI: https://tainacan.org/blog/category/tema/
|
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.
|
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
|
Tested up to: 6.5.2
|
||||||
Requires PHP: 7.0
|
Requires PHP: 7.0
|
||||||
License: GNU General Public License v3
|
License: GNU General Public License v3
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
/** Theme version */
|
/** Theme version */
|
||||||
const TAINACAN_INTERFACE_VERSION = '2.7.4';
|
const TAINACAN_INTERFACE_VERSION = '2.7.8';
|
||||||
|
|
||||||
/* Disables Tainacan Theme Helper the_content filter, which is used to build a custom item and taxonomy (terms list) template. */
|
/* Disables Tainacan Theme Helper the_content filter, which is used to build a custom item and taxonomy (terms list) template. */
|
||||||
if ( !defined('TAINACAN_DISABLE_ITEM_THE_CONTENT_FILTER') )
|
if ( !defined('TAINACAN_DISABLE_ITEM_THE_CONTENT_FILTER') )
|
||||||
|
|
|
@ -43,11 +43,10 @@ function tainacan_interface_the_breadcrumb() {
|
||||||
} elseif ( is_single() && !is_attachment() ) {
|
} elseif ( is_single() && !is_attachment() ) {
|
||||||
if ( get_post_type() != 'post' ) {
|
if ( get_post_type() != 'post' ) {
|
||||||
$post_type = get_post_type_object(get_post_type());
|
$post_type = get_post_type_object(get_post_type());
|
||||||
$slug = $post_type->rewrite;
|
|
||||||
if (!is_page() && get_post_type() != 'tainacan-collection' && get_post_type() != 'tainacan-taxonomy' ) {
|
if (!is_page() && get_post_type() != 'tainacan-collection' && get_post_type() != 'tainacan-taxonomy' ) {
|
||||||
echo '<a href="'. esc_url(get_post_type_archive_link('tainacan-collection')) .'">'; _e( 'Collections', 'tainacan-interface' ); echo '</a> ' . $delimiter . ' ';
|
echo '<a href="'. esc_url(get_post_type_archive_link('tainacan-collection')) .'">'; _e( 'Collections', 'tainacan-interface' ); echo '</a> ' . $delimiter . ' ';
|
||||||
}
|
}
|
||||||
echo '<a href="' . $homeLink . '/' . $slug['slug'] . '/">' . $post_type->labels->singular_name . '</a>';
|
echo '<a href="' . get_post_type_archive_link(get_post_type()) . '">' . $post_type->labels->singular_name . '</a>';
|
||||||
if ($showCurrent == 1) echo ' ' . $delimiter . ' ' . $before . get_the_title() . $after;
|
if ($showCurrent == 1) echo ' ' . $delimiter . ' ' . $before . get_the_title() . $after;
|
||||||
} else {
|
} else {
|
||||||
$cat = get_the_category(); $cat = $cat[0];
|
$cat = get_the_category(); $cat = $cat[0];
|
||||||
|
|
|
@ -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' )
|
'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 . ---------------------------------------------------------
|
* Adds section to settings related to pagination section . ---------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -40,7 +40,7 @@ if ( ! function_exists( 'tainacan_enqueues' ) ) {
|
||||||
|
|
||||||
if ( defined ('TAINACAN_VERSION' ) ) {
|
if ( defined ('TAINACAN_VERSION' ) ) {
|
||||||
$settings = array(
|
$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_collection_list_url' => get_post_type_archive_link( 'tainacan-collection' ),
|
||||||
'theme_taxonomy_list_url' => get_post_type_archive_link( 'tainacan-taxonomy' ),
|
'theme_taxonomy_list_url' => get_post_type_archive_link( 'tainacan-taxonomy' ),
|
||||||
'site_url' => get_site_url()
|
'site_url' => get_site_url()
|
||||||
|
|
|
@ -18,9 +18,11 @@ function tainacan_comments_callback( $comment, $args, $depth ) {
|
||||||
?>
|
?>
|
||||||
<div class="media-body">
|
<div class="media-body">
|
||||||
<h5 class="media-heading comment-author vcard ml-2">
|
<h5 class="media-heading comment-author vcard ml-2">
|
||||||
<a href="<?php echo esc_url(get_author_posts_url( $comment->user_id )); ?>" class="text-black font-weight-bold bypostauthor">
|
<?php if ( comment_author( $comment->comment_ID ) ) : ?>
|
||||||
<?php wp_kses_post( comment_author( $comment->comment_ID ) ); ?>
|
<a href="<?php echo esc_url(get_author_posts_url( $comment->user_id )); ?>" class="text-black font-weight-bold bypostauthor">
|
||||||
</a>
|
<?php wp_kses_post( comment_author( $comment->comment_ID ) ); ?>
|
||||||
|
</a>
|
||||||
|
<?php endif; ?>
|
||||||
<p class="comment-time text-oslo-gray my-sm-1">
|
<p class="comment-time text-oslo-gray my-sm-1">
|
||||||
<?php
|
<?php
|
||||||
printf(
|
printf(
|
||||||
|
@ -37,18 +39,20 @@ function tainacan_comments_callback( $comment, $args, $depth ) {
|
||||||
<?php _e( 'Your comment is awaiting moderation.','tainacan-interface' ); ?>
|
<?php _e( 'Your comment is awaiting moderation.','tainacan-interface' ); ?>
|
||||||
</p>
|
</p>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<?php wp_kses_post( comment_text() ); ?>
|
<?php if ( comment_text() ) {
|
||||||
<?php wp_kses_post(
|
wp_kses_post( comment_text() );
|
||||||
|
|
||||||
|
wp_kses_post(
|
||||||
comment_reply_link( array(
|
comment_reply_link( array(
|
||||||
'reply_text' => __( 'Reply', 'tainacan-interface' ),
|
'reply_text' => __( 'Reply', 'tainacan-interface' ),
|
||||||
'depth' => $depth,
|
'depth' => $depth,
|
||||||
'max_depth' => $args['max_depth'],
|
'max_depth' => $args['max_depth'],
|
||||||
'before' => '<li class="ml-2 reply-link list-inline-item mr-3 mt-2">',
|
'before' => '<li class="ml-2 reply-link list-inline-item mr-3 mt-2">',
|
||||||
'after' => '</li>',
|
'after' => '</li>',
|
||||||
))
|
))
|
||||||
);
|
);
|
||||||
wp_kses_post( edit_comment_link( __( 'Edit', 'tainacan-interface' ), '<li class="edit-link list-inline-item mr-3 mt-2">', '</li>' ) );
|
wp_kses_post( edit_comment_link( __( 'Edit', 'tainacan-interface' ), '<li class="edit-link list-inline-item mr-3 mt-2">', '</li>' ) );
|
||||||
?>
|
} ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<?php }
|
<?php }
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
<?php get_header(); ?>
|
<?php get_header(); ?>
|
||||||
<?php get_template_part( 'tainacan/header-collection' ); ?>
|
<?php get_template_part( 'tainacan/header-collection' ); ?>
|
||||||
|
|
||||||
<?php tainacan_the_faceted_search([
|
<?php
|
||||||
|
tainacan_the_faceted_search([
|
||||||
'default_items_per_page' => get_theme_mod('tainacan_items_page_default_items_per_page', 12),
|
'default_items_per_page' => get_theme_mod('tainacan_items_page_default_items_per_page', 12),
|
||||||
'hide_filters' => get_theme_mod('tainacan_items_page_hide_filters', false),
|
'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),
|
'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),
|
'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),
|
'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_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)
|
||||||
]); ?>
|
]); ?>
|
||||||
|
|
||||||
<?php get_footer();
|
<?php get_footer();
|
||||||
|
|
|
@ -18,7 +18,10 @@
|
||||||
'start_with_filters_hidden' => get_theme_mod('tainacan_items_page_start_with_filters_hidden', false),
|
'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),
|
'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_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)
|
||||||
]); ?>
|
]); ?>
|
||||||
|
|
||||||
<?php get_footer(); ?>
|
<?php get_footer(); ?>
|
||||||
|
|
|
@ -16,7 +16,10 @@
|
||||||
'start_with_filters_hidden' => get_theme_mod('tainacan_items_page_start_with_filters_hidden', false),
|
'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),
|
'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_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)
|
||||||
]); ?>
|
]); ?>
|
||||||
|
|
||||||
<?php get_footer();
|
<?php get_footer();
|
||||||
|
|
Loading…
Reference in New Issue