HEX
Server: Apache
System: Linux digivps 5.15.0-163-generic #173-Ubuntu SMP Tue Oct 14 17:51:00 UTC 2025 x86_64
User: www (1000)
PHP: 8.3.15
Disabled: passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv
Upload Files
File: /www/wwwroot/healthyton.com/wp-content/plugins/wordpress-popular-posts/assets/js/admin-notices.js
document.addEventListener('DOMContentLoaded', function(){
    // Performance Nag event handlers
    let btn_nag_dismiss = document.querySelector('.wpp-dismiss-performance-notice'),
        btn_nag_remind =  document.querySelector('.wpp-remind-performance-notice');

    btn_nag_dismiss.addEventListener('click', function(e){
        e.preventDefault();

        let me = e.target;

        me.classList.add('disabled');
        btn_nag_remind.classList.add('disabled');

        me.parentNode.querySelector('.spinner').classList.add('is-active');

        ajax(
            'POST',
            ajaxurl,
            'action=wpp_handle_performance_notice&dismiss=1&token=' + wpp_admin_notices_params.nonce_performance_nag,
            function(response) {
                let json = JSON.parse(response);

                if ( 'success' == json.status ) {
                    let notice = me.parentNode.parentNode;
                    notice.parentNode.removeChild(notice);
                } else {
                    alert('Something went wrong, please try again later');
                }

                me.classList.remove('disabled');
                btn_nag_remind.classList.remove('disabled');
                me.parentNode.querySelector('.spinner').classList.remove('is-active');
            }
        );
    });

    btn_nag_remind.addEventListener('click', function(e){
        e.preventDefault();

        let me = e.target;

        me.classList.add('disabled');
        btn_nag_dismiss.classList.add('disabled');

        me.parentNode.querySelector('.spinner').classList.add('is-active');

        ajax(
            'POST',
            ajaxurl,
            'action=wpp_handle_performance_notice&dismiss=-1&token=' + wpp_admin_notices_params.nonce_performance_nag,
            function(response) {
                let json = JSON.parse(response);

                if ( 'success' == json.status ) {
                    let notice = me.parentNode.parentNode;
                    notice.parentNode.removeChild(notice);
                } else {
                    alert('Something went wrong, please try again later');
                }

                me.classList.remove('disabled');
                btn_nag_remind.classList.remove('disabled');
                me.parentNode.querySelector('.spinner').classList.remove('is-active');
            }
        );
    });

    /** Helper functions */

    function ajax(method, url, params, callback) {
        let xhr = new XMLHttpRequest(),
        target = url,
        args = params,
        valid_methods = ["GET", "POST"];
        method = -1 != valid_methods.indexOf( method ) ? method : "GET";
        /* Set request method and target URL */
        xhr.open( method, target + ( "GET" == method ? '?' + args : '' ), true );
        /* Set request headers */
        if ( "POST" == method ) {
            xhr.setRequestHeader( "Content-type", "application/x-www-form-urlencoded" );
        }
        xhr.setRequestHeader( "X-Requested-With","XMLHttpRequest" );
        /* Hook into onreadystatechange */
        xhr.onreadystatechange = function() {
            if ( 4 === xhr.readyState && 200 <= xhr.status && 300 > xhr.status ) {
                if ( 'function' === typeof callback ) {
                    callback.call( undefined, xhr.response );
                }
            }
        };
        /* Send request */
        xhr.send( ( "POST" == method ? args : null ) );
    }
});