Commit inicial - WordPress Análisis de Precios Unitarios

- 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>
This commit is contained in:
root
2025-11-03 21:04:30 -06:00
commit a22573bf0b
24068 changed files with 4993111 additions and 0 deletions

View File

@@ -0,0 +1,43 @@
<?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 '}'; ?>

View File

@@ -0,0 +1,21 @@
<div class="animation-container">
<label for="anim-animation"><?php esc_html_e( 'Animation', 'thrive-cb' ) ?></label>
<select class="change" data-fn="select" id="anim-animation">
<?php foreach ( $data as $key => $group ) : ?>
<optgroup label="<?php echo esc_attr( $group['title'] ) ?>">
<?php foreach ( $group['items'] as $k => $item ) : ?>
<option data-default="<?php echo in_array( 'tve-viewport', $item['trigger'] ) ? 1 : 0 ?>"
data-hover="<?php echo in_array( 'mouseover', $item['trigger'] ) ? 1 : 0 ?>"
value="<?php echo esc_attr( $k ) ?>"
label="<?php echo esc_attr( $item['title'] ) ?>"><?php echo esc_html( $item['title'] ) ?></option>
<?php endforeach ?>
</optgroup>
<?php endforeach ?>
</select>
</div>
<div class="sep"></div>
<div class="trigger-container" id="anim-trigger" style="display: none">
<label for="animation-trigger"><?php echo esc_html__( 'Animation Trigger', 'thrive-cb' ) ?></label>
<select id="animation-trigger" class="change tcb-select" data-fn="change_trigger"></select>
</div>
<label class="tcb-checkbox"><input type="checkbox" class="anim-loop tcb-checkbox"><span><?php esc_html_e( 'Loop animation', 'thrive-cb' ) ?></span></label>

View File

@@ -0,0 +1,15 @@
<div class="inline-checkboxes">
<label class="tcb-checkbox">
<input type="checkbox" class="change" data-fn="extraSettingsChanged" data-elem-attr="data-autoplay" data-elem-attr-val="1" data-elem-attr-val-unchecked="0"><span><?php echo esc_html__( 'Autoplay', 'thrive-cb' ) ?></span>
</label>
</div>
<div class="inline-checkboxes">
<label class="tcb-checkbox">
<input type="checkbox" class="change" data-fn="extraSettingsChanged" data-elem-attr="loop" data-elem-attr-val="1" data-elem-attr-val-unchecked="0"><span><?php echo esc_html__( 'Loop', 'thrive-cb' ) ?></span>
</label>
</div>
<div class="inline-checkboxes">
<label class="tcb-checkbox">
<input type="checkbox" class="change" data-fn="extraSettingsChanged" data-elem-attr="no-download" data-elem-attr-val="0" data-elem-attr-val-unchecked="1"><span><?php echo esc_html__( 'Allow Users to Download', 'thrive-cb' ) ?>&nbsp;<span class="click" data-fn="openDownloadTooltip"><?php tcb_icon( 'info-circle-solid' ); ?></span></span>
</label>
</div>

View File

@@ -0,0 +1,5 @@
<div class="control-grid full-width">
<label for="a-custom-url">URL</label>
<input type="text" data-setting="url" class="click audio-url tve_provider_url" data-fn="changeCustom" id="a-custom-url" placeholder="e.g. https://my-url.com">
</div>
<div class="url-validate inline-message"></div>

View File

@@ -0,0 +1,15 @@
<div class="inline-checkboxes">
<label class="tcb-checkbox">
<input type="checkbox" class="change" data-fn="extraSettingsChanged" data-elem-attr="auto_play" data-elem-attr-val="1" data-elem-attr-val-unchecked="0"><span><?php echo esc_html__( 'Autoplay', 'thrive-cb' ) ?></span>
</label>
</div>
<div class="inline-checkboxes">
<label class="tcb-checkbox">
<input type="checkbox" class="change" data-fn="extraSettingsChanged" data-elem-attr="show_artwork" data-elem-attr-val="false" data-elem-attr-val-unchecked="true"><span><?php echo esc_html__( 'Do not show artwork', 'thrive-cb' ) ?></span>
</label>
</div>
<div class="inline-checkboxes">
<label class="tcb-checkbox">
<input type="checkbox" class="change" data-fn="extraSettingsChanged" data-elem-attr="show_user" data-elem-attr-val="false" data-elem-attr-val-unchecked="true"><span><?php echo esc_html__( 'Do not show user', 'thrive-cb' ) ?></span>
</label>
</div>

View File

@@ -0,0 +1,5 @@
<div class="control-grid full-width">
<label for="a-soundcloud-url">URL</label>
<input type="text" data-setting="url" class="change audio-url tve_provider_url" data-fn="changeInput" id="a-soundcloud-url" placeholder="e.g. https://soundcloud.com/djmartindus/dancehall-party-march-2019">
</div>
<div class="url-validate inline-message"></div>

