mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-11 18:56:10 +09:00
- fixed integration with User Tags extension (remove some hardcode, changed to hooks);
- fixed 2.0 upgrades for User roles meta data; - clear/review code;
This commit is contained in:
@@ -177,45 +177,14 @@ if ( ! class_exists( 'UM_Functions' ) ) {
|
||||
}
|
||||
|
||||
|
||||
function excluded_taxonomies() {
|
||||
$taxes = array(
|
||||
'nav_menu',
|
||||
'link_category',
|
||||
'post_format',
|
||||
);
|
||||
|
||||
/*
|
||||
* redirect
|
||||
*/
|
||||
function redirect( $url ) {
|
||||
if ( headers_sent() || empty( $url ) ) {
|
||||
$this->cc_js_redirect( $url );
|
||||
} else {
|
||||
wp_redirect( $url );
|
||||
}
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* JS redirect
|
||||
*/
|
||||
function cc_js_redirect( $url ) {
|
||||
|
||||
//for blank redirects
|
||||
if ( '' == $url ) {
|
||||
$url = ( is_ssl() ? 'https://' : 'http://' ) . $_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 ) );
|
||||
|
||||
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;
|
||||
return apply_filters( 'um_excluded_taxonomies', $taxes );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user