How do I email a new page password to somebody every month?

Question

I want to email the new page password to somebody every month. I see no reason why this cannot be adapted.

First I guess I need to change this:

add_filter( 'cron_schedules', function( $schedules )
{
    // Our custom cron interval:
    $schedules['every_2nd_day'] = array(
        'interval'  => 2 * DAY_IN_SECONDS,
        'display'   => 'Once every second day'
    );

to

add_filter( 'cron_schedules', function( $schedules )
{
    // Our custom cron interval:
    $schedules['every_month'] = array(
        'interval'  => 1 * MONTH_IN_SECONDS,
        'display'   => 'Once every Month'
    );

And change the code again later where ‘every_2nd_day’ is referenced. Then how do I a) set up an automated email, and b) package the code as a plugin and install it?

Is that all I need do. I assume this script is still secure, and valid for current WordPress?

0
, , , samerivertwice 8 months 0 Answers 49 views 0

Leave an answer