1. Go to this page and download the library: Download alexsancho/wp-admin-no-ajax library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
alexsancho / wp-admin-no-ajax example snippets
// This turns the no admin ajax url to -> /ajax/
define('WP_ADMIN_NO_AJAX_URL','ajax');
// This changes /admin-no-ajax/ -> /ajax/
add_filter( 'admin-no-ajax/keyword', 'my_custom_admin_no_ajax_url' );
function my_custom_admin_no_ajax_url( $ajax_url ) {
return "ajax";
}
// Writes log entries after hearthbeat action for debugging
do_action( 'admin-no-ajax/before/heartbeat' , 'my_custom_admin_no_ajax_debug' );
function my_custom_admin_no_ajax_debug() {
error_log( 'DEBUG | heartbeat action was run by: '.$_SERVER[“REMOTE_ADDR”] );
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.