ASB Calendar Advance

説明

ASB Calendar Advance は、シンプルなショートコードで、投稿や固定ページに AJAX で動くモダンなイベントカレンダーを追加できます。レスポンシブに完全対応し、スマホではスワイプで月を移動でき、ページを速く表示するためのしっかりしたキャッシュの仕組みを備えています。

主な機能 (無料版)

  • 月カレンダー表示 – イベントを帯で並べた1か月のカレンダーを表示
  • 日本の祝日 – 祝日名付きの祝日の自動色付けを内蔵 (プラグインの中で計算し、外部へのリクエストはなし)
  • ICS フィード – 訪問者が Google カレンダー、Apple カレンダー、Outlook からイベントを購読できます
  • カスタム投稿タイプ – 専用の「イベント」投稿タイプ、または通常の投稿を使用
  • カテゴリーの色 – カテゴリーに色を割り当てて、イベントを見分けやすく
  • 曜日・祝日のラベル – 曜日のルールと例外日を持つ定期のラベルを設定
  • 文字色ルール – 祝日や特定の日の文字色を個別に設定
  • 吹き出し表示 – マウスを乗せると、イベントの抜粋を吹き出しで表示
  • 移動範囲の制限 – 前後の月へ移動できる範囲を制限
  • モバイル対応 – タッチのスワイプで月を移動
  • サーバー側のキャッシュ – 保持時間を設定できる transient によるキャッシュ
  • Gutenberg ブロック – ショートコードの代わりに、ブロックエディターでも配置できます
  • セキュリティ – nonce の検証、権限の確認、入力の無害化、出力のエスケープを全体で徹底
  • パフォーマンスの最適化 – スクリプトの遅延読み込み、サーバー側のキャッシュ、縮小済みのアセット

ショートコードの使い方

[asbcala_calendar] - Display the month calendar

Pro 版の機能

Pro 版では、ビジネスやプロの用途に向けた高度な機能が加わります:

  • シンプル (日付だけ) のカレンダー表示と、ページ送りとカテゴリーの絞り込みが付いた今後のイベント一覧表示
  • 六曜 (日本の伝統的な暦注) の表示 (自動取得)
  • 曜日ごとの営業時間の表示と、日付ごとの上書き
  • 特定の日のお知らせ・メモ
  • Google カレンダー連携ボタン
  • 複数日程と繰り返しイベントに対応
  • 本日予定ボード (画面に浮かぶ今日の予定の表示)
  • デザインテーマ (モダン、シンプル)
  • 曜日の言語の選択
  • 月の数字を背景に表示
  • ユーザーロールごとの権限設定
  • PWA 連携
  • ライセンス管理

言語

  • 日本語 (ja) – 全文翻訳済み
  • 英語 – 既定

スクリーンショット

ブロック

このプラグインは1個のブロックを提供します。

  • ASB Calendar

インストール

  1. asb-calendar-advance フォルダを /wp-content/plugins/ ディレクトリにアップロードするか、WordPress のプラグインディレクトリから直接インストールします。
  2. WordPress の「プラグイン」メニューからプラグインを有効化します。
  3. 管理画面のサイドバーにある「ASB カレンダー」で設定します。
  4. 「イベント」投稿タイプでイベントを作成するか、通常の投稿にカレンダーの日付を入力して使います。
  5. 投稿や固定ページにショートコード [asbcala_calendar] を追加します。

クイックセットアップ

  1. 「ASB カレンダー」>「イベント表示」を開き、「イベントの取得元」でイベントの取得元 (イベント、投稿、または両方) にチェックを入れます。
  2. 「ASB カレンダー」>「デザイン UI」を開き、凡例に表示するカテゴリーを選びます。
  3. イベントを作成し、「カレンダーイベント情報」のボックスで開始日と終了日を設定します。
  4. 固定ページに [asbcala_calendar] を追加して、プレビューで確認します。

FAQ

カレンダーはどう表示しますか ?

投稿や固定ページにショートコード [asbcala_calendar] を入れてください。ブロックエディターでは「ASB Calendar」ブロックも使えます。

