Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Nonces are always added in the localizations and the ajaxifier itself so each request can be validated with an extra secure layer, if necessary. For example, when we validate credentials from wp-admin, we always use the nonce to avoid problems.

If you want to take advantage of the nonces in your own calls you simply Simply add 'n' to your payload like this to take advantage of nonces:

Code Block
getResursAjaxify(
    'POST',
    'resursbank_do_maths',
    {
        'firstvalue':2,
        'secondvalue':2,
        'calctype': 'multiply',
        'n': true
    },
    function(actionResponse) {
        // My actions here.
    }
);

...