We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1c874bd commit 790381bCopy full SHA for 790381b
app/code/Magento/Theme/Block/Html/Footer.php
@@ -93,7 +93,7 @@ public function getCopyright()
93
\Magento\Store\Model\ScopeInterface::SCOPE_STORE
94
);
95
}
96
- return __($this->_copyright);
+ return $this->replaceCurrentYear(__($this->_copyright));
97
98
99
/**
@@ -133,4 +133,12 @@ protected function getCacheLifetime()
133
{
134
return parent::getCacheLifetime() ?: 3600;
135
136
+
137
+ /**
138
+ * Replace YYYY by the current year
139
+ */
140
+ private function replaceCurrentYear($text)
141
+ {
142
+ return str_replace('YYYY', (new \DateTime())->format('Y'), $text)
143
+ }
144
0 commit comments