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

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

內容簡介

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

【主要功能】
• 將任何公曆日期轉換為 BS 日期
• 提供尼泊爾月份和星期名稱
• 自訂日期格式選項
• 支援四個短碼和 PHP 幫助函數
• 顯示可點擊的月曆和日期存檔鏈接
• 無需 jQuery 或外部依賴

外掛標籤

開發者團隊

⬇ 下載最新版 (v6.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 post time display after the BS date – 12-hour or 24-hour format, glyphized when Nepali digits are selected
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, lang, and show_time attributes.
[indnpd_today_date] Prints today’s BS date. Good for headers, footers, or widgets. Takes optional format, lang, and show_time 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.
Post Time: Toggle to show the publish time after the BS date. Choose 12-hour (3:45 PM) or 24-hour (15:45). Digits follow the Localization Style setting. Can be overridden per shortcode with show_time="1" or show_time="0".
Real-time Preview: The preview at the top updates as you change the pattern, switch digits, or toggle the time display.
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