Tag Info

New 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. ...


0

there is a plugin created to get through out your problem submitting the form. a plugin were over 8 out of 10 wordpress sites have it for free use contact-form-7 plugin by wordpress. these would make things easy


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']) ...


0

The first option and probably the more ideal for your scenario would be to use the gform_pre_render hook to modify the $form object of one form by append the fields from another form to it. add_filter( 'gform_pre_render_1', 'monster_form' ); function monster_form( $form ) { $form_b = GFAPI::get_form( 2 ); $field_cap = 1000; foreach( ...


0

This is what you're looking for: http://codex.wordpress.org/Plugin_API/Action_Reference/init Example from Codex: add_action('init', 'process_post'); function process_post(){ if(isset($_POST['unique_hidden_field'])) { // process $_POST data here } }


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

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']; ...


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

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', ...



Top 50 recent answers are included