View File

@@ -0,0 +1,5 @@
<div class="control-grid full-width">
<label for="a-spotify-url">URL</label>
<input type="text" data-setting="url" class="change audio-url tve_provider_url" data-fn="changeInput" id="a-spotify-url" placeholder="e.g. https://open.spotify.com/album/60GMfKsppuyvSG36HurCMz">
</div>
<div class="url-validate inline-message"></div>

View File

@@ -0,0 +1,7 @@
<?php echo 'function(trigger,action,config){' ?>
const closeButtons = ThriveGlobal.$j( '.tve_p_lb_close' );
closeButtons.each( ( index, button ) => {
button.click();
} );
<?php echo 'return false;}';

View File

@@ -0,0 +1,184 @@
<?php echo 'function(trigger,action,config){' ?>
var $target = jQuery( this ),
offset = $target.offset(),
target_w = $target.outerWidth(),
target_h = $target.outerHeight(),
$element = $target,
sameImage = ( config.url && $element.attr( 'src' ) && $element.attr( 'src' ) === config.url ) || ( config.id && $element.attr( 'data-id' ) && $element.attr( 'data-id' ) == config.id );
if ( config.id ) {
$fullSize = jQuery( "#tcb-image-zoom-" + config.id + " img" );
if ( $fullSize.length ) {
$element = $fullSize;
}
}
/* If it is the same img but set from Anim&Action work like Open full size image on click*/
if ( ! sameImage || ( sameImage && config.sizeChanged ) ) {
if ( config.id ) {
$element = jQuery( "#tcb-image-zoom-" + config.id + " img" )
} else if ( $element.find( "img" ).length ) {
$element = $element.find( "img" )
}
}
$element = $element.first();
var imageSrc = $element.attr( "data-opt-src" ) || $element.attr( "src" ),
imgAlt = $target.attr( 'alt' ) || '',
$lightbox = jQuery( '#tve_zoom_lightbox' ),
$overlay = jQuery( '#tve_zoom_overlay' ),
windowWidth = window.innerWidth,
windowHeight = window.innerHeight,
img_size = $element.data( "tve-zoom-clone" ),
resizeScale = windowWidth < 600 ? 0.8 : 0.9;
if ( imageSrc.indexOf( 'data:image' ) !== - 1 && $element.attr( 'data-src' ) ) {
imageSrc = $element.attr( 'data-src' );
}
/**
* Force lazy load of the image
*/
if ( window.lazySizes ) {
lazySizes.loader.unveil( $element[ 0 ] );
}
if ( typeof img_size === 'undefined' ) {
var $clone = $element.clone()
.css( {
position: "absolute",
width: "",
height: "",
left: "-8000px",
top: "-8000px"
} ).removeAttr( "width height" );
$clone.appendTo( "body" );
/**
* `.one()` ensures this will not get executed multiple times.
*/
$clone.one( 'load', function () {
var $parent = $element.parent(),
height = parseFloat( $element.attr( 'data-init-height' ) ) || parseFloat( $element.attr( 'height' ) || $element.height() ),
width = parseFloat( $element.attr( 'data-init-width' ) ) || parseFloat( $element.attr( 'width' ) || $element.width() );
/**
* If we cant get the size try to make the parent visible until we get img props
*/
if ( ! ( height && width ) ) {
$parent.css( {display: 'block', visibility: 'hidden'} );
height = $element.height();
width = $element.width();
$parent.css( {display: 'none', visibility: ''} );
}
img_size = {
"originalWidth": width,
"width": width,
"originalHeight": height,
"height": height
};
if ( img_size.originalWidth > windowWidth * resizeScale || img_size.originalHeight > windowHeight * resizeScale ) {
var widthPercent = img_size.originalWidth / windowWidth,
heightPercent = img_size.originalHeight / windowHeight;
img_size.width = ( ( widthPercent > heightPercent ) ? ( windowWidth * resizeScale ) : ( windowHeight * resizeScale * ( img_size.originalWidth / img_size.originalHeight ) ) );
img_size.height = ( ( widthPercent > heightPercent ) ? ( windowWidth * resizeScale * ( img_size.originalHeight / img_size.originalWidth ) ) : ( windowHeight * resizeScale ) );
img_size.width += 30;
img_size.height += 30;
}
$element.data( "tve-zoom-clone", img_size );
show_lightbox();
} );
/**
* Firefox doesnt trigger load event for the clone when is open full size image
*/
if ( TCB_Front.browser.mozilla && ( sameImage || typeof sameImage === 'undefined' ) ) {
$clone.trigger( 'load' );
} else if ( imageSrc.includes( '.optimole.com/' ) ) {
/**
* Optimole w/ lazy-load will actually trigger loading of this image URL earlier.
* Image is already loaded at this point. Just need to trigger the load event manually
*/
$clone.trigger( 'load' );
} else {
/**
* Finally, some failsafe mechanism, trigger the load event with a delay. There have been cases reported where it does not "always" work.
*/
setTimeout( function () {
$clone.trigger( 'load' );
}, 500 );
}
} else {
show_lightbox();
}
function show_lightbox() {
if ( $lightbox.length ) {
$lightbox.show();
} else {
$lightbox = jQuery( "<div id='tve_zoom_lightbox'><div class='tve_close_lb thrv-svg-icon'>" + TCB_Front.icons.get('cross') + "</div><div id='tve_zoom_image_content'></div></div>" )
.appendTo( 'body' );
$overlay = jQuery( "<div id='tve_zoom_overlay'></div>" ).hide()
.appendTo( 'body' );
var tve_close_lb = function () {
$lightbox.hide();
$overlay.hide();
};
/* set listeners for closing the lightbox */
jQuery( document ).on( "click", ".tve_close_lb", tve_close_lb );
jQuery( document ).on( "click", "#tve_zoom_overlay", tve_close_lb );
jQuery( document ).on( "keyup", function ( e ) {
if ( e.keyCode == 27 ) {
tve_close_lb();
}
} );
jQuery( window ).resize( function () {
var _sizes = $lightbox.data( "data-sizes" ),
windowWidth = window.innerWidth,
windowHeight = window.innerHeight,
resizeScale = windowWidth < 600 ? 0.8 : 0.9;
if ( _sizes.originalWidth > windowWidth * resizeScale || _sizes.originalHeight > windowHeight * resizeScale ) {
var widthPercent = _sizes.originalWidth / windowWidth,
heightPercent = _sizes.originalHeight / windowHeight;
_sizes.width = ( ( widthPercent > heightPercent ) ? ( windowWidth * resizeScale ) : ( windowHeight * resizeScale * ( _sizes.originalWidth / _sizes.originalHeight ) ) );
_sizes.height = ( ( widthPercent > heightPercent ) ? ( windowWidth * resizeScale * ( _sizes.originalHeight / _sizes.originalWidth ) ) : ( windowHeight * resizeScale ) );
}
$lightbox.width( _sizes.width );
$lightbox.css( "margin-left", - ( _sizes.width + 30 ) / 2 );
$lightbox.css( "margin-top", - ( _sizes.height + 30 ) / 2 );
} );
}
$lightbox.data( "data-sizes", img_size );
jQuery( "#tve_zoom_image_content" ).html( "<img src='" + imageSrc + "' alt='" + imgAlt + "'/>" );
$lightbox.css( {
left: offset.left + target_w / 2,
top: offset.top + target_h / 2,
marginLeft: 0,
marginTop: 0,
width: 0,
opacity: 0
} ).animate( {
opacity: 1,
left: '50%',
top: '50%',
marginLeft: - ( img_size.width + 30 ) / 2,
marginTop: - ( img_size.height + 30 ) / 2,
width: img_size.width
}, 150 );
$overlay.fadeIn( 150 );
}
<?php echo 'return false;}';

