WordPress.org

Plugin Directory

Changeset 486243


Ignore:
Timestamp:
01/07/12 17:43:15 (2 years ago)
Author:
wpmuguru
Message:

don\'t redirect on post preview

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wordpress-mu-domain-mapping/trunk/domain_mapping.php

    r477306 r486243  
    621621 
    622622function dm_redirect_admin() { 
     623    // don't redirect admin ajax calls 
    623624    if ( strpos( $_SERVER['REQUEST_URI'], 'wp-admin/admin-ajax.php' ) !== false ) 
    624625        return; 
     
    707708function redirect_to_mapped_domain() { 
    708709    global $current_blog, $wpdb; 
     710 
     711    // don't redirect post previews 
     712    if ( isset( $_GET['preview'] ) && $_GET['preview'] == 'true' ) 
     713        return; 
     714 
    709715    if ( !isset( $_SERVER[ 'HTTPS' ] ) ) 
    710716        $_SERVER[ 'HTTPS' ] = 'off'; 
    711     $protocol = ( 'on' == strtolower($_SERVER['HTTPS']) ) ? 'https://' : 'http://'; 
     717    $protocol = ( 'on' == strtolower( $_SERVER['HTTPS'] ) ) ? 'https://' : 'http://'; 
    712718    $url = domain_mapping_siteurl( false ); 
    713719    if ( $url && $url != untrailingslashit( $protocol . $current_blog->domain . $current_blog->path ) ) { 
Note: See TracChangeset for help on using the changeset viewer.