- 赤色のリンクは、まだ日本語Codexに存在しないページ・画像です。英語版と併せてご覧ください。(詳細)
「テンプレートタグ/get the date」の版間の差分
(3.0: 新規テンプレートタグ。en:Template Tags/get_the_date 14:29, 17 April 2010 Bono 版を翻訳用にコピー) |
細 (リンク等調整、テンプレートタグガイド挿入。要翻訳) |
||
1行目: | 1行目: | ||
+ | {{NeedTrans}} | ||
+ | {{テンプレートタグガイド|PHP}} | ||
== Description == | == Description == | ||
− | The '''get_the_date''' template tag retrieves the date the current <code>$post</code> was written. Unlike [[ | + | The '''get_the_date''' template tag retrieves the date the current <code>$post</code> was written. Unlike [[テンプレートタグ/the_date|the_date()]] this tag will '''always return''' the date. Modify output with 'get_the_date' filter. |
== Usage == | == Usage == | ||
9行目: | 11行目: | ||
== Parameters == | == Parameters == | ||
− | {{Parameter|$d|string|[[Formatting Date and Time|PHP date format]].|optional|the <code>date_format</code> [[Option Reference#General|option]] ('Date Format' on [[ | + | {{Parameter|$d|string|[[Formatting Date and Time|PHP date format]].|optional|the <code>date_format</code> [[Option Reference#General|option]] ('Date Format' on [[管理パネル#Settings|Settings]] > [[Settings General SubPanel|General]] panel)}} |
== Return == | == Return == | ||
17行目: | 19行目: | ||
== Filter == | == Filter == | ||
− | * <code>[[ | + | * <code>[[関数リファレンス/apply_filters|apply_filters]]('get_the_date', $the_date, $d)</code> |
== Changelog == | == Changelog == | ||
29行目: | 31行目: | ||
<pre><span class="entry-date"><?php echo get_the_date(); ?></span></pre> | <pre><span class="entry-date"><?php echo get_the_date(); ?></span></pre> | ||
− | See: {{Source|wp-content/themes/twentyten/single.php| | + | See: {{Source|wp-content/themes/twentyten/single.php|3.0}} |
== Source Code == | == Source Code == | ||
− | <code>get_the_date()</code> is located in {{Source|wp-includes/general-template.php| | + | <code>get_the_date()</code> is located in {{Source|wp-includes/general-template.php|3.0}}. |
{{Stub}} | {{Stub}} | ||
41行目: | 43行目: | ||
== Related == | == Related == | ||
− | {{Date Tags}} | + | {{Tag Date Tags}} |
{{Tag Footer}} | {{Tag Footer}} | ||
− | + | {{DEFAULTSORT:Get_the_date}} | |
− | [[Category: | + | [[Category:テンプレートタグ]] |
[[en:Template Tags/get_the_date]] | [[en:Template Tags/get_the_date]] |
2010年4月17日 (土) 23:40時点における版
このページ「テンプレートタグ/get the date」は未翻訳です。和訳や日本語情報を加筆してくださる協力者を求めています。
タグ一覧: テンプレートタグ | インクルードタグ | 条件分岐タグ | その他の関数 | Code Reference
使い方: テンプレートタグ入門 | パラメータの渡し方 | 初心者の方へ | その他のテーマ関連資料
目次
Description
The get_the_date template tag retrieves the date the current $post
was written. Unlike the_date() this tag will always return the date. Modify output with 'get_the_date' filter.
Usage
<?php get_the_date( $d ); ?>
Parameters
- $d
- (string) (optional) PHP date format.
Return
(string|null) Null if displaying, string if retrieving.
Filter
-
apply_filters('get_the_date', $the_date, $d)
Changelog
- 3.0.0 : New template tag.
Examples
Default Usage
<span class="entry-date"><?php echo get_the_date(); ?></span>
See: wp-content/themes/twentyten/single.php
Source Code
get_the_date()
is located in wp-includes/general-template.php
.
最新英語版: WordPress Codex » Template Tags/get_the_date (最新版との差分)
Related
日時に関連するタグ: get_calendar(), get_day_link(), get_month_link(), get_the_date(), get_the_time(), get_year_link(), single_month_title(), the_date(), the_date_xml(), the_modified_date(), get_the_modified_date(), the_modified_time(), get_the_modified_time(), the_time()