HEX
Server: Apache
System: Linux p3plzcpnl504902.prod.phx3.secureserver.net 4.18.0-553.54.1.lve.el8.x86_64 #1 SMP Wed Jun 4 13:01:13 UTC 2025 x86_64
User: nhqyemt2u0zd (3690907)
PHP: 7.2.34
Disabled: NONE
Upload Files
File: /home/nhqyemt2u0zd/www/wp-content/plugins/wordpress-seo/admin/links/class-link-utils.php
<?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 '';
	}
}