Files
roi-theme/wp-content/plugins/thrive-visual-editor/thrive-dashboard/inc/plugin-updates/js/themes-switch-stable.js
root a22573bf0b 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>
2025-11-03 21:04:30 -06:00

40 lines
852 B
JavaScript
Executable File

( function ( $ ) {
$( function () {
var $div = $( '.theme-overlay' ),
html = $div.html();
setInterval( function () {
var newhtml = $div.html();
if ( html !== newhtml ) {
checkForThriveTheme();
html = newhtml;
}
}, 500 );
if ( $( '.theme-overlay .theme-name' ).text().includes( TVD_STABLE_THEME.name ) ) {
checkForThriveTheme();
}
/**
* Checks if the active theme is ThriveTheme
*/
function checkForThriveTheme() {
if ( tvdIsThriveTheme() && $( '.tvd-switch-stable-theme' ).length === 0 ) {
$( '.theme-wrap' ).find( '.theme-actions' ).append( TVD_STABLE_THEME.link_html );
}
}
/**
* Checks if the theme in the lightbox is the thrive-theme
*
* @returns {boolean}
*/
function tvdIsThriveTheme() {
return location.search.includes( 'thrive-theme' );
}
} );
} )( jQuery );