- WordPress core y plugins - Tema Twenty Twenty-Four configurado - Plugin allow-unfiltered-html.php simplificado - .gitignore configurado para excluir wp-config.php y uploads 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
44 lines
1.2 KiB
PHP
Executable File
44 lines
1.2 KiB
PHP
Executable File
<?php echo 'function(trigger, action, config) {'; ?>
|
|
var $element = jQuery( this ),
|
|
$at = $element.closest( '.tcb-col, .thrv_wrapper' );
|
|
if ( $at.length === 0 ) {
|
|
$at = $element;
|
|
}
|
|
if ( ! config.loop && $at.data( 'a-done' ) ) {
|
|
return;
|
|
}
|
|
$at.data( 'a-done', 1 );
|
|
const hadAnimStart = $at.hasClass( 'tve_anim_start' );
|
|
$at.removeClass( function ( i, cls ) {
|
|
return cls.split( ' ' ).filter( function ( item ) {
|
|
return item.indexOf( 'tve_anim_' ) === 0;
|
|
} ).join( ' ' );
|
|
} ).addClass( 'tve_anim_' + config.anim ).removeClass( 'tve_anim_start' );
|
|
if ( config.loop ) {
|
|
setTimeout( function () {
|
|
$at.addClass( 'tve_anim_start' );
|
|
}, hadAnimStart ? 50 : 0 );
|
|
if ( trigger === 'mouseover' ) {
|
|
$element.one( 'mouseleave', function () {
|
|
$at.removeClass( 'tve_anim_start' );
|
|
} );
|
|
}
|
|
if ( trigger === 'tve-viewport' ) {
|
|
$element.one( 'tve-viewport-leave', function () {
|
|
/**
|
|
* double check for viewport
|
|
* animation in animation triggers weird behaviors
|
|
*/
|
|
if ( ! TCB_Front.isInViewport( $element ) ) {
|
|
$at.removeClass( 'tve_anim_start' );
|
|
}
|
|
} );
|
|
}
|
|
} else {
|
|
setTimeout( function () {
|
|
$at.addClass( 'tve_anim_start' );
|
|
}, 50 );
|
|
}
|
|
return false;
|
|
<?php echo '}'; ?>
|