Fixed theme sniffer to Wordpress Core

This commit is contained in:
Fabiano 2018-10-05 11:16:00 -03:00
parent 2b2bb08390
commit 4550ec8701
11 changed files with 52 additions and 55 deletions

View File

@ -16,11 +16,10 @@
minimized_elements.each(function(){ minimized_elements.each(function(){
var t = $( this ).text(); var t = $( this ).text();
if(t.length < config.minChars) return; if (t.length < config.minChars) { return };
$( this ).html( $( this ).html(
t.slice(0,config.showChars)+'<span>'+ config.ellipsesText +' </span><a href="#" class="tainacan-interface-more">[ '+ config.moreText +' ]</a>'+ t.slice( 0,config.showChars ) + '<span>' + config.ellipsesText + ' </span><a href="#" class="tainacan-interface-more">[ ' + config.moreText + ' ]</a>' + '<span style="display:none;">' + t.slice( config.showChars,t.length ) + ' <a href="#" class="tainacan-interface-less">[ ' + config.lessText + ' ]</a></span>'
'<span style="display:none;">'+ t.slice(config.showChars,t.length)+' <a href="#" class="tainacan-interface-less">[ '+ config.lessText +' ]</a></span>'
); );
}); });

View File

@ -21,12 +21,12 @@ class TainacanThemeCollectionColor {
wp_enqueue_script( 'tainacan_colorWell', get_template_directory_uri() . '/functions/collection-color.js', false, false, true ); 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_enqueue_style( 'tainacan_colorWellStyle', get_template_directory_uri() . '/functions/collection-color.css' );
wp_localize_script( 'tainacan_colorWell', 'tainacan_colorPickerVars', array( wp_localize_script( 'tainacan_colorWell', 'tainacan_colorPickerVars', array(
'cancelText' => __("cancel", 'tainacan-interface'), 'cancelText' => __( 'cancel', 'tainacan-interface' ),
'chooseText' => __("choose", 'tainacan-interface'), 'chooseText' => __( 'choose', 'tainacan-interface' ),
'togglePaletteMoreText' => __("more", 'tainacan-interface'), 'togglePaletteMoreText' => __( 'more', 'tainacan-interface' ),
'togglePaletteLessText' => __("less", 'tainacan-interface'), 'togglePaletteLessText' => __( 'less', 'tainacan-interface' ),
'clearText' => __("Clear Color Selection", 'tainacan-interface'), 'clearText' => __( 'Clear Color Selection', 'tainacan-interface' ),
'noColorSelectedText' => __("No Color Selected", '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_script( 'tainacan_Spectrum', get_template_directory_uri() . '/assets/js/spectrum.js', false, false, true );

View File

@ -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_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( wp_localize_script( 'tainacan_tainacanTruncate', 'tainacan_trucanteVars', array(
"moreText" => __('More', 'tainacan-interface'), 'moreText' => __( 'More', 'tainacan-interface' ),
"lessText" => __('Less', 'tainacan-interface') 'lessText' => __( 'Less', 'tainacan-interface' ),
)); ));
wp_register_style( 'tainacan_tainacanStyle', get_stylesheet_uri(), array( 'tainacan_bootstrap4CSS' ) ); wp_register_style( 'tainacan_tainacanStyle', get_stylesheet_uri(), array( 'tainacan_bootstrap4CSS' ) );

View File

@ -137,9 +137,7 @@ function tainacan_social_meta() {
<meta property="og:image:height" content="<?php echo $image['height']; ?>"/> <meta property="og:image:height" content="<?php echo $image['height']; ?>"/>
<?php } else { <?php } else { return; } // End if().
return;
} // End if().
} }
add_action( 'wp_head', 'tainacan_social_meta', 5 ); add_action( 'wp_head', 'tainacan_social_meta', 5 );