This commit is contained in:
KhaiNguyen
2020-02-13 10:39:37 +07:00
commit 59401cb805
12867 changed files with 4646216 additions and 0 deletions

View File

@@ -0,0 +1,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 '';
}
}