View File

@@ -0,0 +1,11 @@
<div id="lb-container"></div>
<div class="control-grid no-space">
<label for="lb-animation"><?php echo esc_html__( 'Animation', 'thrive-cb' ) ?></label>
<div class="input">
<select id="lb-animation">
<?php foreach ( $data as $k => $s ) : ?>
<option value="<?php echo esc_attr( $k ) ?>"><?php echo esc_html( $s ) ?></option>
<?php endforeach ?>
</select>
</div>
</div>

View File

@@ -0,0 +1,14 @@
<div class="row middle-xs">
<div class="col col-xs-10">
<?php echo esc_html__( 'Insert / edit hyperlink', 'thrive-cb' ) ?>
</div>
<div class="col col-xs-2 tcb-text-right">
<span class="click" data-fn="open_settings">
<?php tcb_icon( 'settings' ) ?>
</span>
</div>
</div>
<div id="a-link-main"></div>
<label class="tcb-checkbox"><input type="checkbox" class="change target" data-fn="attr" data-attr="target" value="_blank"><span><?php echo esc_html__( 'Open in new tab', 'thrive-cb' ) ?></span></label>
<label class="tcb-checkbox"><input type="checkbox" class="change rel" data-fn="attr" data-attr="rel" value="nofollow"><span><?php echo esc_html__( 'Set link as nofollow', 'thrive-cb' ) ?></span></label>

View File

