packages/kirki-framework/url-getter/src/URL.php
public function get_url() {

		/**
		 * Start by replacing ABSPATH with site_url.
		 * This is not accurate at all and only serves as a fallback in case everything else fails.
		 */
		$this->url = \str_replace( ABSPATH, \trailingslashit( \site_url() ), $this->path );

		/**
		 * If the file-path is inside wp-content replace the content-path with the content-url.
		 * This serves as a fallback in case the other tests below fail.
		 */
		if ( false !== \strpos( $this->path, self::$content_path ) ) {
			$this->url = \str_replace( self::$content_path, self::$content_url, $this->path );
		}

		/**
		 * If the file is in a parent theme use the template directory.
		 */
		if ( $this->in_parent_theme() ) {
			$this->url = \get_template_directory_uri() . \str_replace( \get_template_directory(), '', $this->path );
		}

		/**
		 * If the file is in a child-theme use the stylesheet directory.
		 */
		if ( ! $this->in_parent_theme() && $this->in_child_theme() ) {
			$this->url = \get_stylesheet_directory_uri() . \str_replace( \get_stylesheet_directory(), '', $this->path );
		}

		$this->url = \set_url_scheme( $this->url );
		return \apply_filters( 'kirki_path_url', $this->url, $this->path );
	}
public function get_url() {

		/**
		 * Start by replacing ABSPATH with site_url.
		 * This is not accurate at all and only serves as a fallback in case everything else fails.
		 */
		$this->url = \str_replace( ABSPATH, \trailingslashit( \site_url() ), $this->path );

		/**
		 * If the file-path is inside wp-content replace the content-path with the content-url.
		 * This serves as a fallback in case the other tests below fail.
		 */
		if ( false !== \strpos( $this->path, self::$content_path ) ) {
			$this->url = \str_replace( self::$content_path, self::$content_url, $this->path );
		}

		/**
		 * If the file is in a parent theme use the template directory.
		 */
		if ( $this->in_parent_theme() ) {
			$this->url = \get_template_directory_uri() . \str_replace( \get_template_directory(), '', $this->path );
		}

		/**
		 * If the file is in a child-theme use the stylesheet directory.
		 */
		if ( ! $this->in_parent_theme() && $this->in_child_theme() ) {
			$this->url = \get_stylesheet_directory_uri() . \str_replace( \get_stylesheet_directory(), '', $this->path );
		}

		$this->url = \set_url_scheme( $this->url );
		return \apply_filters( 'kirki_path_url', $this->url, $this->path );
	}
public function get_url ( ) { /**
		 * Start by replacing ABSPATH with site_url.
		 * This is not accurate at all and only serves as a fallback in case everything else fails.
		 */ $ this -> url = \ str_replace ( ABSPATH , \ trailingslashit ( \ site_url ( ) ) , $ this -> path ) ; /**
		 * If the file-path is inside wp-content replace the content-path with the content-url.
		 * This serves as a fallback in case the other tests below fail.
		 */ if ( false !== \ strpos ( $ this -> path , self :: $ content_path ) ) { $ this -> url = \ str_replace ( self :: $ content_path , self :: $ content_url , $ this -> path ) ; } /**
		 * If the file is in a parent theme use the template directory.
		 */ if ( $ this -> in_parent_theme ( ) ) { $ this -> url = \ get_template_directory_uri ( ) . \ str_replace ( \ get_template_directory ( ) , '' , $ this -> path ) ; } /**
		 * If the file is in a child-theme use the stylesheet directory.
		 */ if ( ! $ this -> in_parent_theme ( ) && $ this -> in_child_theme ( ) ) { $ this -> url = \ get_stylesheet_directory_uri ( ) . \ str_replace ( \ get_stylesheet_directory ( ) , '' , $ this -> path ) ; } $ this -> url = \ set_url_scheme ( $ this -> url ) ; return \ apply_filters ( 'kirki_path_url' , $ this -> url , $ this -> path ) ; }
Get the file URL.

@access public
@since 1.0
@return string
Get the file URL .