'; $function .= sprintf( __( 'Only one iThemes Sync plugin can be active at a time. The plugin at %1$s is running while the plugin at %2$s was skipped in order to prevent errors. Please deactivate the plugin that you do not wish to use.', 'it-l10n-ithemes-sync' ), $active_plugin_path, $this_plugin_path ); $function .= '

\';'; $function_ref = create_function( '', $function ); add_action( 'all_admin_notices', $function_ref, 0 ); } return; } $GLOBALS['ithemes_sync_path'] = dirname( __FILE__ ); require( $GLOBALS['ithemes_sync_path'] . '/load.php' ); /** * On activation, set a time, frequency and name of an action hook to be scheduled. * * @since 1.12.0 */ function ithemes_sync_activation() { if ( ! wp_next_scheduled ( 'ithemes_sync_daily_schedule' ) ) { wp_schedule_event( strtotime( 'Tomorrow 2AM' ), 'daily', 'ithemes_sync_daily_schedule' ); } } register_activation_hook( __FILE__, 'ithemes_sync_activation' ); /** * On deactivation, remove all functions from the scheduled action hook. * * @since 1.12.0 */ function ithemes_sync_deactivation() { wp_clear_scheduled_hook( 'ithemes_sync_daily_schedule' ); } register_deactivation_hook( __FILE__, 'ithemes_sync_deactivation' );