true ) ); } if ( version_compare( $wp_version, SHAPETRANSLATE_MINIMUM_WP_VERSION, '<' ) ) { wp_die( esc_html__( 'ShapeTranslate could not be activated because the WordPress requirement is not met.', 'shapetranslate' ), esc_html__( 'Plugin activation failed', 'shapetranslate' ), array( 'back_link' => true ) ); } $activate_site = static function () { Installer::install(); delete_option( RoutingModule::REWRITE_SIGNATURE_OPTION ); }; if ( $network_wide && is_multisite() ) { Installer::for_each_site( $activate_site ); } else { $activate_site(); } if ( ! $network_wide && ! wp_doing_ajax() && ! wp_doing_cron() && ! ( defined( 'WP_CLI' ) && WP_CLI ) ) { set_transient( self::SETUP_REDIRECT_TRANSIENT, 1, 10 * MINUTE_IN_SECONDS ); } do_action( 'shapetranslate_activated' ); } }