イベント投稿タイプの代わりに、通常の投稿を使えますか ?

はい。「ASB カレンダー」>「イベント表示」を開き、「イベントの取得元」で「投稿」にチェックを入れてください (両方を使う場合は「イベント」もチェックしたままにします)。選んだ投稿タイプに、カレンダーの日付の入力欄が表示されます。

イベントの色はどう設定しますか ?

カテゴリーやタグごとに色を決められます。「投稿」>「カテゴリー」(または「イベント」>「イベントカテゴリー」) でカテゴリーを編集し、カレンダーの色を設定してください。

カレンダーに表示するカテゴリーはどう決めますか ?

「ASB カレンダー」>「デザイン UI」を開き、「表示するカテゴリー」で表示したいカテゴリーを選んでください。

ページビルダーで使えますか ?

はい。ショートコード [asbcala_calendar] は、WordPress のショートコードに対応したページビルダーならどれでも使えます。

キャッシュはどのように動きますか ?

イベントのデータは WordPress の transient でキャッシュします。イベントを作成・編集・削除すると、キャッシュは自動で消去されます。キャッシュの保持時間は「ASB カレンダー」>「詳細設定」で変更できます。

日本の祝日に対応していますか ?

はい。「デザイン UI」>「特定日」(またはセットアップウィザード) で「祝日の自動色付け」を有効にしてください。祝日はプラグインの中で計算します (固定日の祝日、ハッピーマンデー、春分の日・秋分の日、振替休日)。外部のサービスには一切接続しません。祝日の日付をタップすると、祝日名も表示されます。

訪問者は自分のカレンダーアプリでイベントを購読できますか ?

はい。「詳細設定」>「フィード・その他」で ICS フィードを有効にし、フィードの URL を共有してください。Google カレンダー、Apple カレンダー (iPhone/Mac)、Outlook で購読できます。含まれるのは公開済みのイベントだけです。

無料版は外部へリクエストを送りますか ?

いいえ。無料版は外部への HTTP リクエストを一切行いません。内蔵の日本の祝日データを含め、すべての機能がプラグインの中で完結しています。

サードパーティのライブラリを同梱していますか ?

いいえ。パッケージに含まれるのは、すべてこのプラグイン自身のコードです。各 .min.js と .min.css は、隣に同梱している同じ名前の読めるファイルを縮めたものです。

評価

このプラグインにはレビューがありません。

貢献者と開発者

ASB Calendar Advance はオープンソースソフトウェアです。以下の人々がこのプラグインに貢献しています。

貢献者

“ASB Calendar Advance” は1ロケールに翻訳されています。 翻訳者のみなさん、翻訳へのご協力ありがとうございます。

“ASB Calendar Advance” をあなたの言語に翻訳しましょう。

開発に興味がありますか ?

コードを閲覧するか、SVN リポジトリをチェックするか、開発ログを RSS で購読してみてください。

変更履歴

2.18.3

  • Fixed: the “Today” badge colour setting had no effect – the badge stayed yellow whatever colour was chosen, because the stylesheet painted it with a rule the setting could not outweigh. The setting now changes the badge. When only the badge colour is changed, the number on it turns black or white, whichever reads on the new colour.
  • Improved: the calendar preview on the settings screen shows the “today” badge in the colour the calendar is really drawn in. It was always the default yellow.

