New answers tagged

0

I would explore the use of scheduled events in WorPdress, known as wp-cron. Here is a example for that (not tested, just written here as proof of concept): // 1.- Register custom escheduled event on plugin activiation register_activation_hook( __FILE__, 'cyb_plugin_activation' ); function cyb_plugin_activation() { if( ! wp_next_scheduled( '...


4

You can change the email address with the wp_mail_from filter: add_filter( 'wp_mail_from', function() { return 'web@example.com'; } );


1

You can use the function get_the_author_meta() to get the emailaddress of the author of the current post and the wp_mail()function to send an e-mail <?php $timelimit=1 * 604800; //1 week * seconds per day $post_age = date('U') - get_post_time('U'); if ($post_age < $timelimit) : ?> // Current <?php elseif ($post_age > $timelimit) : $...


0

First the way to do this is with a form using the post method, it is slightly easier to understand: <!-- form with AJAX action and iframe target --> <form method="post" action="<?php echo admin_url('admin-ajax.php'); ?>" target="emailsendframe"> <!-- AJAX action field to trigger function--> <input type="hidden" name="action" value=...



Top 50 recent answers are included