@@ -0,0 +1,6 @@
<?php $reset_url = network_site_url( "wp-login.php?action=rp&key=$key&login=" . rawurlencode( $user->user_login ), 'login' ); ?>
<p><?php echo esc_html__( 'Someone has requested a password reset for the following account:', 'thrive-cb' ); ?></p>
<p><?php echo sprintf( esc_html__( 'Site Name: %s', 'thrive-cb' ), esc_html( $site_name ) ); ?></p>
<p><?php echo sprintf( esc_html__( 'Username: %s', 'thrive-cb' ), esc_html( $user->user_login ) ); ?></p>
<p><?php echo esc_html__( 'If this was a mistake, just ignore this email and nothing will happen.', 'thrive-cb' ); ?></p>
<p><?php echo esc_html__( 'To reset your password, visit the following address:', 'thrive-cb' ); ?> <a href="<?php echo esc_url( $reset_url ) ?>"><?php echo esc_html( $reset_url ) ?></a></p>

View File

@@ -0,0 +1,6 @@
<div class="control-grid full-width tcb-bn-url">
<label for="v-bn-url">URL <span class="click tve-bunnynet-info ml-5" data-paneltlt-hover data-fn="openTooltip"><?php tcb_icon( 'info-circle-solid' ); ?></span></label>
<input type="text" data-setting="url" class="bn-url tve_provider_url" id="v-bn-url" placeholder="e.g. https://video.bunnycdn.com/play/{library-id}/{video-id}">
</div>
<div class="bunnynet-url-validate inline-message"></div>

View File

@@ -0,0 +1,35 @@
<?php
$settings = array(
array(
'setting' => 'autoplay',
'checked_val' => 1,
'unchecked_val' => 0,
'label' => __( 'Autoplay', 'thrive-cb' ),
'info' => true,
'info_fn' => 'openTooltip',
),
array(
'setting' => 'controls',
'checked_val' => 0,
'unchecked_val' => 1,
'label' => __( 'Hide player controls', 'thrive-cb' ),
'disable_option' => 'no-download',
'disable_option_val' => 0,
),
array(
'setting' => 'loop',
'checked_val' => 1,
'unchecked_val' => 0,
'label' => __( 'Loop', 'thrive-cb' ),
),
array(
'setting' => 'no-download',
'checked_val' => 0,
'unchecked_val' => 1,
'label' => __( 'Allow users to download', 'thrive-cb' ),
),
);
foreach ( $settings as $setting ) {
tcb_template( 'actions/responsive-video-providers/provider-extra', $setting );
}

View File

@@ -0,0 +1 @@
<div class="extra-settings"></div>

View File

@@ -0,0 +1,27 @@
<?php
$settings = array(
array(
'setting' => 'autoplay',
'checked_val' => 1,
'unchecked_val' => 0,
'label' => __( 'Autoplay', 'thrive-cb' ),
'info' => true,
'info_fn' => 'openTooltip',
),
array(
'setting' => 'controls',
'checked_val' => 0,
'unchecked_val' => 1,
'label' => __( 'Hide player controls', 'thrive-cb' ),
),
array(
'setting' => 'loop',
'checked_val' => 1,
'unchecked_val' => 0,
'label' => __( 'Loop', 'thrive-cb' ),
),
);
foreach ( $settings as $setting ) {
tcb_template( 'actions/responsive-video-providers/provider-extra', $setting );
}

View File

@@ -0,0 +1,5 @@
<div class="control-grid full-width">
<label for="v-eh-url">URL</label>
<input type="text" data-setting="url" class="eh-url tve_provider_url" id="v-eh-url" placeholder="e.g. https://www.domain.com/video.extension">
</div>
<div class="eh-url-validate inline-message"></div>

View File

