mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-06-05 15:09:37 +09:00
Merge branch 'master' of https://github.com/ultimatemember/ultimatemember
This commit is contained in:
@@ -585,27 +585,25 @@ function um_redirect_home() {
|
||||
* @param $url
|
||||
*/
|
||||
function um_js_redirect( $url ) {
|
||||
if (headers_sent() || empty( $url )) {
|
||||
if ( headers_sent() || empty( $url ) ) {
|
||||
//for blank redirects
|
||||
if ('' == $url) {
|
||||
if ( '' == $url ) {
|
||||
$url = set_url_scheme( '//' . $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"] );
|
||||
}
|
||||
|
||||
$funtext = "echo \"<script data-cfasync='false' type='text/javascript'>window.location = '" . $url . "'</script>\";";
|
||||
register_shutdown_function( create_function( '', $funtext ) );
|
||||
register_shutdown_function( function( $url ) {
|
||||
echo '<script data-cfasync="false" type="text/javascript">window.location = "' . $url . '"</script>';
|
||||
}, $url );
|
||||
|
||||
if (1 < ob_get_level()) {
|
||||
while (ob_get_level() > 1) {
|
||||
if ( 1 < ob_get_level() ) {
|
||||
while ( ob_get_level() > 1 ) {
|
||||
ob_end_clean();
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
<script data-cfasync='false' type="text/javascript">
|
||||
window.location = '<?php echo $url; ?>';
|
||||
</script>
|
||||
<?php
|
||||
exit;
|
||||
} ?>
|
||||
<script data-cfasync='false' type="text/javascript">
|
||||
window.location = '<?php echo $url; ?>';
|
||||
</script>
|
||||
<?php exit;
|
||||
} else {
|
||||
wp_redirect( $url );
|
||||
}
|
||||
@@ -1603,6 +1601,7 @@ function um_multi_admin_email() {
|
||||
$emails_array = array_map( 'trim', $emails_array );
|
||||
}
|
||||
|
||||
$emails_array = array_unique( $emails_array );
|
||||
return $emails_array;
|
||||
}
|
||||
|
||||
@@ -2655,7 +2654,5 @@ function is_ultimatemember() {
|
||||
* Maybe set empty time limit
|
||||
*/
|
||||
function um_maybe_unset_time_limit() {
|
||||
if ( ! ini_get( 'safe_mode' ) ) {
|
||||
@set_time_limit(0);
|
||||
}
|
||||
@set_time_limit( 0 );
|
||||
}
|
||||
Reference in New Issue
Block a user