|  | @@ 328-339 (lines=12) @@ | 
                                                            
                                    | 325 |  | 		); | 
                                                            
                                    | 326 |  | 		return in_array( $origin, $whitelist ) ? $origin : 'https://wordpress.com'; | 
                                                            
                                    | 327 |  |  | 
                                                            
                                    | 328 |  | 		function get_site_suffix() { | 
                                                            
                                    | 329 |  | 			if ( class_exists( 'Jetpack' ) && method_exists( 'Jetpack', 'build_raw_urls' ) ) { | 
                                                            
                                    | 330 |  | 				$site_suffix = Jetpack::build_raw_urls( home_url() ); | 
                                                            
                                    | 331 |  | 			} elseif ( class_exists( 'WPCOM_Masterbar' ) && method_exists( 'WPCOM_Masterbar', 'get_calypso_site_slug' ) ) { | 
                                                            
                                    | 332 |  | 				$site_suffix = WPCOM_Masterbar::get_calypso_site_slug( get_current_blog_id() ); | 
                                                            
                                    | 333 |  | 			} | 
                                                            
                                    | 334 |  |  | 
                                                            
                                    | 335 |  | 			if ( $site_suffix ) { | 
                                                            
                                    | 336 |  | 				return "/${site_suffix}"; | 
                                                            
                                    | 337 |  | 			} | 
                                                            
                                    | 338 |  | 			return ''; | 
                                                            
                                    | 339 |  | 		} | 
                                                            
                                    | 340 |  | 	} | 
                                                            
                                    | 341 |  |  | 
                                                            
                                    | 342 |  | 	/** | 
                                                                                
                                |  | @@ 350-361 (lines=12) @@ | 
                                                            
                                    | 347 |  | 	 * | 
                                                            
                                    | 348 |  | 	 * @return string | 
                                                            
                                    | 349 |  | 	 */ | 
                                                            
                                    | 350 |  | 	private function get_site_suffix() { | 
                                                            
                                    | 351 |  | 		if ( class_exists( 'Jetpack' ) && method_exists( 'Jetpack', 'build_raw_urls' ) ) { | 
                                                            
                                    | 352 |  | 			$site_suffix = Jetpack::build_raw_urls( home_url() ); | 
                                                            
                                    | 353 |  | 		} elseif ( class_exists( 'WPCOM_Masterbar' ) && method_exists( 'WPCOM_Masterbar', 'get_calypso_site_slug' ) ) { | 
                                                            
                                    | 354 |  | 			$site_suffix = WPCOM_Masterbar::get_calypso_site_slug( get_current_blog_id() ); | 
                                                            
                                    | 355 |  | 		} | 
                                                            
                                    | 356 |  |  | 
                                                            
                                    | 357 |  | 		if ( $site_suffix ) { | 
                                                            
                                    | 358 |  | 			return "/${site_suffix}"; | 
                                                            
                                    | 359 |  | 		} | 
                                                            
                                    | 360 |  | 		return ''; | 
                                                            
                                    | 361 |  | 	} | 
                                                            
                                    | 362 |  |  | 
                                                            
                                    | 363 |  | 	/** | 
                                                            
                                    | 364 |  | 	 * Returns the Calypso URL that displays either the current post type list (if no args |