WPSEO_Admin_Asset_SEO_Location::get_url()publicYoast 1.0

Determines the URL of the asset on the dev server.

Метод класса: WPSEO_Admin_Asset_SEO_Location{}

Хуков нет.

Возвращает

Строку. The URL of the asset.

Использование

$WPSEO_Admin_Asset_SEO_Location = new WPSEO_Admin_Asset_SEO_Location();
$WPSEO_Admin_Asset_SEO_Location->get_url( $asset, $type );
$asset(WPSEO_Admin_Asset) (обязательный)
The asset to determine the URL for.
$type(строка) (обязательный)
The type of asset. Usually JS or CSS.

Код WPSEO_Admin_Asset_SEO_Location::get_url() Yoast 22.4

public function get_url( WPSEO_Admin_Asset $asset, $type ) {
	$path = $this->get_path( $asset, $type );
	if ( empty( $path ) ) {
		return '';
	}

	return plugins_url( $path, $this->plugin_file );
}