2.18.2

  • Changed: the tooltips – event details on the month calendar and the tooltip on a date – are now drawn by the plugin itself. They used to be built on Tippy.js 6.3.7 and Popper 2.11.8. Tippy.js is no longer maintained upstream, so both have left the package, which now holds no third-party code. A page with a calendar loads two scripts and a stylesheet fewer: about 23KB over the wire instead of 37KB, counting the new tooltip code.
  • Improved: moving the pointer across the calendar no longer flashes a tooltip at every event it crosses; the first one waits a moment, and once one is open the next opens at once. On a touch screen, scrolling the page leaves an open tooltip where it is, and a tap elsewhere closes it. A tooltip taller than the room around it scrolls inside instead of running off the screen. It fades and lifts in and out, except for visitors whose system asks for reduced motion, the arrow now shares the box’s shadow, and Escape closes it.
  • Improved: an open tooltip stays on its event or date when a smooth-scrolling or parallax script keeps moving the page after the scroll itself has ended. Those scripts move the page without telling anyone, so the old tooltip was left hanging over the wrong day.
  • Fixed: on a holiday that was also today, the date number lost the holiday colour and turned dark, while the holidays either side stayed red. The “today” badge cleared the date’s own colour so that its number would read well on the badge. The number now takes the date’s colour whenever it reads well on the badge – the default yellow badge with the holiday red does – and keeps the badge’s own text colour on a badge that is itself dark or red. The settings preview follows the same rule.
  • Fixed: the holiday name that appears when the pointer rests on a holiday had not appeared since 2.18.0. The small replacement for jQuery did not handle mouseenter / mouseleave listened for on a parent element, which jQuery quietly turns into mouseover / mouseout; it does the same now, and a test compares it with jQuery itself.
  • Note for site customisations: the tooltip’s class names changed. .tippy-box is now .asbcala-tip (.asbcala-tip-light for event details, .asbcala-tip-hours for the tooltip on a date) and .tippy-content is now .asbcala-tip-content.

2.18.1

  • Fixed: tapping the date or the calendar icon on the “today” widget did not open the full-screen month calendar. Two things introduced in 2.18.0 caused it: showing an element that a stylesheet hides did not put a display back, and a selector containing :visible made the browser reject the whole query, which stopped the rest of that function from running. Both are covered by tests now, including one that actually taps the widget and checks the calendar appears.

2.18.0

  • Changed: the calendar no longer loads jQuery. It was the largest single piece of JavaScript a visitor received – 87KB of source, around 30KB over the wire – and on a site that shows the “today” widget the calendar is on every page, so jQuery was too. What the calendar actually used of it was 32 methods and three helpers, so it now uses a small replacement that ships inside its own script. Nothing about the calendar behaviour changes, and one request per page disappears with it.
  • Note for site customisations: the events this plugin announces – asbcala_modal_viewed (an event was opened in a modal) and asbcala:monthRendered – are now browser events. A jQuery(document).on(...) listener still hears them. The one difference is the second callback argument: it now travels as e.detail[0], because a browser event cannot carry extra arguments the way jQuery own could. document.addEventListener('asbcala_modal_viewed', function (e) { var postId = e.detail[0].post_id; }) works with or without jQuery.
  • Note: the other direction is not supported any more. Firing one of these events with jQuery(document).trigger(...) no longer reaches this plugin own handlers; dispatch a browser event instead.
  • Note: if your theme or another plugin uses jQuery without declaring it as a dependency, it was relying on some other plugin to load it. The correct fix is for that code to declare it, but the filter asbcala_keep_jquery (return true) restores the old behaviour immediately while you sort it out.

2.17.2

  • Fixed: a page that placed the calendar the way this readme describes got neither the stylesheet nor the script. When deciding whether to load its assets the plugin only looked for the original [asbcala_shortcode] spelling, so a page built with [asbcala_calendar] – the spelling in the installation steps, in the questions below and on the settings screen – or with the calendar block was left with a bare, unstyled table that never filled in its events. All three ways of placing a calendar are recognised now.
  • Fixed: this readme still promised an event list view and a category filter for the list. Neither is in this package – both belong to the separate Pro edition, together with the simple date-only view – so the promise has been removed and the Pro section now names those views. The screenshot captions and a few directions in the questions below have been brought into line with the screens this package actually has.
  • Changed: the front-end script and the stylesheet no longer carry any part of the Pro edition’s displays. The PHP for them left this package in 2.16.0, but the script and stylesheet were never trimmed to match: they still held the whole event list with its paging and category filter, the simple view, and the Today’s Schedule widget, none of which anything in this package could reach. The script is now about half its former size and the stylesheet about a third. The shortcode also drops the attributes that belonged to those views, including theme, and [asbcala_calendar] draws the month calendar whatever attributes it is given.
  • Changed: the two “AJAX Loading” settings are gone from Advanced Settings. They only ever governed the Today’s Schedule widget, so in this package they saved a value that nothing read. The month calendar has always requested its events after the page itself has loaded, so it keeps working behind a page caching plugin without a switch. Values already saved are left untouched.
  • Changed: the calendar block no longer declares the view and simple-mode attributes, which belonged to the Pro edition’s displays.

