📁 File Manager Pro
v10.0.3 | PHP: 8.1.34
Server: LiteSpeed
2026-06-28 15:49:57
📂
/ (Root)
/
home
/
apkbfjox
/
joygame.com.pk
/
wp-content
/
plugins
/
kadence-pro
/
dist
/
advanced-pages
/
src
📍 /home/apkbfjox/joygame.com.pk/wp-content/plugins/kadence-pro/dist/advanced-pages/src
🔄 Refresh
✏️
Editing: admin-activate.js
Writable
/** * Ajax install the Theme Plugin * */ (function($, window, document, undefined){ "use strict"; $(function(){ $('.kc-install-blocks-btn').on( 'click', function( event ) { var $button = $( event.target ); event.preventDefault(); /** * Keep button from running twice */ if ( $button.hasClass( 'updating-message' ) || $button.hasClass( 'button-disabled' ) ) { return; } /** * Install a plugin * * @return void */ function installPlugin(){ $.ajax({ url : $button.data('install-url'), type: 'GET', data: {}, beforeSend: function () { buttonStatusInProgress( $button.data('installing-label') ); }, success: function( reposnse ) { buttonStatusInstalled( $button.data('installed-label') ); activatePlugin(); }, error: function (xhr, ajaxOptions, thrownError) { // Installation failed buttonStatusDisabled( 'Error' ); } }); } /** * Activate a plugin * * @return void */ function activatePlugin(){ $.ajax({ url : $button.data('activate-url'), type: 'GET', data: {}, beforeSend: function () { buttonStatusInProgress( $button.data('activating-label') ); }, success: function( reposnse ) { buttonStatusDisabled( $button.data('activated-label') ); location.replace( $button.data('redirect-url') ); }, error: function (xhr, ajaxOptions, thrownError) { // Activation failed console.log( xhr.responseText ); buttonStatusDisabled( 'Error' ); } }); } /** * Change button status to in-progress * * @return void */ function buttonStatusInProgress( message ){ $button.addClass('updating-message').removeClass('button-disabled kt-not-installed installed').text( message ); } /** * Change button status to disabled * * @return void */ function buttonStatusDisabled( message ){ $button.removeClass('updating-message kt-not-installed installed') .addClass('button-disabled') .text( message ); } /** * Change button status to installed * * @return void */ function buttonStatusInstalled( message ){ $button.removeClass('updating-message kt-not-installed') .addClass('installed') .text( message ); } if( $button.data('action') === 'install' ){ installPlugin(); } else if( $button.data('action') === 'activate' ){ activatePlugin(); } }); }); })(jQuery, window, document);
💾 Save Changes
❌ Cancel