You appear to be a bot. Output may be restricted
Description
Send an email to the post author informing them of a new entry to review
Usage
bw_notify_author_email( $atts, $validated, $valid, $sent );
Parameters
- $atts
- ( array ) required – shortcode parameters
- $validated
- ( array ) required – array of fields
- $valid
- ( bool ) required – true if the form was considered valid and passed the spam check (if activated)
- $sent
- ( bool ) required – post_id of the inserted post
Returns
voidSource
File name: oik-fields/shortcodes/oik-new.phpLines:
1 to 21 of 21
function bw_notify_author_email( $atts, $validated, $valid, $sent ) { bw_trace2( null, null, true, BW_TRACE_DEBUG ); $email_to = bw_array_get( $atts, "email", null ); if ( $email_to !== "n" ) { if ( !$email_to ) { $email_to = bw_get_option_arr( "email", null, $atts ); } $subject = "New pending content: " . $atts['post_type'] ; $message = bw_return_fields( $validated ); $message .= '<br />'; $link = bw_get_edit_post_link( $atts['post_type'], $sent ); $message .= retlink( null, $link, "Approve new post $sent" ); $fields = array(); $fields['message'] = $message; $fields['contact'] = $email_to; $fields['from'] = $email_to; oik_require( "includes/oik-contact-form-email.php" ); $sent = bw_send_email( $email_to, $subject, $message, null, $fields ); } return( $sent ); }View on GitHub