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?

--------------------------------------------------

>>> Share a link to this question, just copy and paste the code bellow on your web page <<<

<a href="https://www.wptricks.com/question/how-do-i-email-a-new-page-password-to-somebody-every-month/">

How do I email a new page password to somebody every month?</a>
0
, , , samerivertwice 3 days 0 Answers 7 views 0

Leave an answer