diff --git a/src/assets/js/tainacan-interface-truncate.js b/src/assets/js/tainacan-interface-truncate.js index 9e9d2b0..d6d5169 100644 --- a/src/assets/js/tainacan-interface-truncate.js +++ b/src/assets/js/tainacan-interface-truncate.js @@ -9,33 +9,32 @@ }; if (settings) { - $.extend(config, settings); + $.extend( config, settings ); } - var minimized_elements = $(this); - - minimized_elements.each(function(){ - var t = $(this).text(); - if(t.length < config.minChars) return; - - $(this).html( - t.slice(0,config.showChars)+''+ config.ellipsesText +' [ '+ config.moreText +' ]'+ - ''+ t.slice(config.showChars,t.length)+' [ '+ config.lessText +' ]' + var minimized_elements = $( this ); + + minimized_elements.each(function(){ + var t = $( this ).text(); + if (t.length < config.minChars) { return }; + + $( this ).html( + t.slice( 0,config.showChars ) + '' + config.ellipsesText + ' [ ' + config.moreText + ' ]' + '' + t.slice( config.showChars,t.length ) + ' [ ' + config.lessText + ' ]' ); - - }); - - $('a.tainacan-interface-more', minimized_elements).click(function(event){ - event.preventDefault(); - minimized_elements.addClass('full-story'); - $(this).hide().prev().hide(); - $(this).next().show(); + }); - - $('a.tainacan-interface-less', minimized_elements).click(function(event){ + + $( 'a.tainacan-interface-more', minimized_elements ).click(function(event){ event.preventDefault(); - minimized_elements.removeClass('full-story'); - $(this).parent().hide().prev().show().prev().show(); + minimized_elements.addClass( 'full-story' ); + $( this ).hide().prev().hide(); + $( this ).next().show(); + }); + + $( 'a.tainacan-interface-less', minimized_elements ).click(function(event){ + event.preventDefault(); + minimized_elements.removeClass( 'full-story' ); + $( this ).parent().hide().prev().show().prev().show(); }); return minimized_elements; }; diff --git a/src/footer.php b/src/footer.php index 423e176..2f1befa 100644 --- a/src/footer.php +++ b/src/footer.php @@ -20,12 +20,12 @@ echo '

'; } if ( get_option( 'tainacan_blogaddress' ) ) { - echo wp_filter_nohtml_kses(get_option( 'tainacan_blogaddress', '' )); + echo wp_filter_nohtml_kses( get_option( 'tainacan_blogaddress', '' ) ); } ?>

- +
diff --git a/src/functions.php b/src/functions.php index 22621f9..4525320 100644 --- a/src/functions.php +++ b/src/functions.php @@ -125,11 +125,11 @@ add_action( 'widgets_init', 'tainacan_widgets_footer_init' ); function tainacan_get_logo() { if ( has_custom_logo() ) { return get_custom_logo(); - } else { - $html = ''; - return $html; + } else { + $html = ''; + return $html; } } diff --git a/src/functions/class-tainacanthemecollectioncolor.php b/src/functions/class-tainacanthemecollectioncolor.php index e636ce8..3197566 100644 --- a/src/functions/class-tainacanthemecollectioncolor.php +++ b/src/functions/class-tainacanthemecollectioncolor.php @@ -21,13 +21,13 @@ class TainacanThemeCollectionColor { wp_enqueue_script( 'tainacan_colorWell', get_template_directory_uri() . '/functions/collection-color.js', false, false, true ); wp_enqueue_style( 'tainacan_colorWellStyle', get_template_directory_uri() . '/functions/collection-color.css' ); wp_localize_script( 'tainacan_colorWell', 'tainacan_colorPickerVars', array( - 'cancelText' => __("cancel", 'tainacan-interface'), - 'chooseText' => __("choose", 'tainacan-interface'), - 'togglePaletteMoreText' => __("more", 'tainacan-interface'), - 'togglePaletteLessText' => __("less", 'tainacan-interface'), - 'clearText' => __("Clear Color Selection", 'tainacan-interface'), - 'noColorSelectedText' => __("No Color Selected", 'tainacan-interface'), - ) ); + 'cancelText' => __( 'cancel', 'tainacan-interface' ), + 'chooseText' => __( 'choose', 'tainacan-interface' ), + 'togglePaletteMoreText' => __( 'more', 'tainacan-interface' ), + 'togglePaletteLessText' => __( 'less', 'tainacan-interface' ), + 'clearText' => __( 'Clear Color Selection', 'tainacan-interface' ), + 'noColorSelectedText' => __( 'No Color Selected', 'tainacan-interface' ), + )); wp_enqueue_script( 'tainacan_Spectrum', get_template_directory_uri() . '/assets/js/spectrum.js', false, false, true ); wp_enqueue_style( 'tainacan_Spectrum', get_template_directory_uri() . '/assets/js/spectrum.css' ); diff --git a/src/functions/enqueues.php b/src/functions/enqueues.php index 6cd6715..28c6de7 100644 --- a/src/functions/enqueues.php +++ b/src/functions/enqueues.php @@ -36,8 +36,8 @@ if ( ! function_exists( 'tainacan_enqueues' ) ) { /** * Google */ - // Google fonts Roboto - wp_enqueue_style( 'tainacan_RobotoFonts', 'https://fonts.googleapis.com/css?family=Roboto:100,100i,300,300i,400,400i,500,500i,700,700i,900,900i' ); + // Google fonts Roboto + wp_enqueue_style( 'tainacan_RobotoFonts', 'https://fonts.googleapis.com/css?family=Roboto:100,100i,300,300i,400,400i,500,500i,700,700i,900,900i' ); // Material Icons wp_register_style( 'tainacan_MaterialIconsFonts', get_template_directory_uri() . '/assets/fonts/material-design-icons/css/materialdesignicons.min.css', '', '2.4.85', '' ); wp_enqueue_style( 'tainacan_MaterialIconsFonts' ); @@ -47,8 +47,8 @@ if ( ! function_exists( 'tainacan_enqueues' ) ) { */ wp_enqueue_script( 'tainacan_tainacanTruncate', get_template_directory_uri() . '/assets/js/tainacan-interface-truncate.js', array( 'jquery' ), '1.0', false ); wp_localize_script( 'tainacan_tainacanTruncate', 'tainacan_trucanteVars', array( - "moreText" => __('More', 'tainacan-interface'), - "lessText" => __('Less', 'tainacan-interface') + 'moreText' => __( 'More', 'tainacan-interface' ), + 'lessText' => __( 'Less', 'tainacan-interface' ), )); wp_register_style( 'tainacan_tainacanStyle', get_stylesheet_uri(), array( 'tainacan_bootstrap4CSS' ) ); diff --git a/src/functions/single-functions.php b/src/functions/single-functions.php index dcb7210..9aadf55 100644 --- a/src/functions/single-functions.php +++ b/src/functions/single-functions.php @@ -24,11 +24,11 @@ function tainacan_comments_callback( $comment, $args, $depth ) {

@@ -137,9 +137,7 @@ function tainacan_social_meta() { -
- \ No newline at end of file + diff --git a/src/tainacan/single-items.php b/src/tainacan/single-items.php index c68f5d3..b45feb0 100644 --- a/src/tainacan/single-items.php +++ b/src/tainacan/single-items.php @@ -119,7 +119,7 @@ diff --git a/src/template-parts/header-social-share.php b/src/template-parts/header-social-share.php index 8021763..3e9eaba 100644 --- a/src/template-parts/header-social-share.php +++ b/src/template-parts/header-social-share.php @@ -24,7 +24,7 @@
- +
diff --git a/src/template-parts/headercollection.php b/src/template-parts/headercollection.php index 4a84366..1555ea4 100644 --- a/src/template-parts/headercollection.php +++ b/src/template-parts/headercollection.php @@ -70,7 +70,7 @@ echo '';
- +
@@ -102,4 +102,4 @@ echo '';
- \ No newline at end of file + diff --git a/src/template-parts/single-post.php b/src/template-parts/single-post.php index 35c3130..1b7daf4 100644 --- a/src/template-parts/single-post.php +++ b/src/template-parts/single-post.php @@ -12,7 +12,7 @@ - +