nce' ); } } public function check_upgrade() { $db_version = get_option( 'autoptimize_ccss_version', '' ); if ( AO_CCSS_VER !== $db_version ) { // check schedules & re-schedule if needed. $this->on_upgrade(); // and update db_version. update_option( 'autoptimize_ccss_version', AO_CCSS_VER ); } } public function ao_ccss_interval( $schedules ) { // Let interval be configurable. if ( ! defined( 'AO_CCSS_DEBUG_INTERVAL' ) ) { $intsec = 600; } else { $intsec = AO_CCSS_DEBUG_INTERVAL; if ( $intsec >= 120 ) { $inttxt = $intsec / 60 . ' minutes'; } else { $inttxt = $intsec . ' second(s)'; } autoptimizeCriticalCSSCore::ao_ccss_log( 'Using custom WP-Cron interval of ' . $inttxt, 3 ); } // Attach interval to schedule. $schedules['ao_ccss'] = array( 'interval' => $intsec, 'display' => __( 'Autoptimize CriticalCSS' ), ); return $schedules; } }