- サイトデザイン工事中です。ご意見をお寄せください。
- 赤色のリンクは、まだ日本語Codexに存在しないページ・画像です。英語版と併せてご覧ください。(詳細)
テンプレートタグ/get home url
提供:WordPress Codex 日本語版
< テンプレートタグ
このページ「テンプレートタグ/get home url」は未翻訳です。和訳や日本語情報を加筆してくださる協力者を求めています。
タグ一覧: テンプレートタグ | インクルードタグ | 条件分岐タグ | その他の関数 | phpdoc
使い方: テンプレートタグ入門 | パラメータの渡し方 | 初心者の方へ | その他のテーマ関連資料
目次 |
Description
The get_home_url template tag retrieves the home url for a given site. Returns the 'home' option with the appropriate protocol, 'https' if is_ssl()/en and 'http' otherwise. If scheme is 'http' or 'https', is_ssl() is overridden.
Usage
<?php get_home_url( $blog_id, 'path', 'scheme' ); ?>
Default Usage
<?php get_home_url(); ?>
Parameters
- blog_id
- (integer) (optional) Blog ID.
- 初期値: null (the current blog)
- path
- (string) (optional) Path relative to the home url.
- 初期値: なし
- scheme
- (string) (optional) Scheme to give the home url context. Currently 'http','https'.
- 初期値: null
Return
(string) Home url link with optional path appended.
Hooks
apply_filters() Calls 'home_url' hook on home url before returning.
Examples
Changelog
- 3.0.0 : New template tag.
Source Code
get_home_url() is located in wp-includes/link-template.php
最新英語版: WordPress Codex » Template Tags/get_home_url (最新版との差分)