@@ -0,0 +1,38 @@
<?php
/**
* Thrive Themes - https://thrivethemes.com
*
* @package thrive-visual-editor
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Silence is golden!
}
if ( empty( $data ) || ! is_array( $data ) ) {
return;
}
?>
<div class="control-grid switch" data-setting="<?php echo esc_attr( $data['setting'] ); ?>">
<div class="fill">
<span class="switch-label"><?php echo esc_html( $data['label'] ); ?></span>
<?php if ( ! empty( $data['info'] ) ): ?>
<span class="click tve-switch-info" data-fn="<?php echo esc_attr( $data['info_fn'] ); ?>" data-paneltlt-hover><?php tcb_icon( 'info-circle-solid' ); ?></span>
<?php endif; ?>
</div>
<div class="tcb-switch">
<label>
<input type="checkbox" class="change"
data-fn="extra_settings_changed"
data-elem-attr="<?php echo esc_attr( $data['setting'] ); ?>"
data-elem-attr-val="<?php echo esc_attr( $data['checked_val'] ); ?>"
data-elem-attr-val-unchecked="<?php echo esc_attr( $data['unchecked_val'] ); ?>"
<?php if ( ! empty( $data['disable_option'] ) ) : ?>
data-disable-option="<?php echo esc_attr( $data['disable_option'] ); ?>"
data-disable-value="<?php echo esc_attr( $data['disable_option_val'] ); ?>"
<?php endif; ?>
>
<span class="tcb-lever"></span>
</label>
</div>
</div>

View File

@@ -0,0 +1,33 @@
<?php
$settings = array(
array(
'setting' => 'autoplay',
'checked_val' => 1,
'unchecked_val' => 0,
'label' => __( 'Autoplay', 'thrive-cb' ),
'info' => true,
'info_fn' => 'openTooltip',
),
array(
'setting' => 'modestbranding',
'checked_val' => 0,
'unchecked_val' => 1,
'label' => __( 'Hide logo', 'thrive-cb' ),
),
array(
'setting' => 'showinfo',
'checked_val' => 0,
'unchecked_val' => 1,
'label' => __( 'Hide title bar', 'thrive-cb' ),
),
array(
'setting' => 'byline',
'checked_val' => 0,
'unchecked_val' => 1,
'label' => __( 'Hide byline', 'thrive-cb' ),
),
);
foreach ( $settings as $setting ) {
tcb_template( 'actions/responsive-video-providers/provider-extra', $setting );
}

View File

@@ -0,0 +1,13 @@
<div class="control-grid wrap">
<label for="v-v-url">
<?php echo esc_html__( 'URL', 'thrive-cb' ) ?>
</label>
<input type="text" data-setting="url" class="v-url tve_provider_url full-width" id="v-v-url" placeholder="e.g. https://vimeo.com/22676965">
</div>
<div class="inline-message"></div>
<div class="control-grid wrap no-space">
<label>
<?php echo esc_html__( 'Player color', 'thrive-cb' ) ?>
</label>
<div class="tcb-text-right v-setting-color full-width"></div>
</div>

View File

@@ -0,0 +1,7 @@
<div class="control-grid wrap">
<label for="v-v-url">
<?php echo esc_html__( 'URL', 'thrive-cb' ) ?>
</label>
<input type="text" data-setting="url" class="v-url tve_provider_url full-width" id="v-v-url" placeholder="e.g. https://domain.vooplayer.com/22676965">
</div>
<div class="vooplayer-url-validate inline-message"></div>

View File

@@ -0,0 +1,27 @@
<?php
$settings = array(
array(
'setting' => 'autoplay',
'checked_val' => 1,
'unchecked_val' => 0,
'label' => __( 'Autoplay', 'thrive-cb' ),
'info' => true,
'info_fn' => 'openTooltip',
),
array(
'setting' => 'play-bar',
'checked_val' => 0,
'unchecked_val' => 1,
'label' => __( 'Disable Playbar', 'thrive-cb' ),
),
array(
'setting' => 'fs',
'checked_val' => 0,
'unchecked_val' => 1,
'label' => __( 'Hide full-screen button', 'thrive-cb' ),
),
);
foreach ( $settings as $setting ) {
tcb_template( 'actions/responsive-video-providers/provider-extra', $setting );
}

View File

@@ -0,0 +1,13 @@
<div class="control-grid wrap">
<label for="v-w-url">
<?php echo esc_html__( 'URL', 'thrive-cb' ) ?>
</label>
<input type="text" data-setting="url" class="w-url tve_provider_url fill" id="v-w-url" placeholder="e.g. http://fast.wistia.net/embed/iframe/pestdpyl7m">
</div>
<div class="inline-message"></div>
<div class="control-grid wrap no-space">
<label>
<?php echo esc_html__( 'Player color', 'thrive-cb' ) ?>
</label>
<div class="tcb-text-right v-setting-color full-width"></div>
</div>

View File

@@ -0,0 +1,49 @@
<?php
$settings = array(
array(
'setting' => 'autoplay',
'checked_val' => 1,
'unchecked_val' => 0,
'label' => __( 'Autoplay', 'thrive-cb' ),
'info' => true,
'info_fn' => 'openTooltip',
),
array(
'setting' => 'no-cookie',
'checked_val' => 1,
'unchecked_val' => 0,
'label' => __( 'Disable YouTube cookies', 'thrive-cb' ),
'info' => true,
'info_fn' => 'cookieTooltip',
),
array(
'setting' => 'rel',
'checked_val' => 0,
'unchecked_val' => 1,
'label' => __( 'Optimize related videos', 'thrive-cb' ),
),
array(
'setting' => 'controls',
'checked_val' => 0,
'unchecked_val' => 1,
'label' => __( 'Hide player controls', 'thrive-cb' ),
'disable_option' => 'modestbranding,fs',
'disable_option_val' => 0,
),
array(
'setting' => 'fs',
'checked_val' => 0,
'unchecked_val' => 1,
'label' => __( 'Hide full-screen', 'thrive-cb' ),
),
array(
'setting' => 'modestbranding',
'checked_val' => 1,
'unchecked_val' => 0,
'label' => __( 'Hide logo', 'thrive-cb' ),
),
);
foreach ( $settings as $setting ) {
tcb_template( 'actions/responsive-video-providers/provider-extra', $setting );
}

View File

@@ -0,0 +1,5 @@
<div class="control-grid full-width">
<label for="v-yt-url">URL</label>
<input type="text" data-setting="url" class="yt-url tve_provider_url" id="v-yt-url" placeholder="e.g. https://www.youtube.com/watch?v=oJ440S7gTBU">
</div>
<div class="yt-url-validate inline-message"></div>

View File

@@ -0,0 +1,63 @@
<?php echo 'function(trigger,action,config){' ?>
if ( ! config.event_tooltip_text ) {
return false;
}
ThriveGlobal.$j( '.tve_ui_tooltip' ).remove();
var base = ThriveGlobal.$j( '<div></div>', {
'class': 'tve_ui_tooltip tve_tooltip_style_' + config.event_tooltip_style + ' tve_tooltip_position_' + config.event_tooltip_position
} );
base.text( config.event_tooltip_text )
.appendTo( 'body' );
var tooltip_width = base.outerWidth(),
tooltip_height = base.outerHeight(),
offset = 10,
top = 0,
left = 0;
var rect = this.getBoundingClientRect();
switch ( config.event_tooltip_position ) {
case 'top':
left = (rect.right - rect.left - tooltip_width ) / 2 + rect.left;
top = rect.top - tooltip_height - offset;
break;
case 'top_right':
left = rect.right + offset;
top = rect.top - tooltip_height - offset;
break;
case 'right':
left = rect.right + offset;
top = ( rect.bottom - rect.top - tooltip_height ) / 2 + rect.top;
break;
case 'bottom_right':
left = rect.right + offset;
top = rect.bottom + offset;
break;
case 'bottom':
left = ( rect.right - rect.left - tooltip_width ) / 2 + rect.left;
top = rect.bottom + offset;
break;
case 'bottom_left':
left = rect.left - tooltip_width - offset;
top = rect.bottom + offset;
break;
case 'left':
left = rect.left - tooltip_width - offset;
top = (rect.bottom - rect.top - tooltip_height ) / 2 + rect.top;
break;
case 'top_left':
left = rect.left - tooltip_width - offset;
top = rect.top - tooltip_height - offset;
break;
default:
left = 1;
top = 1;
break;
}
base.css( {
top: top + 'px',
left: left + 'px'
} );
ThriveGlobal.$j( this ).on( 'mouseleave', function () {
ThriveGlobal.$j( '.tve_ui_tooltip' ).remove();
} );
<?php echo 'return false;}';

View File

@@ -0,0 +1,18 @@
<label for="e-tooltip-text" class="panel-text"><?php echo esc_html__( 'Show Tooltip on Hover', 'thrive-cb' ) ?></label>
<input type="text" class="change" data-fn="text" placeholder="<?php echo esc_attr__( 'Tooltip text', 'thrive-cb' ) ?>" id="e-tooltip-text">
<div class="mt-5">
<label for="e-tooltip-position" class="panel-text"><?php echo esc_html__( 'Tooltip direction', 'thrive-cb' ) ?></label>
<select id="e-tooltip-position" class="change" data-fn="pos">
<?php foreach ( $data['positions'] as $direction => $title ) : ?>
<option label="<?php echo esc_attr( $title ) ?>" value="<?php echo esc_attr( $direction ) ?>"><?php echo esc_html( $title ) ?></option>
<?php endforeach; ?>
</select>
</div>
<div class="mt-5">
<label for="tooltip-style" class="panel-text"><?php echo esc_html__( 'Style', 'thrive-cb' ) ?></label>
<select class="change t-style" data-fn="style" id="tooltip-style">
<?php foreach ( $data['styles'] as $k => $s ) : ?>
<option value="<?php echo esc_attr( $k ) ?>"><?php echo esc_html( $s ) ?></option>
<?php endforeach ?>
</select>
</div>

View File

@@ -0,0 +1,112 @@
<?php echo 'function(trigger,action,config){' ?>
if ( ! config || ! config.p || ! config.p.id ) {
return false;
}
if ( config.s === 'wistia' ) {
if ( ! window.tcb_w_videos || ! window.tcb_w_videos[ config.p.id ] ) {
return false;
}
var _v = window.tcb_w_videos[ config.p.id ];
if ( config.p.a ) {
_v.play();
}
_v.popover.show();
return false;
}
/* SUPP-10584 - Some ids include = and we need to escape it to not break the html */
var $target = ThriveGlobal.$j( '#tcb-video-popup-' + config.p.id.toString().replace( /=/g, '\\\=' ) ),
$overlay = ThriveGlobal.$j( '#tcb-video-popup-overlay' ),
$body = ThriveGlobal.$j( 'body,html' ),
$document = ThriveGlobal.$j( document ),
width = $target.outerWidth(),
height = $target.outerHeight();
/**
* Adding this class to make the video responsive
*/
if ( config.p.vertical ) {
$target.find( '.tve_responsive_video_container' ).addClass( 'tve_responsive_vertical_video_container' );
}
if ( ! $overlay.length ) {
$overlay = ThriveGlobal.$j( '<div id="tcb-video-popup-overlay" class="tcb-video-popup-overlay"><a href="javascript:void(0)" class="tcb-popup-close" style="display:none"></a></div>' ).css( {
position: 'fixed',
zIndex: 999992,
top: 0,
left: 0,
width: '100%',
height: '100%',
opacity: '0.3',
background: '#000',
display: 'none'
} ).appendTo( 'body' );
}
$overlay.fadeIn( 300 ).find( '.tcb-popup-close' ).hide();
$target.css( {
display: 'none',
visibility: '',
zIndex: 999993,
left: '50%',
top: '50%',
background: '#000',
boxShadow: '0 10px 25px rgba(0,0,0,0.5)'
} );
var $ifr = $target.find( 'iframe' ),
is_custom = false;
if ( $target.hasClass( 'tcb-custom-video' ) ) {
is_custom = true;
if ( ! $target.data( 'tcb-video-player' ) ) {
var _id = $target.find( '.wp-video-shortcode' ).attr( 'id' );
if ( typeof mejs !== 'undefined' && mejs && mejs.players && mejs.players[ _id ] ) {
$target.data( 'tcb-video-player', mejs.players[ _id ] );
} else {
$target.data( 'tcb-video-player', $target.find( 'video' )[ 0 ] );
}
}
} else if ( $ifr.length && $ifr.attr( 'data-src' ) ) {
$ifr.attr( 'src', $ifr.attr( 'data-src' ) );
}
$body.css( 'overflow', 'hidden' );
$target.show( 300, function () {
$overlay.find( '.tcb-popup-close' ).fadeIn( 200 );
if ( is_custom && config.p.a ) {
/* autoplay video */
$target.data( 'tcb-video-player' ).play();
}
} );
function close_it() {
$overlay.find( '.tcb-popup-close' ).hide();
$document.off( 'keyup.videoPopup' );
$overlay.fadeOut( 300 );
$target.hide( 300, function () {
if ( ! $ifr.attr( 'data-src' ) ) {
$ifr.attr( 'data-src', $ifr.attr( 'src' ) );
}
$ifr.removeAttr( 'src' );
if ( is_custom ) {
try {
$target.data( 'tcb-video-player' ).pause();
$target.data( 'tcb-video-player' ).setCurrentTime && $target.data( 'tcb-video-player' ).setCurrentTime( 0 );
} catch ( e ) {
console.log( 'Cannot pause video' );
}
}
} );
$body.css( 'overflow', '' );
}
$overlay.off( 'click.videoPopup' ).on( 'click.videoPopup', function () {
close_it();
} );
// Return on ESC
ThriveGlobal.$j( document ).off( 'keyup.videoPopup' ).on( 'keyup.videoPopup', function ( e ) {
if ( e.keyCode === 27 ) { // ESC key
close_it();
}
} );
return false;
<?php echo '}' ?>

