Version 2.3.1
This commit is contained in:
parent
d2cdae0cad
commit
08d6298ce7
|
@ -1,27 +1,36 @@
|
||||||
function onTainacanSearchSubmit($event) {
|
function onTainacanSearchSubmit($event) {
|
||||||
|
|
||||||
if (document['tainacan-search-form']) {
|
if (document['tainacan-search-form']) {
|
||||||
|
var selectedForm = document['tainacan-search-form'];
|
||||||
if (document['tainacan-search-form'].archive && tainacan_plugin !== undefined) {
|
|
||||||
switch (document['tainacan-search-form'].archive.value) {
|
if (document['tainacan-search-form'] instanceof HTMLCollection) {
|
||||||
|
for (const child of document['tainacan-search-form']) {
|
||||||
|
if (child.s && child.s.value)
|
||||||
|
selectedForm = child;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (selectedForm.archive && tainacan_search_info !== undefined) {
|
||||||
|
switch (selectedForm.archive.value) {
|
||||||
case 'tainacan-items':
|
case 'tainacan-items':
|
||||||
document['tainacan-search-form'].action = tainacan_plugin.theme_items_list_url + (document['tainacan-search-form'].s ? '?search=' + document['tainacan-search-form'].s.value : '');
|
console.log(tainacan_search_info.theme_items_list_url)
|
||||||
|
selectedForm.action = tainacan_search_info.theme_items_list_url + (selectedForm.s ? '?search=' + selectedForm.s.value : '');
|
||||||
break;
|
break;
|
||||||
case 'tainacan-collections':
|
case 'tainacan-collections':
|
||||||
document['tainacan-search-form'].action = tainacan_plugin.theme_collection_list_url + (document['tainacan-search-form'].s ? '?s=' + document['tainacan-search-form'].s.value : '');
|
selectedForm.action = tainacan_search_info.theme_collection_list_url + (selectedForm.s ? '?s=' + selectedForm.s.value : '');
|
||||||
break;
|
break;
|
||||||
case 'posts':
|
case 'posts':
|
||||||
document['tainacan-search-form'].action = '/' + (document['tainacan-search-form'].s ? '?onlyposts=true&s=' + document['tainacan-search-form'].s.value : '');
|
selectedForm.action = '/' + (selectedForm.s ? '?onlyposts=true&s=' + selectedForm.s.value : '');
|
||||||
break;
|
break;
|
||||||
case 'pages':
|
case 'pages':
|
||||||
document['tainacan-search-form'].action = '/' + (document['tainacan-search-form'].s ? '?onlypages=true&s=' + document['tainacan-search-form'].s.value : '');
|
selectedForm.action = '/' + (selectedForm.s ? '?onlypages=true&s=' + selectedForm.s.value : '');
|
||||||
break;
|
break;
|
||||||
case 'global':
|
case 'global':
|
||||||
default:
|
default:
|
||||||
document['tainacan-search-form'].action = '/' + (document['tainacan-search-form'].s ? '?s=' + document['tainacan-search-form'].s.value : '');
|
selectedForm.action = '/' + (selectedForm.s ? '?s=' + selectedForm.s.value : '');
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
document['tainacan-search-form'].action = '/' + (document['tainacan-search-form'].s ? '?s=' + document['tainacan-search-form'].s.value : '');
|
selectedForm.action = '/' + (selectedForm.s ? '?s=' + selectedForm.s.value : '');
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($event)
|
if ($event)
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
.block-editor-block-preview__content {
|
.block-editor-block-preview__content {
|
||||||
font-family: 'Roboto', sans-serif;
|
font-family: 'Roboto', sans-serif;
|
||||||
}
|
}
|
||||||
.edit-post-visual-editor.editor-styles-wrapper,
|
.editor-styles-wrapper,
|
||||||
.components-modal__screen-overlay {
|
.components-modal__screen-overlay {
|
||||||
font-family: 'Roboto', sans-serif !important;
|
font-family: 'Roboto', sans-serif !important;
|
||||||
|
|
||||||
|
|
|
@ -297,6 +297,7 @@ nav {
|
||||||
width: 280px;
|
width: 280px;
|
||||||
height: auto;
|
height: auto;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
|
border-radius: 0px;
|
||||||
left: inherit;
|
left: inherit;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
z-index: 9999;
|
z-index: 9999;
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -225,6 +225,22 @@ if ( ! isset( $content_width ) ) {
|
||||||
$content_width = 1400;
|
$content_width = 1400;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Alert user if Tainacan plugin is not installed.
|
||||||
|
*
|
||||||
|
* @since Tainacan Theme
|
||||||
|
*/
|
||||||
|
function tainacan_interface_admin_notice() {
|
||||||
|
global $pagenow;
|
||||||
|
|
||||||
|
if ( !defined('TAINACAN_VERSION') && $pagenow == 'themes.php' ) {
|
||||||
|
echo '<div class="notice notice-warning is-dismissible">
|
||||||
|
<p>' . __('Warning: <a href="https://wordpress.org/plugins/tainacan/" >Tainacan plugin</a> is not activated! While you may use this theme without it, we made it to take full advantage of the plugin features.', 'tainacan-interface') . '</p>
|
||||||
|
</div>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
add_action('admin_notices', 'tainacan_interface_admin_notice');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds extra classes dp body tag. has-not-finished-loading is removed
|
* Adds extra classes dp body tag. has-not-finished-loading is removed
|
||||||
* from tag after jQuery.document(ready). It is used to style page while
|
* from tag after jQuery.document(ready). It is used to style page while
|
||||||
|
|
|
@ -2892,7 +2892,6 @@ add_action( 'wp_head', 'tainacan_header_settings_style_output');
|
||||||
*/
|
*/
|
||||||
function tainacan_items_page_filters_fixed_on_scroll_output() {
|
function tainacan_items_page_filters_fixed_on_scroll_output() {
|
||||||
if (!defined('TAINACAN_VERSION')) {
|
if (!defined('TAINACAN_VERSION')) {
|
||||||
_e('Tainacan plugin not activated!', 'tainacan-interface');
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$should_use_fixed_filters_logic = (version_compare(TAINACAN_VERSION, '0.17RC') >= 0) && get_theme_mod( 'tainacan_items_page_filters_fixed_on_scroll', false );
|
$should_use_fixed_filters_logic = (version_compare(TAINACAN_VERSION, '0.17RC') >= 0) && get_theme_mod( 'tainacan_items_page_filters_fixed_on_scroll', false );
|
||||||
|
|
|
@ -58,8 +58,16 @@ if ( ! function_exists( 'tainacan_enqueues' ) ) {
|
||||||
wp_register_script( 'tainacan_tainacanJS', get_template_directory_uri() . '/assets/js/js.js', '', TAINACAN_INTERFACE_VERSION, true );
|
wp_register_script( 'tainacan_tainacanJS', get_template_directory_uri() . '/assets/js/js.js', '', TAINACAN_INTERFACE_VERSION, true );
|
||||||
wp_enqueue_script( 'tainacan_tainacanJS' );
|
wp_enqueue_script( 'tainacan_tainacanJS' );
|
||||||
|
|
||||||
wp_register_script( 'tainacan_searchBarRedirect', get_template_directory_uri() . '/assets/js/search-bar-redirect.js', '', TAINACAN_INTERFACE_VERSION, false );
|
if ( defined ('TAINACAN_VERSION' ) ) {
|
||||||
wp_enqueue_script( 'tainacan_searchBarRedirect' );
|
$settings = array(
|
||||||
|
'theme_items_list_url' => esc_url_raw( get_site_url() ) . '/' . \Tainacan\Theme_Helper::get_instance()->get_items_list_slug(),
|
||||||
|
'theme_collection_list_url' => get_post_type_archive_link( 'tainacan-collection' ),
|
||||||
|
);
|
||||||
|
wp_register_script( 'tainacan_searchBarRedirect', get_template_directory_uri() . '/assets/js/search-bar-redirect.js', '', TAINACAN_INTERFACE_VERSION, false );
|
||||||
|
wp_enqueue_script( 'tainacan_searchBarRedirect' );
|
||||||
|
wp_localize_script( 'tainacan_searchBarRedirect', 'tainacan_search_info', $settings );
|
||||||
|
}
|
||||||
|
|
||||||
wp_enqueue_script( 'tainacan_copyLink', get_template_directory_uri() . '/assets/js/copy-link.js', [] , TAINACAN_INTERFACE_VERSION, false );
|
wp_enqueue_script( 'tainacan_copyLink', get_template_directory_uri() . '/assets/js/copy-link.js', [] , TAINACAN_INTERFACE_VERSION, false );
|
||||||
wp_localize_script( 'tainacan_copyLink', 'tainacan_copyLinkVars', array(
|
wp_localize_script( 'tainacan_copyLink', 'tainacan_copyLinkVars', array(
|
||||||
'linkCopied' => __( 'Copied! Link sent to the transfer area.', 'tainacan-interface' )
|
'linkCopied' => __( 'Copied! Link sent to the transfer area.', 'tainacan-interface' )
|
||||||
|
|
|
@ -20,7 +20,7 @@ msgstr ""
|
||||||
"esc_attr_e;esc_attr_x:1,2c;esc_attr__;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;"
|
"esc_attr_e;esc_attr_x:1,2c;esc_attr__;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;"
|
||||||
"_x:1,2c;_n:1,2;_n_noop:1,2;__ngettext:1,2;__ngettext_noop:1,2;_c,_nc:4c,1,2\n"
|
"_x:1,2c;_n:1,2;_n_noop:1,2;__ngettext:1,2;__ngettext_noop:1,2;_c,_nc:4c,1,2\n"
|
||||||
"X-Poedit-Basepath: ..\n"
|
"X-Poedit-Basepath: ..\n"
|
||||||
"X-Generator: Poedit 2.3\n"
|
"X-Generator: Poedit 2.3.1\n"
|
||||||
"X-Poedit-SearchPath-0: .\n"
|
"X-Poedit-SearchPath-0: .\n"
|
||||||
|
|
||||||
#: 404.php:8
|
#: 404.php:8
|
||||||
|
|
|
@ -20,7 +20,7 @@ msgstr ""
|
||||||
"_x:1,2c;_n:1,2;_n_noop:1,2;__ngettext:1,2;__ngettext_noop:1,2;_c,_nc:4c,1,2\n"
|
"_x:1,2c;_n:1,2;_n_noop:1,2;__ngettext:1,2;__ngettext_noop:1,2;_c,_nc:4c,1,2\n"
|
||||||
"X-Poedit-Basepath: ..\n"
|
"X-Poedit-Basepath: ..\n"
|
||||||
"Language: en_US\n"
|
"Language: en_US\n"
|
||||||
"X-Generator: Poedit 2.3\n"
|
"X-Generator: Poedit 2.3.1\n"
|
||||||
"X-Poedit-SearchPath-0: .\n"
|
"X-Poedit-SearchPath-0: .\n"
|
||||||
|
|
||||||
#: 404.php:8
|
#: 404.php:8
|
||||||
|
|
Loading…
Reference in New Issue