1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
<?php /** * WPSEO plugin file. * * @package WPSEO\Admin\Links */
/** * Represents the utils for the links module. */ class WPSEO_Link_Utils {
/** * Returns the value that is part of the given url. * * @param string $url The url to parse. * @param string $part The url part to use. * * @return string The value of the url part. */ public static function get_url_part( $url, $part ) { $url_parts = wp_parse_url( $url );
if ( isset( $url_parts[ $part ] ) ) { return $url_parts[ $part ]; }
return ''; } }
|