Skip to content

Commit 6ce6235

Browse files
Fix for unatenticated redirect loop.
1 parent 8ceea84 commit 6ce6235

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

library/Bootstrap.php

+4-3
Original file line numberDiff line numberDiff line change
@@ -45,25 +45,26 @@
4545
require_once MUNICIPIO_PATH . 'plugins/advanced-custom-fields-font-awesome/acf-font-awesome.php';
4646
}
4747

48+
4849
/**
4950
* Initialize app
5051
*/
5152
if (function_exists('get_field')) {
5253
new Municipio\App();
5354
} else {
54-
5555
//Be shure to enable ACF
5656
if (!is_admin()) {
5757
if(is_user_logged_in()) {
5858
wp_redirect(admin_url('plugins.php'));
5959
exit;
6060
} else {
61-
auth_redirect();
61+
if(!in_array($GLOBALS['pagenow'], array('wp-login.php', 'wp-register.php'))) {
62+
auth_redirect();
63+
}
6264
}
6365
} else {
6466
add_action('admin_notices', function () {
6567
echo '<div class="notice notice-error"><p>Please active ACF (PRO) to proceed.</p></div>';
6668
});
6769
}
68-
6970
}

0 commit comments

Comments
 (0)