get_stylesheet_uri

Sponsored Link

現在のテーマのスタイルシートのURIを取得します。

Sponsored Link

スタイルシートのファイル名はget_stylesheet_directory_uri()のパスに追加される’style.css’です。

Retrieve URI of current theme stylesheet.

The stylesheet file name is ‘style.css’ which is appended to get_stylesheet_directory_uri() path.

get_stylesheet_uriのファンクションタグ使用方法

<?php get_stylesheet_uri(); ?>

get_stylesheet_uriのパラメーター

None.

戻り値

(string) 現在のテーマのスタイルシートのURIを返します。

(string)
Returns URI of current theme stylesheet.

URLを出力するには

To output the URL

<?php echo get_stylesheet_uri(); ?>

注意

  • Uses: apply_filters() Calls ‘stylesheet_uri’ filter on stylesheet URI path and stylesheet directory URI.
  • Uses: get_stylesheet_directory_uri()

変更ログ

Since: 1.5.0

ソースファイル

get_stylesheet_uri()は、wp-includes/theme.php内に位置しています。

get_stylesheet_uri() is located in wp-includes/theme.php.

Sponsored Link