WordPress.org

Plugin Directory

Changeset 626180


Ignore:
Timestamp:
11/16/12 15:44:14 (17 months ago)
Author:
stephdau
Message:

Jetpack: Carousel: using is_multisite() instead of function_exists('switch_to_blog') and basing further tests on $switched, for clearer intent.
See http://wordpress.org/support/topic/plugin-jetpack-cant-comment-on-carousel-images-error

File:
1 edited

Legend:

Unmodified
Added
Removed
  • jetpack/trunk/modules/carousel/jetpack-carousel.php

    r626158 r626180  
    299299        // Used in context like NewDash 
    300300        $switched = false; 
    301         if ( function_exists('switch_to_blog') && $_blog_id != get_current_blog_id() ) { 
     301        if ( is_multisite() && $_blog_id != get_current_blog_id() ) { 
    302302            switch_to_blog( $_blog_id ); 
    303303            $switched = true; 
     
    351351        $comment_status = wp_get_comment_status( $comment_id ); 
    352352 
    353         if ( function_exists('restore_current_blog') && true == $switched ) 
     353        if ( true == $switched ) 
    354354            restore_current_blog(); 
    355355 
Note: See TracChangeset for help on using the changeset viewer.