View File

@@ -0,0 +1,6 @@
<div class="control-grid tcb-bn-url no-space wrap">
<label for="v-bn-url"><?php echo esc_html__( 'URL', 'thrive-cb' ) ?> <span class="tve-bunnynet-info ml-5" data-paneltlt-hover data-fn="openTooltip"><?php tcb_icon( 'info-circle-solid' ); ?></span></label>
<input type="text" data-setting="url" class="bn-url fill" id="v-bn-url">
</div>
<div class="bunnynet-url-validate inline-message"></div>

View File

@@ -0,0 +1,5 @@
<div class="extra-settings">
<div class="inline-checkboxes">
<label class="tcb-checkbox"><input type="checkbox" data-setting="a" value="1" checked="checked"><span><?php echo esc_html__( 'Autoplay', 'thrive-cb' ) ?></span></label>
</div>
</div>

View File

@@ -0,0 +1,11 @@
<div class="control-grid no-space wrap">
<label for="v-eh-url"><?php echo esc_html__( 'URL', 'thrive-cb' ) ?></label>
<input type="text" data-setting="url" class="eh-url fill" id="v-eh-url">
</div>
<div class="eh-url-validate inline-message"></div>
<div class="extra-settings">
<div class="inline-checkboxes">
<label class="tcb-checkbox"><input type="checkbox" data-setting="a" value="1" checked="checked"><span><?php echo esc_html__( 'Autoplay', 'thrive-cb' ) ?></span></label>
</div>
</div>

