Use a fixed string to specify tag format
This commit is contained in:
parent
4be18155a0
commit
9ed3fae364
@ -21,8 +21,13 @@ class date_tag {
|
|||||||
static function tag_item($item) {
|
static function tag_item($item) {
|
||||||
|
|
||||||
if ($item->is_photo() && $item->captured) {
|
if ($item->is_photo() && $item->captured) {
|
||||||
tag::add($item, date("F", $item->captured));
|
$date_format = "F, Y";
|
||||||
tag::add($item, date("Y", $item->captured));
|
foreach (explode(",", date($date_format, $item->captured)) as $tag_name) {
|
||||||
|
$tag_name = trim($tag_name);
|
||||||
|
if ($tag_name) {
|
||||||
|
tag::add($item, $tag_name);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user