first commit

This commit is contained in:
2024-11-04 20:48:19 +01:00
commit 2fa33a3be9
7968 changed files with 2313063 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
<?php
defined( 'ABSPATH' ) or exit;
$options = (array) get_option( 'mc4wp', array() );
if ( empty( $options['allow_usage_tracking'] ) ) {
return;
}
// usage tracking is enabled, reschedule it so it uses new cron schedule.
// make sure 'monthly' cron schedule is registered
/**
* @ignore
*/
function _mc4wp_303_add_monthly_cron_schedule( $schedules ) {
$schedules['monthly'] = array(
'interval' => 30 * DAY_IN_SECONDS,
'display' => 'Once a month',
);
return $schedules;
}
add_filter( 'cron_schedules', '_mc4wp_303_add_monthly_cron_schedule', 1 );
// reschedule usage tracking event
wp_clear_scheduled_hook( 'mc4wp_usage_tracking' );
wp_schedule_event( time(), 'monthly', 'mc4wp_usage_tracking' );