- 赤色のリンクは、まだ日本語Codexに存在しないページ・画像です。英語版と併せてご覧ください。(詳細)
「関数リファレンス/get site url」の版間の差分
提供: WordPress Codex 日本語版
< 関数リファレンス
(en:Template Tags/get_site_url 14:51, 13 April 2010 Bono 版を翻訳用にコピー/Bono 著) |
細 (テンプレートタグガイド挿入、リンク等調整/翻訳者募集中) |
||
1行目: | 1行目: | ||
+ | {{NeedTrans}} | ||
+ | {{テンプレートタグガイド|PHP}} | ||
+ | |||
== Description == | == Description == | ||
− | The '''get_site_url()''' template tag retrieve the site url for a given site. Returns the 'site_url' [[Option Reference|option]] with the appropriate protocol, 'https' if [[Function Reference/is_ssl|is_ssl()]] and 'http' otherwise. If [[#Parameters|$scheme]] is 'http' or 'https', is_ssl() is overridden. | + | The '''get_site_url()''' template tag retrieve the site url for a given site. Returns the 'site_url' [[Option Reference|option]] with the appropriate protocol, 'https' if [[Function Reference/is_ssl|is_ssl()]]/[[:en:Function Reference/is_ssl|en]] and 'http' otherwise. If [[#Parameters|$scheme]] is 'http' or 'https', is_ssl() is overridden. |
== Usage == | == Usage == | ||
− | + | <?php get_site_url(blog_id, 'path', 'scheme'); ?> | |
=== Default Usage === | === Default Usage === | ||
− | + | <?php get_site_url(); ?> | |
== Parameters == | == Parameters == | ||
23行目: | 26行目: | ||
== Filter == | == Filter == | ||
− | + | apply_filters('site_url', $url, $path, $orig_scheme, $blog_id); | |
== Examples == | == Examples == | ||
33行目: | 36行目: | ||
== Source Code == | == Source Code == | ||
− | <code>get_site_url()</code> is located in {{Source|wp-includes/link-template.php| | + | <code>get_site_url()</code> is located in {{Source|wp-includes/link-template.php|3.0}}. |
− | {{原文|Template Tags/ | + | {{原文|Template Tags/get_site_url|85941}}<!-- 14:51, 13 April 2010 Bono 版 --> |
== Related == | == Related == | ||
− | {{Link Tags}} | + | {{Tag Link Tags}} |
{{Tag Footer}} | {{Tag Footer}} | ||
− | [[Category: | + | {{DEFAULTSORT:Get_site_url}} |
+ | [[Category:wp3.0]] | ||
[[en:Template Tags/get_site_url]] | [[en:Template Tags/get_site_url]] |
2010年4月14日 (水) 00:30時点における版
このページ「関数リファレンス/get site url」は未翻訳です。和訳や日本語情報を加筆してくださる協力者を求めています。
タグ一覧: テンプレートタグ | インクルードタグ | 条件分岐タグ | その他の関数 | Code Reference
使い方: テンプレートタグ入門 | パラメータの渡し方 | 初心者の方へ | その他のテーマ関連資料
目次
Description
The get_site_url() template tag retrieve the site url for a given site. Returns the 'site_url' 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_site_url(blog_id, 'path', 'scheme'); ?>
Default Usage
<?php get_site_url(); ?>
Parameters
- blog_id
- (integer) (optional) Blog ID.
- 初期値: current blog
- path
- (string) (optional) Path relative to the site url.
- 初期値: なし
- scheme
- (string) (optional) Scheme to give the site url context. Currently 'http','https', 'login', 'login_post', or 'admin'.
- 初期値: null
Return
Site url link with optional path appended. (string)
Filter
apply_filters('site_url', $url, $path, $orig_scheme, $blog_id);
Examples
Changelog
- 3.0.0 : New template tag.
Source Code
get_site_url()
is located in wp-includes/link-template.php
.
最新英語版: WordPress Codex » Template Tags/get_site_url (最新版との差分)
Related
関数リファレンス、テンプレートタグ目次もご覧ください。