Tagged Questions
0
votes
1answer
79 views
Can't seem to get wp_localize_script to work
This is my code:
wp_enqueue_script('ms_ajax_localized');
wp_localize_script( 'ms_ajax_localized', 'MS_Ajax', array(
'ajaxurl' => admin_url( 'admin-ajax.php' ),
'nextNonce' => ...
1
vote
1answer
295 views
How to localize inline script called with ajax
I have a loop of posts and I allow a user to edit each post using ajax. When the edit button is clicked for the post I use ajax to retrieve the template part containing the edit form for the post. ...
0
votes
1answer
130 views
Parsing post->ID in included plugin file
running into something that has got me completely puzzled.
I have a plugin with a main file that looks like this:
// Global Variables
$mouldings_prefix = 'mouldings_';
$mouldings_name = 'Mouldings';
...
-1
votes
1answer
777 views
Using WP Ajax and jQuery to process multiple forms on the same page?
I'm using the following to make ajax calls:
wp_enqueue_script( 'my-ajax-request', TAF_PLUGIN_URL . 'js/ajaxcf.js', array( 'jquery' ) );
wp_localize_script( 'my-ajax-request', 'MyAjax', array( ...
1
vote
1answer
158 views
How to localize admin.php only once
I am creating a set of plugins that all use AJAX. Now localizing the admin.php in all the plugins seems to be a bit of an overkill. Is there a way to localize the script only once.\
Now I do not know ...
0
votes
1answer
415 views
Does wp_localize_script Call a Javascript Function or Simply Pass PHP Parameters to It
Easy question: I'm trying to understand wp_localize_script.
Does wp_localize_script call a javascript function or does it simply pass PHP parameters to javascript?
I want to pass php parameters to ...