View File

@@ -0,0 +1,26 @@
<div class="control-grid no-space wrap">
<label for="v-v-url">
<?php echo esc_html__( 'URL', 'thrive-cb' ) ?>
</label>
<input type="text" data-setting="url" class="v-url fill" id="v-v-url">
</div>
<div class="inline-message"></div>
<div class="extra-settings">
<div class="control-grid no-space wrap">
<label>
<?php echo esc_html__( 'Player color', 'thrive-cb' ) ?>
</label>
<div class="tcb-text-right v-setting-color full-width"></div>
</div>
<div class="inline-checkboxes">
<label class="tcb-checkbox"><input type="checkbox" data-setting="a" value="1" checked="checked"><span><?php echo esc_html__( 'Autoplay', 'thrive-cb' ) ?></span></label>
<label class="tcb-checkbox"><input type="checkbox" data-setting="l" value="1"><span><?php echo esc_html__( 'Loop', 'thrive-cb' ) ?></span></label>
<label class="tcb-checkbox"><input type="checkbox" data-setting="p" value="1"><span><?php echo esc_html__( 'Show portrait', 'thrive-cb' ) ?></span></label>
<label class="tcb-checkbox"><input type="checkbox" data-setting="t" value="1"><span><?php echo esc_html__( 'Show title', 'thrive-cb' ) ?></span></label>
<label class="tcb-checkbox"><input type="checkbox" data-setting="b" value="1"><span><?php echo esc_html__( 'Show byline', 'thrive-cb' ) ?></span></label>
</div>
<span class="info-text">
<?php echo tcb_icon( 'info' ) ?>
<?php echo esc_html__( 'Title, portrait and byline are visible only when the video is stopped.' ); ?>
</span>
</div>

