[WordPress] 外掛分享: Naptárak.com Névnap

首頁 › 外掛目錄 › Naptárak.com Névnap
WordPress 外掛 Naptárak.com Névnap 的封面圖片
全新外掛
安裝啟用
—
尚無評分
剛更新
最後更新
—
問題解決
WordPress 6.3+ PHP 7.4+ v1.0.0 上架:2026-10-22

外掛標籤

開發者團隊

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

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「Naptárak.com Névnap」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

Show today’s Hungarian name day and the next Hungarian public holiday with a countdown and its long weekend on your site – as a block, a classic widget or a shortcode.
The plugin is made for Hungarian websites: its whole interface, settings page and user guide are translated into Hungarian. The data comes from Naptárak.com, the Hungarian online calendar since 2006, and it is bundled with the plugin: no external requests, no cookies, no data collection.
Name day

Today’s name day in large type, with the date in one of three formats.
Optionally tomorrow’s name day and the less common names in a list that opens – 491 main names and 6,723 less common names in total.
Correct in leap years: 24 February is the leap day (no name day), and the names at the end of February move one day later.

Public holidays

The next public holiday with a calendar-style date badge, its name and a countdown.
The long weekend around it (for example “3-day long weekend: Oct 23–25”), including the official working-day swaps published every year in the Magyar Közlöny.
Optionally a list of the next 2–5 public holidays.
Public holidays follow section 102 of the Hungarian Labour Code, including Good Friday, Easter and Whitsun.

Appearance that fits your site

Three formats: card (framed box), without frame (blends into the text) and one line (for a header, a footer or a sidebar).
Every part can be switched off: label, date, tomorrow’s name day, less common names, holiday description, countdown, long weekend.
Light or dark: in automatic mode the box follows the text colour around it, so it reads well on light and dark pages, also when the visitor or the theme switches modes. If the background cannot be determined (for example an image behind it), the card gets a solid background of its own. If automatic mode does not suit your site, choose an always light or always dark look.
Accent colour: any colour, also from your theme’s palette. Text in the accent colour is made lighter or darker where needed, so it keeps at least 4.5:1 contrast.
Text and background colour, font size and spacing can also be set in the block’s own settings.
Site-wide defaults in Settings → Naptárak.com Névnap, with a live preview; each block and widget can override them. The How to use tab on the same page explains everything step by step.

How to use

Block editor: add the “Name day” or the “Next public holiday” block; the Content and Appearance panels are in the sidebar.
Classic widgets: Appearance → Widgets.
Shortcodes, anywhere shortcodes work:

[naptarak_nevnap] – options: label, date, tomorrow, other (yes/no), date_format (long, short, full)
[naptarak_unnepnap] – options: count (1–5), label, description, countdown, long_weekend (yes/no)
Both: layout (card, plain, line), scheme (auto, light, dark), accent (e.g. #b45309), credit (link, name, none)
Examples: [naptarak_nevnap tomorrow="yes"], [naptarak_nevnap layout="line" date="no"], [naptarak_unnepnap count="3" scheme="dark"]
Hungarian values work too (igen/nem, kartya/sima/sor, vilagos/sotet, nev/nincs). Appearance options you leave out follow the site-wide settings.

Source credit
The “Source: Naptárak.com” line is off by default. After activation the plugin asks once (on the Dashboard) whether to show it – with a link, name only, or not at all – and the answer can be changed any time in the settings or per block. Showing it supports the free data service of Naptárak.com.
For developers – PHP functions for themes and plugins, for example to calculate delivery dates in a webshop (dates are Y-m-d strings or DateTimeInterface objects; null means today in the site’s time zone):

naptarak_nevnap_get_names( $date = null, $include_other = false )
naptarak_nevnap_is_public_holiday( $date = null )
naptarak_nevnap_is_workday( $date = null )
naptarak_nevnap_add_workdays( $date, $days )
naptarak_nevnap_next_public_holidays( $date = null, $count = 1 )
naptarak_nevnap_long_weekends( $year )
naptarak_nevnap_swaps_published( $year )

More, with pictures (in Hungarian): naptarak.com/wordpress-bovitmeny

延伸相關外掛

文章
Filter
Mastodon