[WordPress] 外掛分享: Indesign Nepali Post Date

首頁外掛目錄 › Indesign Nepali Post Date
WordPress 外掛 Indesign Nepali Post Date 的封面圖片
全新外掛
安裝啟用
尚無評分
26 天前
最後更新
問題解決
WordPress 5.3+ PHP 8.2+ v3.0.0 上架:2026-04-21

內容簡介

此外掛可將公曆(AD)日期轉換為比克拉姆·桑巴特(BS)日期,方便在文章、頁面、小工具或佈景主題中顯示尼泊爾日期。對於經營尼泊爾新聞網站或需要顯示BS日期的WordPress網站特別實用。

【主要功能】
• 將任何AD日期轉換為BS日期
• 支援尼泊爾月份和星期名稱顯示
• 提供自訂日期格式設定
• 四個短碼和多個PHP輔助函數
• 每月BS日曆短碼,含可點擊的日期存檔連結
• 無需jQuery或外部依賴

外掛標籤

開發者團隊

⬇ 下載最新版 (v3.0.0) 或搜尋安裝

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

原文外掛簡介

This plugin converts Gregorian (AD) dates into Bikram Sambat (BS) so you can display Nepali dates on posts, pages, widgets, or anywhere in your theme.
Handy if you run a Nepali news site, a blog, or any WordPress site that needs BS dates for the publish date, modified date, or just today’s date.
What it does:

Converts any AD date to BS, in Nepali or English digits
Nepali month names (e.g. असार) and weekday names (e.g. मंगलबार)
Custom date format from the settings page
Optional CSS wrapper class if you want to style the output
Four shortcodes and a few PHP helpers
A monthly BS calendar shortcode with clickable day-archive links and a picker for your brand accent color
A filter hook if you want to change the output
Covers BS 2000 to 2101 (AD 1943 to 2044)
No jQuery, no REST calls, no external dependencies

Features
Shortcodes

[indnpd_post_date] Prints the current post’s publish date in BS. Takes optional format and lang attributes.
[indnpd_today_date] Prints today’s BS date. Good for headers, footers, or widgets. Takes optional format and lang attributes.
[indnpd_number number=”123″] Converts a number to Nepali glyphs (e.g. 123 to १२३). Takes an optional lang attribute.
[indnpd_post_calendar] Shows a monthly BS calendar. Days that have at least one published post link to the day archive. Takes optional year, month, and lang attributes. Prev / next arrows navigate between months.

PHP Functions
Primary names (introduced in 3.0.0):

indesign_nepali_post_date_get( $datetime ): Convert a date string or timestamp into a formatted BS string.
indesign_nepali_post_date_today(): Return today’s date in BS.
indesign_nepali_post_date_convert( $number ): Convert a number to Nepali glyphs.
indnpd_get_date( $timestamp, $format, $lang ): Same idea, with format and language you can pass in.

Legacy aliases (kept for backward compatibility, still work exactly the same):

id_nepali_post_date_get( $datetime )
id_nepali_post_date_today()
id_nepali_post_date_convert( $number )

Developer API

\IndesignMedia\NPD\Manager::convert( $timestamp, $format, $lang ): Static method if you’d rather not use the global function.
indesign_nepali_post_date_output filter: Wrap or modify the HTML before it’s returned.

Date Format Tokens

d – Day number
m – Month number
M – Month name (e.g. असार)
y – 2-digit year
Y – 4-digit year
l – Weekday name (e.g. मंगलबार)

Admin Settings Panel
Four tabs: Settings, Shortcodes, Post Calendar, Developer.

Localization Style: Pick Traditional Nepali glyphs (०१२) or English digits (012).
Date Pattern: Set a custom format string using the tokens above.
CSS Wrapper Class: Optionally wrap every date in so you can style it.
Real-time Preview: The preview at the top updates as you change the pattern or switch digits.
Post Calendar tab: Live preview of the calendar plus two controls that persist to the front-end – a toggle for the day-archive post links and an accent color picker for the weekday header, today’s outline, and linked-day styling.
Developer tab: Copy-ready snippets for the PHP function, the output filter, and a starter CSS badge style.

Developers
Built and maintained by Indesign Media (https://indesignmedia.net).
Need help, a custom tweak, or integration work? Head to the plugin page or drop us a line.

延伸相關外掛

文章
Filter
Mastodon