HEX
Server: Apache
System: Linux web5.visualcom.es 4.18.0-477.21.1.lve.1.el8.x86_64 #1 SMP Tue Sep 5 23:08:35 UTC 2023 x86_64
User: ensaco.es (10019)
PHP: 8.3.32
Disabled: opcache_get_status
Upload Files
File: /var/www/vhosts/ensaco.es/httpdocs/wp-content/plugins/bb-ultimate-addon/assets/js/batch-process.js
/**
 * JS FILE
 */
(function($){

    UABB_Batch_Process = {

        /**
         * Init
         */
        init: function()
        {
            this._bind();
        },

        /**
         * Binds events
         */
        _bind: function()
        {
            $( document ).on('click', '.uabb-replace-hotlink-images',  UABB_Batch_Process._process_ajax);
        },

        /**
         * Import
         */
        _process_ajax: function( event )
        {
            event.preventDefault();

            var btn = $(this);

            btn.addClass('updating-message');

            $.ajax({
                url  : ajaxurl,
                type : 'POST',
                data : {
                    action   : 'uabb_update_hotlink_images',
                    security : UABB_Batch_Process_Vars._nonce
                },
            })
            .done(function( data, status, XHR ) {
            	btn.parents('.notice-content').html( UABB_Batch_Process_Vars.started_notice );
                $( '#uabb-batch-process-start' ).addClass('uabb-batch-start');
            });
        }

    };

    /**
     * Initialization
     */
    $(function(){
        UABB_Batch_Process.init();
    });

})(jQuery);