'ids' ] ) ); return; } static::create_default_kit(); set_transient( 'elementor_activation_redirect', true, MINUTE_IN_SECONDS ); } /** * Uninstall Elementor. * * Set Elementor uninstallation hook. * * Fired by `register_uninstall_hook` when the plugin is uninstalled. * * @since 1.0.0 * @access public * @static */ public static function uninstall() { wp_clear_scheduled_hook( 'elementor/tracker/send_event' ); } /** * Init. * * Initialize Elementor Maintenance. * * @since 1.0.0 * @access public * @static */ public static function init() { register_activation_hook( ELEMENTOR_PLUGIN_BASE, [ __CLASS__, 'activation' ] ); register_uninstall_hook( ELEMENTOR_PLUGIN_BASE, [ __CLASS__, 'uninstall' ] ); add_action( 'wpmu_new_blog', function ( $site_id ) { if ( ! is_plugin_active_for_network( ELEMENTOR_PLUGIN_BASE ) ) { return; } static::create_default_kit( [ $site_id ] ); } ); } /** * @param array $site_ids */ private static function create_default_kit( array $site_ids = [] ) { if ( ! empty( $site_ids ) ) { foreach ( $site_ids as $site_id ) { switch_to_blog( $site_id ); Manager::create_default_kit(); restore_current_blog(); }; return; } Manager::create_default_kit(); } }