View File

@@ -0,0 +1,5 @@
<div class="control-grid no-space wrap">
<label for="v-v-url"><?php echo esc_html__( 'URL', 'thrive-cb' ) ?></label>
<input type="text" data-setting="url" class="v-url fill" id="v-v-url">
</div>
<div class="vooplayer-url-validate inline-message"></div>

View File

@@ -0,0 +1,18 @@
<div class="control-grid no-space wrap">
<label for="v-w-url"><?php echo esc_html__( 'URL', 'thrive-cb' ) ?></label>
<input type="text" data-setting="url" class="w-url fill" id="v-w-url">
</div>
<div class="inline-message"></div>
<div class="extra-settings">
<div class="control-grid no-space wrap">
<label>
<?php echo esc_html__( 'Player color', 'thrive-cb' ) ?>
</label>
<div class="tcb-text-right v-setting-color full-width"></div>
</div>
<div class="inline-checkboxes">
<label class="tcb-checkbox"><input type="checkbox" data-setting="a" value="1" checked="checked"><span><?php echo esc_html__( 'Autoplay', 'thrive-cb' ) ?></span></label>
<label class="tcb-checkbox"><input type="checkbox" data-setting="p" value="1"><span><?php echo esc_html__( 'Playbar', 'thrive-cb' ) ?></span></label>
<label class="tcb-checkbox"><input type="checkbox" data-setting="hfs" value="1"><span><?php echo esc_html__( 'Hide full-screen button', 'thrive-cb' ) ?></span></label>
</div>
</div>

View File

@@ -0,0 +1,16 @@
<div class="control-grid no-space wrap">
<label for="v-yt-url"><?php echo esc_html__( 'URL', 'thrive-cb' ) ?></label>
<input type="text" data-setting="url" class="yt-url fill" id="v-yt-url">
</div>
<div class="yt-url-validate inline-message"></div>
<div class="extra-settings">
<div class="inline-checkboxes">
<label class="tcb-checkbox"><input type="checkbox" class="change" data-fn="videoPopSettingChanged" data-setting="no-cookie" value="1"><span><?php echo esc_html__( 'Disable cookies on YouTube', 'thrive-cb' ) ?></span></label>
<label class="tcb-checkbox"><input type="checkbox" class="change" data-fn="videoPopSettingChanged" data-setting="a" value="1" checked="checked"><span><?php echo esc_html__( 'Autoplay', 'thrive-cb' ) ?></span></label>
<label class="tcb-checkbox"><input type="checkbox" class="change" data-fn="videoPopSettingChanged" data-setting="hrv" value="1"><span><?php echo esc_html__( 'Optimize related', 'thrive-cb' ) ?></span></label>
<label class="tcb-checkbox"><input type="checkbox" class="change" data-fn="videoPopSettingChanged" data-setting="ahi" value="1"><span><?php echo esc_html__( 'Hide player controls', 'thrive-cb' ) ?></span></label>
<label class="tcb-checkbox"><input type="checkbox" class="change" data-fn="videoPopSettingChanged" data-setting="hfs" value="1"><span><?php echo esc_html__( 'Hide full-screen', 'thrive-cb' ) ?></span></label>
<label class="tcb-checkbox"><input type="checkbox" class="change" data-fn="videoPopSettingChanged" data-setting="hyl" value="1"><span><?php echo esc_html__( 'Hide logo', 'thrive-cb' ) ?></span></label>
</div>
</div>