jetpack_display_posts_widget_conditionally_activate_cron

Activates the cron only when needed.

Description

jetpack_display_posts_widget_conditionally_activate_cron(); 

Usage

  1. if ( !function_exists( 'jetpack_display_posts_widget_conditionally_activate_cron' ) ) { 
  2. require_once '/modules/widgets/wordpress-post-widget.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = jetpack_display_posts_widget_conditionally_activate_cron(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/modules/widgets/wordpress-post-widget.php  
  1. function jetpack_display_posts_widget_conditionally_activate_cron() { 
  2. $widget = new Jetpack_Display_Posts_Widget(); 
  3. if ( $widget->should_cron_be_running() ) { 
  4. $widget->activate_cron(); 
  5.  
  6. unset( $widget );