[WordPress] 外掛分享: Nordic Name Days

首頁外掛目錄 › Nordic Name Days
10+
安裝啟用
尚無評分
4353 天前
最後更新
問題解決
WordPress 3.8+ v0.2.1 上架:2012-09-12

內容簡介

這個小型的外掛可以註冊「[sk-nnd-name-days]」短碼,以顯示北歐國家的當天名稱日。支援的國家包括芬蘭、挪威、瑞典和丹麥。
預設的短碼「[sk-nnd-name-days]」會顯示芬蘭的當天星期、日期和名稱日。你可以在文章、頁面和文字小工具中使用此短碼。這個外掛的靈感來自於International Namedays外掛。

其他國家中使用的短碼用法和屬性

以下是你可以在其他語言中使用的短碼。

挪威:[sk-nnd-name-days language=”nb_NO”]
瑞典:[sk-nnd-name-days language=”sv_SE”]
丹麥:[sk-nnd-name-days language=”da_DK”]

其他短碼屬性包括「before」、「after」、「language」、「separator」(預設為|)和「dateformat」(預設為l j.n.Y)。你可以像下面這樣使用這些屬性。

[sk-nnd-name-days language="nb_NO" before="Name days: " after="" separator="-" dateformat="j.n.Y"]

如果你想在主題模板檔案中顯示名稱日,請添加此程式碼。

<?php
// 顯示當天的名稱
if ( function_exists( 'sk_nnd_name_days_shortcode' ) ) {

echo do_shortcode( '[sk-nnd-name-days]' );

}
?>

外掛標籤

開發者團隊

⬇ 下載最新版 (v0.2.1) 或搜尋安裝

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

原文外掛簡介

This mini plugin register shortcode [sk-nnd-name-days] to display current name days in Nordic countries. Supported countries are Finland,
Norway, Sweden and Denmark. By default shortcode [sk-nnd-name-days] displays current day of the week, day and name days in Finland. You can use
use shortcode in posts, pages and text widget. This plugin idea is from International Namedays plugin.
Shorcode usage and attributes in other countries
Here is how you use shortcode in other languages.

Norway: [sk-nnd-name-days language=”nb_NO”]
Sweden: [sk-nnd-name-days language=”sv_SE”]
Denmark: [sk-nnd-name-days language=”da_DK”]

Other shortcode attributes are before, after, language, separator (default is |) and dateformat (default is l j.n.Y). You can use these attributes
like this.
[sk-nnd-name-days language="nb_NO" before="Name days: " after="" separator="-" dateformat="j.n.Y"]

If you want to display name days in your theme template file, add this code.

延伸相關外掛

文章
Filter
Apply Filters
Mastodon