Can stop calling admin-ajax.php (ajaurl) from the console?
-
Hi,
I have a scenario whereby I cannot give access to wp-admin (for obvious reasons), however I have found out that ALM calls the admin-ajax.php as shown from my source code:/* <![CDATA[ */
var alm_localize = {“ajaxurl”:”http:\/\/siteurl\/test\/wp-admin\/admin-ajax.php”,”alm_nonce”:”0dge8w13b3″,”pluginurl”:”http:\/\/homeurl\/test\/wp-content\/plugins\/ajax-load-more”,”scrolltop”:”false”};
/* ]]> */where the ajaxurl is still where my WP core installation files reside, while the pluginurl is correctly my homeurl (that accessible to the users). I have seen the use of the wp_localize_script in the functions.php.
Is this a viable solution? Will this solve the issue with making ALM accessing the admin-ajax? Are there other viable solutions?
I am returned with a console message displaying a 403 message to the URL in the WP-Admin
wp_localize_script( 'twentyfifteen-script', 'ajax_posts', array( 'ajaxurl' => admin_url( 'admin-ajax.php' ), 'noposts' => __('No older posts found', 'twentyfifteen'), ));
Thank you,
N.
- The topic ‘Can stop calling admin-ajax.php (ajaurl) from the console?’ is closed to new replies.