Skip to content

kabarovsky/wp-posts-to-alerts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 

Repository files navigation

wp-posts-to-alerts

Each WordPress post is an event, and the date of the event has been set in ACF repeater sub-field.

alertsEmailBody() is for returning tomorrow's events, called for $message argument in wp_mail() function.

wp_next_scheduled() is for scheduling an event (the following function) on a daily basis.

sendingAlerts() checks if there are any events tomorrow, and if yes, wp_mail() will follow and actually send the message.

Resources:

https://codex.wordpress.org/Function_Reference/wp_next_scheduled
https://codex.wordpress.org/Plugin_API/Filter_Reference/wp_mail
https://www.advancedcustomfields.com/resources/query-posts-custom-fields/

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages