Files
sean 0e8a8b3028
Some checks are pending
deploy-testing / deploy (push) Waiting to run
Initial testing snapshot
2026-11-17 16:15:01 -05:00

39 lines
1013 B
PHP

<?php
if (wprss_can_use_twig()) {
/* The introduction page module */
require_once(WPRSS_INC . 'admin-intro-page.php');
/* The update page module */
require_once(WPRSS_INC . 'admin-update-page.php');
}
/**
* Detects an activation and redirects the user to the correct page (intro or update).
*
* @since 4.12.1
*/
add_action('admin_init', function () {
// Continue only if during an activation redirect
if (!get_transient('_wprss_activation_redirect')) {
return;
}
// Delete the redirect transient
delete_transient('_wprss_activation_redirect');
// Continue only if activating from a non-network site and not bulk activating plugins
if (is_network_admin() || isset($_GET['activate-multi'])) {
return;
}
if (wprss_should_do_intro_page()) {
wp_safe_redirect(wprss_get_intro_page_url());
return;
}
if (wprss_should_do_update_page()) {
wp_safe_redirect(wprss_get_update_page_url());
return;
}
});