Blogging / Original work / Computer projects

Adding AJAX to Selected WordPress Pages Yourself

This picks up where the earlier article left off: Adding Site-Wide AJAX to WordPress Yourself.   Modify ajaxcheck_ignore():

function ajaxcheck_ignore(url) {
    for (var i in ajaxignore) {
        if (url.indexOf(ajaxignore[i]) >= 0) {
            return false;
        }
        if (url.indexOf("krunk") < 0 ) {  #Check whether the link contains the word krunk
            return false;  #Use AJAX if present
        }
    }
    return true;
}

Published 07/07/2018 · Krunk Zhou

Join the conversation