receter
Forum Replies Created
Viewing 5 replies - 1 through 5 (of 5 total)
-
Forum: Plugins
In reply to: [Contact Form 7 Mail Conditions] Fixed PluginThere is just one very short file in the plugin folder (besides the readme.txt). Open it and replace the functions inside with the functions I sent you. If you need further assistance, my email address is my wordpress username at gmail com.
Forum: Plugins
In reply to: [Contact Form 7 Mail Conditions] Fixed PluginThis should do the trick:
/** * Modifies the emails by replacing the conditionals [if field_name][/if] * * @param [Object] $cf7 the contanct form 7 object * @return void * @author Tobias Braner **/ public function before_send_mail($contact_form) { $submission = WPCF7_Submission::get_instance(); if ( $submission ) { $posted_data = $submission->get_posted_data(); $mail = $contact_form->prop('mail'); $mail2 = $contact_form->prop('mail2'); $mail_body = $mail['body']; $mail2_body = $mail2['body']; $mail['body'] = $this->process_conditions($mail_body, $posted_data); $mail2['body'] = $this->process_conditions($mail2_body, $posted_data); $contact_form->set_properties(array('mail' => $mail, 'mail2' => $mail2)); } } /** * Takes the wpcf7 object and replaces all conditions. * * @return void * @author Tobias Braner **/ private function process_conditions($mail_body, $posted_data) { $updated_email_body = $mail_body; $matches = array(); $num_matches = preg_match_all($this->regexp, $mail_body, $matches); for ($i=0; $i < $num_matches; $i++) { $expression = $matches[WPCF7MC_EXPRESSION][$i]; $variable = $matches[WPCF7MC_VARIABLE][$i]; $value = $matches[WPCF7MC_VALUE][$i]; if (empty($posted_data[$variable][0]) and array_key_exists($variable, $posted_data)) { $updated_email_body = str_replace($expression, '', $updated_email_body); } else { $updated_email_body = str_replace($expression, $value, $updated_email_body); } } return $updated_email_body; }
Forum: Reviews
In reply to: [Custom Post Type Submenu] Issues with 3.5Hi Jared,
thanks for your feedback. If you still need this plugin, I uploaded an update that fixes all of this.
Forum: Reviews
In reply to: [Custom Post Type Submenu] So close, yet so far away.Hi,
I uploaded an update that fixes spinning wheel and links to archive if an archive exists.
Forum: Fixing WordPress
In reply to: Why can't wordpress embed this single vimeo.com Link?Ok it seems that in an vimeo pro account, it is possible to deny embeding on other sites. And if so, WordPress doesnt change the text link in embeding code.
Viewing 5 replies - 1 through 5 (of 5 total)