Tag Info

Hot answers tagged

3

Short answer: No. You can use normal strings for actions, md5'ing them doesn't change anything. The nonce is built from three main pieces of information: Time: The current time() divided by 43200 is worked into the nonce. This is what lets the nonce be changed every 12 hours (43200 seconds in 12 hours). The action string you provide. More on this below. ...


2

Well first of all, it seems that what you're doing would be far easier, and more in line with WordPress best-practices to not use your own table. Use a custom post type and post meta data, or use the Settings API. Don't reinvent wheels. You also make your data more portable, tools that correctly use the Wordpress API can export/import and back up your data. ...


1

You said your original code is working. I think you should try using wp_redirect but you can't output any HTML/Headers for that. Untested, but try the following: Note: intentionally missed out the html/body tags... <?php require_once('../../../wp-config.php'); require_once('../../../wp-load.php'); global $wpdb; $feedurl=$_POST['scimp_feed_url']; ...


1

I would use init hook in your plugin file to register custom function add_action( 'init', 'custom_proccess_form' ); And then check form inputs in the custom function, you mentioned creating posts function custom_proccess_form() { $wp_error = true; // report errors or not $nonce = $_POST['_wpnonce']; if( isset($_POST['insert_post']) ...


1

There are several problems with your code. Unless you, or a plugin, has added wp_frm_item_metas to $wpdb, $wpdb has not idea what $wpdb->wp_frm_item_metas is. You will get an "Undefined Property" error, and your query won't work. You can't just use $wpdb-> plus any table name. That won't work. You have to add the property to $wpdb, which isn't that ...


1

You can try to use functions.php to handle the form submission and send the data via AJAX. Add a hidden field in your form with the action to be taken (on functions.php): <input type="hidden" name="action" value="save_contact"/> In you footer.php add the jQuery code to handle the AJAX request: jQuery('#your-form').submit(ajaxSubmit); function ...


1

Try this: http://wordpress.org/plugins/wp-ajaxify-comments/ or (manually) Add the following lines of code to your theme’s functions.php file add_action('init', 'wdp_ajaxcomments_load_js', 10); function wdp_ajaxcomments_load_js(){ wp_enqueue_script('ajaxValidate', ...



Only top voted, non community-wiki answers of a minimum length are eligible