mainliborg
Forum Replies Created
-
Forum: Plugins
In reply to: [hCaptcha for WP] GiveWP integration issueExcellent news. Thanks you.
Forum: Plugins
In reply to: [Ultimate Addons for Contact Form 7] Conditional fields with CheckboxOk, so it needs to be set to only allow one option to be checked (exclusive)? If that’s the case I’ll need to change up the field type since the requirements are to allow multiple options to be possible.
Forum: Plugins
In reply to: [Co-Authors Plus] Return only administratorsI’ve seen the issue where it only returns search results that have standard WordPress roles (like Author, Editor, etc.) when trying to add a co-author. I have a store site set up using this to add co-authors to store locations and I have to add the standard role to the user (I add Author), then do the search and add them to the site, then remove their regular Author role afterward.
I’m having the same issue. It’s in use with the WP Store Locator plugin so none of my site managers can update their store information.
More information. In addition I had Frontend Admin 3.18.12 installed and turned on–which actually seems to be the real issue when it’s turned on. It, in combo with ACF caused the issue.
Forum: Plugins
In reply to: [Post My CF7 Form] Map form input field to post publish dateYes, It both publishes the post and writes the meta data fields using add_post_meta, which I added into the function. I added some of my own code logic that I needed anyway. So while I didn’t resolve the original issue I had, I have it working as I need it.
Forum: Plugins
In reply to: [Post My CF7 Form] Map form input field to post publish dateI’ve moved the entire process to the new post mapped function, it now writes the meta fields there when a form is submitted.
Forum: Plugins
In reply to: [Post My CF7 Form] Map form input field to post publish dateNo errors being reported in debug. It’s literally the case when the new post mappings is enabled the meta writes stop. And when it’s disabled the meta writes work. Both work properly in what each is supposed to do, but not together.
Forum: Plugins
In reply to: [Post My CF7 Form] Map form input field to post publish dateI’ll check debug and get back to you.
I do find it very odd that the meta field writing is affected since as you state it happens first then the other stuff happens afterward in a different WP table.
Forum: Plugins
In reply to: [Post My CF7 Form] Map form input field to post publish dateadd_action('cf7_2_post_form_submitted_to_post', 'new_post_mapped',10,4); /** * Function to take further action once form has been submitted and saved as a post. Note this action is only fired for submission which has been submitted as opposed to saved as drafts. * @param string $post_id new post ID to which submission was saved. * @param array $cf7_form_data complete set of data submitted in the form as an array of field-name=>value pairs. * @param string $cf7form_key unique key to identify your form. * @param array $submitted_files array of files submitted in the form, if any file fields are present. */ function new_post_mapped($post_id, $cf7_form_data, $cf7form_key, $submitted_files){ wp_update_post( array ( 'ID' => $post_id, 'post_date' => $cf7_form_data["start-date-closing"], 'post_date_gmt' => get_gmt_from_date( $cf7_form_data["start-date-closing"] ) ) ); }
Ok, So I added the above to my functions and it works to schedule the post for a future date. BUT, when this code is active the meta post mappings don’t work anymore. I need to write 2 custom fields and they work if the above is disabled, but stop working when it’s enabled. I also have the
add_filter( 'cf7_2_post_status_post', 'publish_new_post',10,3); /** * Function to change the post status of saved/submitted posts. * @param string $status the post status, default is 'draft'. * @param string $ckf7_key unique key to identify your form. * @param array $submitted_data complete set of data submitted in the form as an array of field-name=>value pairs. * @return string a valid post status ('publish'|'draft'|'pending'|'trash') */ function publish_new_post($status, $ckf7_key, $submitted_data){ /*The default behaviour is to save post to 'draft' status. If you wish to change this, you can use this filter and return a valid post status: 'publish'|'draft'|'pending'|'trash'*/ return 'publish'; }
code set as well in functions.
So, is there an error in my code? or is there a bug/issue in the plugin when these are both running?
Update: This looks related to my other entry asking about future posting dates. When that’s turned on the meta-data writing breaks. will see if it’s my code causing the issue.
This fixed the select field issue, but I’m now seeing an issue with the submission properly writing post meta fields. The same mappings which worked previously now aren’t being added at all when the post is made.
I’m using a drop down menu in the CF7 form to select fields to map to title and content of the post–in both cases the entries are being transformed to lower case without spaces: example value might be “Bernards” but it shows up as bernards–or “Delayed Opening” shows up as delayedopening.
Thank you for the information. This is what I needed.
Hi, Thank you. I just wanted to make sure that the plugin didn’t have a system that recognized newer posts in a category from some kind of cached “last post” and would send anything newer even if the plugin was not active or the campaign temporarily turned off during that time.