Title: Greg Marshall's Replies | WordPress.org

---

# Greg Marshall

  [  ](https://wordpress.org/support/users/timeassistant/)

 *   [Profile](https://wordpress.org/support/users/timeassistant/)
 *   [Topics Started](https://wordpress.org/support/users/timeassistant/topics/)
 *   [Replies Created](https://wordpress.org/support/users/timeassistant/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/timeassistant/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/timeassistant/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/timeassistant/engagements/)
 *   [Favorites](https://wordpress.org/support/users/timeassistant/favorites/)

 Search replies:

## Forum Replies Created

Viewing 15 replies - 1 through 15 (of 96 total)

1 [2](https://wordpress.org/support/users/timeassistant/replies/page/2/?output_format=md)
[3](https://wordpress.org/support/users/timeassistant/replies/page/3/?output_format=md)…
[5](https://wordpress.org/support/users/timeassistant/replies/page/5/?output_format=md)
[6](https://wordpress.org/support/users/timeassistant/replies/page/6/?output_format=md)
[7](https://wordpress.org/support/users/timeassistant/replies/page/7/?output_format=md)
[→](https://wordpress.org/support/users/timeassistant/replies/page/2/?output_format=md)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Post SMTP – Complete Email Deliverability and SMTP Solution with Email Logs, Alerts, Backup SMTP & Mobile App] PHP Deprecated: Mail.php on line 1250](https://wordpress.org/support/topic/php-deprecated-mail-php-on-line-1250/)
 *  [Greg Marshall](https://wordpress.org/support/users/timeassistant/)
 * (@timeassistant)
 * [1 year, 2 months ago](https://wordpress.org/support/topic/php-deprecated-mail-php-on-line-1250/#post-18315977)
 * Hi sorry to jump in on this, I also have this issue and it appears to only happen
   when WordFence sends an email from the site.
 * Just curious if OP also has wordfence installed?
 * Email subject is ususally “[Wordfence Alert] Problems found on domain.com”
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Forminator Forms – Contact Form, Payment Form & Custom Form Builder] idiot proofing the “email routing” of a form](https://wordpress.org/support/topic/idiot-proofing-the-email-routing-of-a-form/)
 *  Thread Starter [Greg Marshall](https://wordpress.org/support/users/timeassistant/)
 * (@timeassistant)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/idiot-proofing-the-email-routing-of-a-form/#post-17018857)
 * Hello, Sorry again for my late reply. I have modified the code you gave me and
   appear to have quite a good working solution. I thought I would share it in case
   someone else finds it handy. It’s also commented so should be easily adapted 
   if need be. I have also credited you guys in my comments for the initial help
   
   Please see link to the Gist I made: [https://gist.github.com/AWOL-TECH/f6a413754a0e2e62393193b33dd4eb78](https://gist.github.com/AWOL-TECH/f6a413754a0e2e62393193b33dd4eb78)
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Forminator Forms – Contact Form, Payment Form & Custom Form Builder] idiot proofing the “email routing” of a form](https://wordpress.org/support/topic/idiot-proofing-the-email-routing-of-a-form/)
 *  Thread Starter [Greg Marshall](https://wordpress.org/support/users/timeassistant/)
 * (@timeassistant)
 * [2 years, 10 months ago](https://wordpress.org/support/topic/idiot-proofing-the-email-routing-of-a-form/#post-16912444)
 * Hi there,
 * Yeah I couldn’t find anything that looked relevant in the docs unfortunately.
   Please do let me know if a method is figured out
 * Thanks
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Forminator Forms – Contact Form, Payment Form & Custom Form Builder] Submissions page – form dropdown limit](https://wordpress.org/support/topic/submissions-page-form-dropdown-limit/)
 *  Thread Starter [Greg Marshall](https://wordpress.org/support/users/timeassistant/)
 * (@timeassistant)
 * [2 years, 10 months ago](https://wordpress.org/support/topic/submissions-page-form-dropdown-limit/#post-16854979)
 * Hi sorry for the delay, I have implemented the code and I’m currently testing/
   monitoring for issues. So far seems to be working perfectly though. Big thank
   you for the assist
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Simple History – Track, Log, and Audit WordPress Changes] How to exclude specific entries](https://wordpress.org/support/topic/how-to-exclude-specific-entries/)
 *  Thread Starter [Greg Marshall](https://wordpress.org/support/users/timeassistant/)
 * (@timeassistant)
 * [2 years, 11 months ago](https://wordpress.org/support/topic/how-to-exclude-specific-entries/#post-16831059)
 * Thanks for the help,
 * I had to change it every so slightly to make it work but it does appear to be
   working
 *     ```wp-block-code
           if ($logger->slug !== 'SimplePostLogger') {
             return $doLog;
           }
           // Bail if not correct message.
           if ($context['_message_key'] !== 'post_deleted') {
             return $doLog;
           }
       ```
   
 * thanks
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Advanced Custom Fields: Font Awesome Field] Possible missing icons?](https://wordpress.org/support/topic/possible-missing-icons/)
 *  Thread Starter [Greg Marshall](https://wordpress.org/support/users/timeassistant/)
 * (@timeassistant)
 * [3 years ago](https://wordpress.org/support/topic/possible-missing-icons/#post-16673086)
 * Ah thanks for the quick reply, I was literally coming back here to say that I
   didnt have Solid pack enabled. I didn’t realise ‘regular’ did not include all
   the basic icons, so yep, I needed to enable the solid pack! Appears to be one
   of those days haha
 * Thanks 🙂
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Forminator Forms – Contact Form, Payment Form & Custom Form Builder] How to append string / variable to email notification content](https://wordpress.org/support/topic/how-to-append-string-variable-to-email-notification-content/)
 *  Thread Starter [Greg Marshall](https://wordpress.org/support/users/timeassistant/)
 * (@timeassistant)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/how-to-append-string-variable-to-email-notification-content/#post-16218887)
 * Thanks Patrick,
 * I have just left a 5 star review for you there.
 * Thanks again 🙂
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Forminator Forms – Contact Form, Payment Form & Custom Form Builder] How to append string / variable to email notification content](https://wordpress.org/support/topic/how-to-append-string-variable-to-email-notification-content/)
 *  Thread Starter [Greg Marshall](https://wordpress.org/support/users/timeassistant/)
 * (@timeassistant)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/how-to-append-string-variable-to-email-notification-content/#post-16209400)
 * Hello,
 * I never thought to actually just hook into the WP_Mail function and strip the
   tags that way, good idea and it appears to be working well.
 * Thank you very much for this!
 * However I would still recommend developing a Plain text email feature (check 
   box) for the email editor (with all HTML tags natively stripped).
 * Thanks again. I’ll be sure to recommend the plugin to others. Great support
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Forminator Forms – Contact Form, Payment Form & Custom Form Builder] How to append string / variable to email notification content](https://wordpress.org/support/topic/how-to-append-string-variable-to-email-notification-content/)
 *  Thread Starter [Greg Marshall](https://wordpress.org/support/users/timeassistant/)
 * (@timeassistant)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/how-to-append-string-variable-to-email-notification-content/#post-16199822)
 * Thank you for letting me know, I was wondering if my additional question had 
   been missed!
 * I have used the code below to replace the ordered list output with an easy table
   layout for our regular email notifications. This worked very well, however for
   the text messages (SMS) side I have found that I still cannot strip the html 
   tags, the <p> tag always seems to come back. For my Text message forms, they 
   usually only send 1 field out of the 3 fields on the form so not sure if that
   makes a difference. I have commented out the stuff for the text messages as it
   doesnt work, the rest of the code is currently in use and is outputting the email
   data as intended (the extra html tags don’t matter there).
 *     ```
       add_filter( 'forminator_get_formatted_form_entry', 'forminator_modify_email_format', 20, 5 );
   
       function forminator_modify_email_format( $html, $custom_form, $data, $entry, $ignored_field_types ){
   
           $ignored_field_types = Forminator_Form_Entry_Model::ignored_fields();
   
           $form_fields = $custom_form->get_fields();
   
           $table_rows = array();
   
           if ( is_null( $form_fields ) ) {
   
               $form_fields = array();
   
           }
   
           foreach ( $form_fields as $form_field ) {
   
               $field_type = $form_field->__get( 'type' );
   
               if ( in_array( $field_type, $ignored_field_types, true ) ) {
   
                   continue;
   
               }
   
               $label = $form_field->get_label_for_entry();
   
               $value = render_entry( $entry, $form_field->slug );
   
               $table_rows[ $label ] = $value;
   
           }
   
       	$thecustomformarray = get_object_vars($custom_form);
       	$thecustomform = $thecustomformarray['notifications']['0'];
   
       /*error_log('$thecustomform: ' . print_r($thecustomform, 1));
       	if ($thecustomform['label'] === 'Customer Email to Text Message' ||  strpos( $thecustomform['email-subject'], "123456") !== false || in_array("123456", $thecustomform) ) {
       // was unable to strip tags from the text/SMS from here
       		error_log('Customer TEXT  FOUND HTML');
       		$thecustomform['email-editor'] = wp_strip_all_tags($thecustomform['email-editor']);
        		$html = wp_strip_all_tags($html);
   
   
       	}*/
       	if ($thecustomform['label'] === 'Customer Email' ||  $thecustomform['email-subject'] === 'NEW MESSAGE'){
       	//	error_log('Customer Email  FOUND HTML');
   
   
           $html = '<table>';
   
       	    foreach ($table_rows as $table_label => $table_value){
   
   
                   $html .= "<tr>";
   
                   $html .= "<th style='text-align:left; vertical-align: top;'>" . $table_label ."</th>";
   
                   $html .= "<td>" . $table_value ."</td>";
   
                   $html .= "</tr>";
   
               }
           $html .= '</table>';
       	}
   
       	/*  USE THIS FOR TEXT MESSAGING WHEN ITS FIGURED OUT 
       		$html = '';
   
       	foreach ($table_rows as $line_label => $line_value){
       		$html .= $line_label . ": " .  $line_value . "\r\n";
       	//} 
           */
   
   
       return $html;
   
       }
       ```
   
 * so if you guys can assist me in getting the html tags removed from the text messages
   that would be fantastic and followed by a big thank you. As you can see in the
   code I am mainly checking the email subject or the label of the email action 
   in order to determine if its an email or an SMS/text. All text/SMS messages must
   have the pincode in the subject line, I swapped it out with 123456 here
    -  This reply was modified 3 years, 6 months ago by [Greg Marshall](https://wordpress.org/support/users/timeassistant/).
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Forminator Forms – Contact Form, Payment Form & Custom Form Builder] How to append string / variable to email notification content](https://wordpress.org/support/topic/how-to-append-string-variable-to-email-notification-content/)
 *  Thread Starter [Greg Marshall](https://wordpress.org/support/users/timeassistant/)
 * (@timeassistant)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/how-to-append-string-variable-to-email-notification-content/#post-16182261)
 * Hello, I had a further question regarding the above snippet.
 * as mentioned n my last reply it is working as expected, however I have noticed
   another issue I have not experienced before. Some of our forms will not be using
   the “dynamic signatures” these forms send their email message to a Email to Text(
   SMS) service. The problem I now face is that the text message service will notp
   support HTML tags and the body content of all emails is auto wrapped in <p> tags.
   which means the text message literally shows on a phone as <p>message content
   </p>.
 * I attempted to add this to the above code but it doesn’t seem to work fully
 *     ```
       $thecustomformarray = get_object_vars($custom_form);
       	$thecustomform = $thecustomformarray['notifications']['0'];
       	if (in_array("Customer Email to Text Message", $thecustomform)) {		
   
       		$message = wp_strip_all_tags( $message );
   
       		error_log('Customer Email to Text Message  FOUND');
       ```
   
 * I do get the error log statement but the text message is still sent wrapped in
   the <p> tags.
 * Could someone please advise. I also copied the snippet from Adam’s reply in this
   thread direct but it didn’t work either.
 * [https://wordpress.org/support/topic/plain-text-emails-3/](https://wordpress.org/support/topic/plain-text-emails-3/)
 * Anyway would appreciate if someone can let me know a suitable way to do this 
   please. OR better yet, a “Plain Text” checkbox in the email notification settings
   so that content is not auto wrapped in html tags 😀
 * EDIT: this appears to be happening by the email body editor in the add email 
   notification screen. Switching from visual to text reinserts the p tags even 
   if you remove them. They are also added again on save.
    -  This reply was modified 3 years, 6 months ago by [Greg Marshall](https://wordpress.org/support/users/timeassistant/).
      Reason: added info
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Forminator Forms – Contact Form, Payment Form & Custom Form Builder] How to append string / variable to email notification content](https://wordpress.org/support/topic/how-to-append-string-variable-to-email-notification-content/)
 *  Thread Starter [Greg Marshall](https://wordpress.org/support/users/timeassistant/)
 * (@timeassistant)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/how-to-append-string-variable-to-email-notification-content/#post-16177403)
 * Hello,
 * Thanks for this Ive now gotten my custom signatures working. The key piece I 
   was missing was:
 * `( $message, $custom_form, $data, $entry, $cls ) {`
 * Everything appears to be working however I am still to thoroughly test but initial
   results look good.
 * Would definitely recommend adding this kind of stuff to your documentation
 * thanks for the help 🙂
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Forminator Forms – Contact Form, Payment Form & Custom Form Builder] How to append string / variable to email notification content](https://wordpress.org/support/topic/how-to-append-string-variable-to-email-notification-content/)
 *  Thread Starter [Greg Marshall](https://wordpress.org/support/users/timeassistant/)
 * (@timeassistant)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/how-to-append-string-variable-to-email-notification-content/#post-16173968)
 * Hello,
 * thanks for the quick response, I look forward to hearing back from you.
 * As an example (as many people like to know that you’ve tried yourself before 
   they give help) I did attempt to modify the notifications sub array but that 
   doesn’t seem to be the content sent via email.
 *     ```
       	foreach ( $custom_form->notifications as $key => $value ) {
       	$value['email-editor'] .= "<p>ADDED FOR TESTING</p>";
       ```
   
 * Thanks
    -  This reply was modified 3 years, 6 months ago by [Greg Marshall](https://wordpress.org/support/users/timeassistant/).
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Ninja Forms - The Contact Form Builder That Grows With You] Ninja forms flooding mysql with select queries](https://wordpress.org/support/topic/ninja-forms-flooding-mysql-with-select-queries/)
 *  Thread Starter [Greg Marshall](https://wordpress.org/support/users/timeassistant/)
 * (@timeassistant)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/ninja-forms-flooding-mysql-with-select-queries/#post-15059283)
 * Here’s more
 *     ```
           Time: 0
          State: Sending data
           Info: SELECT <code>key</code>, <code>value</code>
                       FROM   <code>wp_nf3_action_meta</code>
                       WHERE  <code>parent_id</code> = 457
       Progress: 0.000
       ```
   
 *     ```
        Command: Query
           Time: 0
          State: Sending data
           Info: SELECT <code>key</code>, <code>value</code>
                       FROM   <code>wp_nf3_form_meta</code>
                       WHERE  <code>parent_id</code> = 228
       Progress: 0.000
       ```
   
 *     ```
       Command: Query
           Time: 0
          State: Sending data
           Info: SELECT <code>key</code>, <code>value</code>
                       FROM   <code>wp_nf3_action_meta</code>
                       WHERE  <code>parent_id</code> = 2106
       Progress: 0.000
       ```
   
 *     ```
       Command: Query
           Time: 0
          State: Sending data
           Info: SELECT <code>key</code>, <code>value</code>
                       FROM   <code>wp_nf3_form_meta</code>
                       WHERE  <code>parent_id</code> = 663
       Progress: 0.000
       ```
   
 *     ```
       Command: Query
           Time: 0
          State: Sending data
           Info: SELECT <code>key</code>, <code>value</code>
                       FROM   <code>wp_nf3_form_meta</code>
                       WHERE  <code>parent_id</code> = 21
       Progress: 0.000
       ```
   
 *     ```
       Command: Query
           Time: 0
          State: Sending data
           Info: SELECT <code>key</code>, <code>value</code>
                       FROM   <code>wp_nf3_form_meta</code>
                       WHERE  <code>parent_id</code> = 463
       Progress: 0.000
       ```
   
 * non forms pages in the dashbaord also have loads of these queries which is also
   adding extra load
 *     ```
       Command: Query
           Time: 0
          State: Sending data
           Info: SELECT <code>key</code>, <code>value</code>
                       FROM   <code>wp_nf3_form_meta</code>
                       WHERE  <code>parent_id</code> = 140
       Progress: 0.000
       ```
   
 *     ```
       Command: Query
           Time: 0
          State: Sending data
           Info: SELECT <code>key</code>, <code>value</code>
                       FROM   <code>wp_nf3_form_meta</code>
                       WHERE  <code>parent_id</code> = 448
       ```
   
    -  This reply was modified 4 years, 6 months ago by [Greg Marshall](https://wordpress.org/support/users/timeassistant/).
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WP Activity Log] PHP Warning](https://wordpress.org/support/topic/version-4-3-2-php-warning/)
 *  [Greg Marshall](https://wordpress.org/support/users/timeassistant/)
 * (@timeassistant)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/version-4-3-2-php-warning/#post-14789511)
 * Also having this issue
 * PHP Warning: Use of undefined constant php – assumed ‘php’ (this will throw an
   Error in a future version of PHP) in /public_html/wp-content/plugins/wp-security-
   audit-log/classes/Views/Settings.php on line 968
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Availability Datepicker – Booking Calendar for Contact Form 7 – Input WP] Ninja Forms Compatibility](https://wordpress.org/support/topic/ninja-forms-compatibility-3/)
 *  Thread Starter [Greg Marshall](https://wordpress.org/support/users/timeassistant/)
 * (@timeassistant)
 * [5 years ago](https://wordpress.org/support/topic/ninja-forms-compatibility-3/#post-14369793)
 * Hello,
 * That sounds good, I am happy to manually integrate so long as it works 🙂

Viewing 15 replies - 1 through 15 (of 96 total)

1 [2](https://wordpress.org/support/users/timeassistant/replies/page/2/?output_format=md)
[3](https://wordpress.org/support/users/timeassistant/replies/page/3/?output_format=md)…
[5](https://wordpress.org/support/users/timeassistant/replies/page/5/?output_format=md)
[6](https://wordpress.org/support/users/timeassistant/replies/page/6/?output_format=md)
[7](https://wordpress.org/support/users/timeassistant/replies/page/7/?output_format=md)
[→](https://wordpress.org/support/users/timeassistant/replies/page/2/?output_format=md)