Skip to content

Commit 304c141

Browse files
authored
release: v3.12.4
### Enhancements - **Add Filter for Overriding DISABLE_WP_CRON Check**: Introduced a filter for overriding the DISABLE_WP_CRON check in the context - optml_offload_wp_cron_disabled.
2 parents 4ff023e + 0af51a8 commit 304c141

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

inc/admin.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1142,6 +1142,8 @@ private function localize_dashboard_app() {
11421142
}
11431143
}
11441144

1145+
$cron_disabled = apply_filters( 'optml_offload_wp_cron_disabled', defined( 'DISABLE_WP_CRON' ) && constant( 'DISABLE_WP_CRON' ) === true );
1146+
11451147
return [
11461148
'strings' => $this->get_dashboard_strings(),
11471149
'assets_url' => OPTML_URL . 'assets/',
@@ -1164,7 +1166,7 @@ private function localize_dashboard_app() {
11641166
'days_since_install' => round( ( time() - get_option( 'optimole_wp_install', 0 ) ) / DAY_IN_SECONDS ),
11651167
'is_offload_media_available' => $is_offload_media_available,
11661168
'auto_connect' => $auto_connect,
1167-
'cron_disabled' => defined( 'DISABLE_WP_CRON' ) && DISABLE_WP_CRON && ! function_exists( 'as_schedule_single_action' ),
1169+
'cron_disabled' => $cron_disabled && ! function_exists( 'as_schedule_single_action' ),
11681170
'submenu_links' => [
11691171
[
11701172
'href' => 'admin.php?page=optimole#settings',

0 commit comments

Comments
 (0)