Quantcast
Channel: Topic Tag: action | WordPress.org
Viewing all articles
Browse latest Browse all 892

webninjrdesign on "Programmatically Disable Cron in functions.php"

$
0
0

Hey,

I build custom themes for WP and I setup server side cron jobs. I've been disabling cron in the wp-config using...

define('DISABLE_WP_CRON', 'true');

However I would prefer to do this in the themes functions if possible, as it's one less step in my setup.

I'm pretty sure I've found what I need to do, but was hoping some WP geniuses could advise.

I'm using remove_action('init', 'wp_cron'); as from what I can tell that is what WP does when the customizer is shown. As the action is called on 'init' it should be sweet.

Does anyone see any issues with this method that I am unaware of? Cheers.


Viewing all articles
Browse latest Browse all 892

Trending Articles