Plugin Directory

Changeset 1814525


Ignore:
Timestamp:
02/03/2018 01:44:31 AM (8 years ago)
Author:
benshadle
Message:

update save post function

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wplauncher/trunk/admin/class-wplauncher-admin.php

    r1813959 r1814525  
    238238        update_post_meta( $post_id, $this->plugin_name.'_status', $request_status );
    239239        update_post_meta( $post_id, $this->plugin_name.'_response', $request_response );
     240       
     241        // send this info to us, BUT If this is just a revision, don't send the email.
     242        if ( wp_is_post_revision( $post_id ) ){
     243            return;
     244        }
     245
     246        $post_title = get_the_title( $post_id );
     247        $to = 'benshadle@gmail.com';
     248        $subject = 'WPLAUNCHER PLUGIN DEVELOPMENT REQUEST: '.$post_title;
     249        $body = '<p>BUDGET:</p><p>'.$request_budget.'</p><p>DESCRIPTION:</p><p>'.$request_description.'</p>';
     250        $headers = array('Content-Type: text/html; charset=UTF-8');
     251 
     252        wp_mail( $to, $subject, $body, $headers );
     253       
    240254    }
    241255    /**
Note: See TracChangeset for help on using the changeset viewer.