| @@ 28-33 (lines=6) @@ | ||
| 25 | * @param string $url the full URL. |
|
| 26 | * @return string $url without the guff |
|
| 27 | */ |
|
| 28 | private static function build_raw_urls( $url ) { |
|
| 29 | $strip_http = '/.*?:\/\//i'; |
|
| 30 | $url = preg_replace( $strip_http, '', $url ); |
|
| 31 | $url = str_replace( '/', '::', $url ); |
|
| 32 | return $url; |
|
| 33 | } |
|
| 34 | ||
| 35 | /** |
|
| 36 | * Builds and returns an URL using the jetpack.com/redirect/ service |
|
| @@ 7033-7038 (lines=6) @@ | ||
| 7030 | * @param string | url |
|
| 7031 | * @return string | url without the guff |
|
| 7032 | */ |
|
| 7033 | public static function build_raw_urls( $url ) { |
|
| 7034 | $strip_http = '/.*?:\/\//i'; |
|
| 7035 | $url = preg_replace( $strip_http, '', $url ); |
|
| 7036 | $url = str_replace( '/', '::', $url ); |
|
| 7037 | return $url; |
|
| 7038 | } |
|
| 7039 | ||
| 7040 | /** |
|
| 7041 | * Stores and prints out domains to prefetch for page speed optimization. |
|