_inc/lib/class-jetpack-instagram-gallery-helper.php 1 location
                
                
                    
                                                
                                                    
                                |  | @@ 103-114 (lines=12) @@ | 
                                                            
                                    | 100 |  | 	 * | 
                                                            
                                    | 101 |  | 	 * @return mixed | 
                                                            
                                    | 102 |  | 	 */ | 
                                                            
                                    | 103 |  | 	public static function get_site_id() { | 
                                                            
                                    | 104 |  | 		$is_wpcom = ( defined( 'IS_WPCOM' ) && IS_WPCOM ); | 
                                                            
                                    | 105 |  | 		$site_id  = $is_wpcom ? get_current_blog_id() : Jetpack_Options::get_option( 'id' ); | 
                                                            
                                    | 106 |  | 		if ( ! $site_id ) { | 
                                                            
                                    | 107 |  | 			return new WP_Error( | 
                                                            
                                    | 108 |  | 				'unavailable_site_id', | 
                                                            
                                    | 109 |  | 				__( 'Sorry, something is wrong with your Jetpack connection.', 'jetpack' ), | 
                                                            
                                    | 110 |  | 				403 | 
                                                            
                                    | 111 |  | 			); | 
                                                            
                                    | 112 |  | 		} | 
                                                            
                                    | 113 |  | 		return (int) $site_id; | 
                                                            
                                    | 114 |  | 	} | 
                                                            
                                    | 115 |  | } | 
                                                            
                                    | 116 |  |  | 
                                                                        
                 
                                                            
                    
_inc/lib/class-jetpack-tweetstorm-helper.php 1 location
                
                
                    
                                                
                                                    
                                |  | @@ 1679-1690 (lines=12) @@ | 
                                                            
                                    | 1676 |  | 	 * | 
                                                            
                                    | 1677 |  | 	 * @return mixed | 
                                                            
                                    | 1678 |  | 	 */ | 
                                                            
                                    | 1679 |  | 	public static function get_site_id() { | 
                                                            
                                    | 1680 |  | 		$is_wpcom = ( defined( 'IS_WPCOM' ) && IS_WPCOM ); | 
                                                            
                                    | 1681 |  | 		$site_id  = $is_wpcom ? get_current_blog_id() : Jetpack_Options::get_option( 'id' ); | 
                                                            
                                    | 1682 |  | 		if ( ! $site_id ) { | 
                                                            
                                    | 1683 |  | 			return new WP_Error( | 
                                                            
                                    | 1684 |  | 				'unavailable_site_id', | 
                                                            
                                    | 1685 |  | 				__( 'Sorry, something is wrong with your Jetpack connection.', 'jetpack' ), | 
                                                            
                                    | 1686 |  | 				403 | 
                                                            
                                    | 1687 |  | 			); | 
                                                            
                                    | 1688 |  | 		} | 
                                                            
                                    | 1689 |  | 		return (int) $site_id; | 
                                                            
                                    | 1690 |  | 	} | 
                                                            
                                    | 1691 |  | } | 
                                                            
                                    | 1692 |  |  |