Send post approval notification with "user submitted posts"

Imebatilisha Ilichapishwa Miaka 5 iliyopita Kulipwa wakati wa kujifungua
Imebatilisha Kulipwa wakati wa kujifungua

Hi, I recently added this code to my functions file:

function authorNotification($post_id) {

$post = get_post($post_id);

$author = get_userdata($post->post_author);

$message = "

Hi ".$author->display_name.",

Your post, ".$post->post_title." has just been published at ".get_permalink( $post_id ).". Well done!

";

wp_mail($author->user_email, "Your article is online", $message);

}

add_action('publish_post', 'authorNotification');

It sends users notification when their posts are approved. However the site I'm working on uses the plugin "[login to view URL]", and does not require registration. When submitting, an email address MAY be included by the user. I need a notification to be sent to that email.

1. You must work on this on your own testing site, I won't be giving out access due to security

2. I'm open to other options to accomplish this

3. Neep done ASAP!

4. Ask questions!!

CSS MySQL PHP Kubuni Tovuti WordPress

Kitambulisho cha Mradi: #18866778

Kuhusu mradi

5 mapendekezo Mradi wa mbali Ipo mtandaoni %project.latestActivity_relativeTime|badilisha%

5 wafanyakazi huru wanazabuni wastani wa $31 kwa kazi hii

alyaspk

Hi, I am ready to fix your emailing issue and assure 100% satisfaction guarantee. Looking forward to your fruitfully response. Regards Muhammad Alyas

$35 CAD kwa siku 1
(Maoni 221)
7.5
deepaulakh

Hello, Trust you are doing well! I have ample experience CSS, HTML, PHP, Website Design, WordPress. I have checked your requirements exactly. I am the responsible for the working and try to keep the best rela Zaidi

$30 CAD kwa siku 2
(Maoni 103)
6.0
hassanmustafa01

Hi, I have read your project description and willing to do this for you in your required time spam with 100% Satisfaction. Kindly message me so we can discuss in detail over chat......

$30 CAD kwa siku 1
(Maoni 73)
5.7
nnnmiles

Hello Sir, Wordpress I can start right now. I accept payment to be done only after u are 100% satisfied with the job done. Thanks, Naum

$30 CAD kwa siku 1
(Maoni 24)
5.1