2.17.1

  • Fixed: event details could not be shown in a pop-up. The choice between opening the event’s own page and showing the details in a pop-up was there in the settings screen, and the pop-up itself was in the package, but the front end was always told to open the page – so picking the pop-up did nothing at all. The setting is now honoured, and the pop-up works as the screen describes.
  • Fixed: the colour rules for particular dates took what arrived from the form without first checking its shape. A submission that sent a list where a single value was expected could raise a fatal error on PHP 8. Each rule and each of its fields is now checked before it is touched, and a rule already stored in an unexpected shape is skipped when the settings screen is drawn instead of stopping the page. The same check was added to the colour labels, the date lists, the event sources and the calendar’s month limits.

2.17.0

  • Added: static-site support (ASB Smart Builder’s Static WordPress). When the ASB Static Publisher is active and switched on, the calendar stops using admin-ajax and nonces: month data, the initial data, event details and the ICS feed are served at /asb-calendar/… as plain JSON and text, the front-end script reads those files, and a manifest lists them for the build tool. A daily job asks for a fresh build after midnight. PWA update notices are held until the static site has actually been published. Nothing changes on a site without the publisher.

2.16.4

  • Changed: the free package no longer carries any part of the opening-hours editor. Until now the colour-label settings still drew an “Business Hours Override” panel with time fields, even though this build has nothing that shows opening hours on the calendar – so anything typed there simply went nowhere. The panel, and the code behind it, are now only in the separate Pro edition. Hours already saved by a site that used to run Pro are left untouched, so nothing is lost if that site goes back.
  • Changed: the shortcode examples in this readme no longer list the simple view, the event list, or their options. Those belong to the separate Pro edition and were never part of this package.
  • Changed: removed leftover lines that read Pro-only settings and then did nothing with them, and reworded comments that described this package in terms of what a licence unlocks.
  • Fixed: several places took a submitted field straight from the request without first checking it was a single value. Sending a list where a word was expected could raise a fatal error on PHP 8 – in the category colour field, in the event date and colour fields of the post editor, and in the setup wizard’s colour labels. Each of those now checks the shape of what arrived before touching it, and skips anything that is not what the form sends.

2.16.3

  • No change to this package. This release fixed parts of the separate Pro edition only.

2.16.2

  • No change to this package. This release fixed parts of the separate Pro edition only.

2.16.1

  • Fixed: the body of a password-protected event could be read by anyone. The pop-up that shows an event’s details answered with the full text of any published post on the site, chosen by number, without asking for the password and without checking that the post was even a calendar entry. It now answers only for the post types the calendar is set to read, and a protected post is withheld until the password has been entered.
  • Fixed: the summary of a password-protected event was also being shown in the hover box and published in the calendar feed. Protected events still appear with their title and dates, as WordPress does elsewhere, but their text no longer travels with them.

2.16.0

  • Changed: the event post type and its category taxonomy are now registered as asbcala_event and asbcala_event_category. The old names were “event” and “event_category”, which other calendar plugins register as well. Existing events and categories are moved across automatically on update, and the page addresses do not change.
  • Changed: the free version no longer carries the code for the paid features. It used to ship them and switch them off, which is not how the plugin directory works. Nothing the free version offers has been removed.
  • Fixed: weekday numbers submitted from the setup wizard are now checked against the seven days rather than merely cast, so a hand-made request cannot write a day that does not exist.

Earlier entries are not listed here: they belong to the shared history of this plugin and its separate Pro edition, and describe releases that were never published in this directory.