array( __( 'Monthly', 'maintained-log' ), __( 'Recommended. On the 1st of each month, with everything from the previous month.', 'maintained-log' ) ),
'weekly' => array( __( 'Weekly', 'maintained-log' ), __( 'Every Monday. For clients who want closer follow-up.', 'maintained-log' ) ),
'bimonthly' => array( __( 'Every two months', 'maintained-log' ), __( 'In January, March, May, July, September and November, with the previous two months.', 'maintained-log' ) ),
'quarterly' => array( __( 'Quarterly', 'maintained-log' ), __( 'In January, April, July and October, with the previous three months. For sites with little activity.', 'maintained-log' ) ),
'semiannual' => array( __( 'Every six months', 'maintained-log' ), __( 'In January and July, with the previous six months.', 'maintained-log' ) ),
'never' => array( __( 'Only when I send it', 'maintained-log' ), __( 'Nothing is sent automatically; you send it from the "Client report" screen.', 'maintained-log' ) ),
)
);
self::hint( __( 'Before each automatic report, the site is checked again. If something fails, the report waits until it is fixed and you get an email, so the client never receives bad news you have not seen first.', 'maintained-log' ) );
}
/**
* Step 4.
*
* @param array $s Settings.
*/
private static function step_alerts( array $s ) {
self::heading( __( 'Your alerts', 'maintained-log' ), __( 'These emails are for you, not for the client. They warn you when there is something to do, so you do not have to remember to check.', 'maintained-log' ) );
self::text( 'admin_recipients', __( 'Where should we warn you', 'maintained-log' ), $s['admin_recipients'], __( 'Your email or your team\'s. Client replies to the report will also arrive here.', 'maintained-log' ) );
$maintainers = Settings::maintainers() ? Settings::maintainers() : array( get_current_user_id() );
?>
array( __( 'Weekly', 'maintained-log' ), __( 'Recommended. One summary a week with what is waiting to be updated.', 'maintained-log' ) ),
'daily' => array( __( 'Daily', 'maintained-log' ), __( 'For sites where you want to update as soon as possible.', 'maintained-log' ) ),
'never' => array( __( 'Never', 'maintained-log' ), __( 'If you already track updates another way.', 'maintained-log' ) ),
)
);
self::toggle( 'alert_on_failure', __( 'Warn me right away if something breaks', 'maintained-log' ), $s['alert_on_failure'], __( 'If a page stops working after an update, you get an email at once.', 'maintained-log' ) );
self::toggle( 'tech_alert', __( 'Warn me about technical problems', 'maintained-log' ), $s['tech_alert'], __( 'For example, when the security certificate is about to expire or the PHP version stops receiving security updates.', 'maintained-log' ) );
}
/**
* Step 5.
*
* @param array $s Settings.
*/
private static function step_checks( array $s ) {
self::heading( __( 'Site checks', 'maintained-log' ), __( 'After each update, Maintained.log opens the pages you choose here, as a visitor would, and checks that they load. It is the proof that the site still works.', 'maintained-log' ) );
$current = array();
foreach ( Health_Checks::targets() as $target ) {
$current[ untrailingslashit( $target['url'] ) ] = $target['expected'];
}
$candidates = array( home_url( '/' ) => __( 'Home page', 'maintained-log' ) );
$pages = get_pages(
array(
'sort_column' => 'menu_order,post_title',
'number' => 25,
)
);
foreach ( $pages as $page ) {
$candidates[ get_permalink( $page ) ] = $page->post_title ? $page->post_title : __( '(no title)', 'maintained-log' );
}
foreach ( $current as $url => $expected ) {
$found = false;
foreach ( array_keys( $candidates ) as $candidate ) {
if ( untrailingslashit( $candidate ) === $url ) {
$found = true;
}
}
if ( ! $found ) {
$candidates[ $url ] = $url;
}
}
?>
array( __( 'Monthly', 'maintained-log' ), __( 'Recommended. You get an email; checking takes one minute in the hosting panel and one click here.', 'maintained-log' ) ),
'90' => array( __( 'Quarterly', 'maintained-log' ), '' ),
'0' => array( __( 'Never', 'maintained-log' ), '' ),
)
);
self::hint( __( 'WordPress cannot see the copies made by the hosting, so the plugin does not check them by itself. Confirming them now and then is what lets the report say "backups checked on…" with a real date.', 'maintained-log' ) );
}
/**
* Step 7.
*
* @param array $s Settings.
*/
private static function step_visibility( array $s ) {
self::heading( __( 'Visibility for your client', 'maintained-log' ), __( 'Besides the email, your client can see the maintenance every day, without asking you.', 'maintained-log' ) );
self::toggle( 'dashboard_widget', __( 'A "Website maintenance" box on the WordPress dashboard', 'maintained-log' ), $s['dashboard_widget'], __( 'Recommended. When your client logs in to WordPress, they see at the top that the site is maintained by you, when it was last reviewed and whether everything works.', 'maintained-log' ) );
self::toggle( 'public_report_enabled', __( 'A private link to each report', 'maintained-log' ), $s['public_report_enabled'], __( 'The report can also be opened in a browser, saved as PDF and forwarded. The link is secret but anyone who has it can see the report (which lists the installed plugins), and you can cancel it at any time.', 'maintained-log' ) );
}
/**
* Step 8.
*
* @param array $s Settings.
*/
private static function step_modules( array $s ) {
self::heading( __( 'Extras (optional)', 'maintained-log' ), __( 'Two features that add a lot to the report. Each one needs a free key from an external service, so you can leave them for later without any problem.', 'maintained-log' ) );
?>