Using Jquery submit with ajax request

That error was identified by stackoverflow – it’s actually caused by Rapport software, a security tool some banks recommend. You could turn it off / remove it from development machines.

How to add external remote JS source to Gravity Forms?

I think you’re looking for gform_enqueue_scripts which is simply a Gravity Forms specific version of the wp_enqueue_scripts hook. Either hook uses the wp_enqueue_script() function. That function can take a local script—usually using get_template_directory_uri() (theme), get_stylesheet_directory_uri() child theme), or plugins_url() (plugin) to reference the file location—or an external location like what you’re trying to do. You’d … Read more

Save jQuery UI Sortable on WordPress

if you use the stop function when you intialise .sortable() you can ajax send the new order to a script, which (when you write it!) would save the new order to the database. jQuery(function(){ jQuery(“#sortable”).sortable({ stop: function (event, ui) { var new_order = jQuery(this).sortable(‘serialize’); jQuery.post( “http://www.thissite.com/wp-admin/ajax.php”, { action: my_custom_ajax_save, order: new_order }, function( data ) … Read more

Using WP functions inside javascript

I found out about wp_localize_scripts here and it solves my issue: functions.php $var=get_current_user_id(); $params = array( ‘max’ => $var ); wp_localize_script( ‘myscript’, ‘MyScriptParams’, $params ); wp_enqueue_script(‘myscript’); and in the .js file I can retrieve this variable with MyScriptParams.max.

WP_ENQUEUE not working with Foundation 5

EDIT: I’m coming back to correct this post, having successfully wp_enqueue’d Foundation 5.3 for Sites to WordPress 3.9. This code below is for anyone who has struggled to WP_ENQUEUE Foundation. The code below works perfectly. UPDATES: I will continue to update this post with the newest version of WordPress and Foundation to give you all … Read more

Manipulate retrieved ajax data in php

Yes you should use die(); in ajax function call, but because you’re not returning data and don’t care what is returned it’s not necessary You should be using nonce, it’s good practice to get used to always using it regardless of the situation. http://codex.wordpress.org/WordPress_Nonces http://codex.wordpress.org/AJAX_in_Plugins You should not be using a function called func, name … Read more