jetpack_conditionally_activate_cron_on_plugin_activation

Executed when Jetpack gets activated.

Description

jetpack_conditionally_activate_cron_on_plugin_activation( (string) $plugin_file_name ); 

Tries to activate the cron if it is needed.

Parameters (1)

0. $plugin_file_name (string)
The plugin file that was activated.

Usage

  1. if ( !function_exists( 'jetpack_conditionally_activate_cron_on_plugin_activation' ) ) { 
  2. require_once '/modules/widgets/wordpress-post-widget.php'; 
  3.  
  4. // The plugin file that was activated. 
  5. $plugin_file_name = ''; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = jetpack_conditionally_activate_cron_on_plugin_activation($plugin_file_name); 
  9.  

Defined (1)

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

/modules/widgets/wordpress-post-widget.php  
  1. function jetpack_conditionally_activate_cron_on_plugin_activation( $plugin_file_name ) { 
  2. if ( plugin_basename( JETPACK__PLUGIN_FILE ) === $plugin_file_name ) { 
  3. jetpack_display_posts_widget_conditionally_activate_cron();