[WordPress] 外掛分享: WAJ Copyright Year

首頁外掛目錄 › WAJ Copyright Year
10+
安裝啟用
尚無評分
2507 天前
最後更新
問題解決
WordPress 4.9.8+ PHP 7.0+ v1.0.4 上架:2018-10-24

內容簡介

此外掛可以在需要的地方加入版權年份或日期間隔。預設情況下,它只會顯示當前年份,由伺服器指定(希望它能准確跟踪時間)。選擇性地,您可以包括開始年份。如果開始年份與當前年份不同,則會顯示開始年份和當前年份之間的間隔。

例如,如果您將開始年份設為2015,在2018年,您將得到以下結果:

2015-2018

您還可以設置自定義分隔符,以便間隔符號看起來不同。例如,如果您不希望破折號周圍有空格,您可以將分隔符設置為“-”,然後您將獲得以下結果:

2015-2018

範例
<?php

declare( strict_types = 1 );
namespace MyTheme\FooterTemplate
{
use \WaughJ\CopyrightYear\CopyrightYear;

?>
<footer class="footer">
<p>版權 Jaimeson Waugh &copy; <?= new CopyrightYear( 2015, '-' ); ?>。</p>
</footer>
<?php
}

[版權年份 start="2015" divider="-"]

這將列印消息:版權 Jaimeson Waugh © 2015-2018。

外掛標籤

開發者團隊

⬇ 下載最新版 (v1.0.4) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「WAJ Copyright Year」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

Adds copyright year or interval o’ years where desired. By default, it just shows the current year, as specified by the server ( which is hopefully keeping accurate track o’ time ). Optionally, you can include a start year. If the start year is different from the current year, then it will show an interval ‘tween the start year & current year.
For instance, if you set the start year to 2015, in 2018 you will get the following:
2015 - 2018

You can also set a custom divider if you want the interval sign to look different. For instance, if you don’t want the hyphen to have spaces round it, you could set the divider to “-“, & you will get the following:
2015-2018

Example

Copyright Jaimeson Waugh © .

延伸相關外掛

文章
Filter
Apply Filters
Mastodon