Skip to content

Commit

Permalink
release: v3.12.4
Browse files Browse the repository at this point in the history
### 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.
  • Loading branch information
abaicus authored Jan 25, 2024
2 parents 4ff023e + 0af51a8 commit 304c141
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion inc/admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -1142,6 +1142,8 @@ private function localize_dashboard_app() {
}
}

$cron_disabled = apply_filters( 'optml_offload_wp_cron_disabled', defined( 'DISABLE_WP_CRON' ) && constant( 'DISABLE_WP_CRON' ) === true );

return [
'strings' => $this->get_dashboard_strings(),
'assets_url' => OPTML_URL . 'assets/',
Expand All @@ -1164,7 +1166,7 @@ private function localize_dashboard_app() {
'days_since_install' => round( ( time() - get_option( 'optimole_wp_install', 0 ) ) / DAY_IN_SECONDS ),
'is_offload_media_available' => $is_offload_media_available,
'auto_connect' => $auto_connect,
'cron_disabled' => defined( 'DISABLE_WP_CRON' ) && DISABLE_WP_CRON && ! function_exists( 'as_schedule_single_action' ),
'cron_disabled' => $cron_disabled && ! function_exists( 'as_schedule_single_action' ),
'submenu_links' => [
[
'href' => 'admin.php?page=optimole#settings',
Expand Down

0 comments on commit 304c141

Please sign in to comment.