| 开发者 | dieter93 |
|---|---|
| 更新时间 | 2026年6月1日 20:27 |
| PHP版本: | 8.0 及以上 |
| WordPress版本: | 7.0 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
[citatly] shortcodeclass parameter for individual styling: [citatly class="my-style"]/build directory)/wp-json/citatly/v1/today with HTTP caching headers.pot file included)crc32(date + site_url) maps today's date to a fixed quote from your collection. A fallback mechanism ensures that the same quote never appears on two consecutive days. This means the quote is stable throughout the day, works correctly even with full-page caching, and does not require any session or cookie.
CSS structure:
The plugin does not style the quote output — all visual styling is left to your theme. The only included CSS handles the skeleton loader during page load.
.citatly — outer wrapper
.citatly__text — the quote text
.citatly__meta — wraps author and source
.citatly__separator — dash before author (default: "— ")
.citatly__author — author name
.citatly__divider — dot between author and source (default: " · ")
.citatly__source — optional extra field
citatly-daily-quote folder to /wp-content/plugins/.[citatly] on any page, post, or widget area.class parameter to add a custom CSS class:
[citatly class="my-style"]
All styling of the output (.citatly, .citatly__text, .citatly__separator, .citatly__author, .citatly__divider, .citatly__source) is handled entirely by your theme.No. The quote is selected once per day based on the current date. All visitors see the same quote throughout the day, regardless of caching.
The quote of the day is selected based on the date and the total number of published quotes. Adding, deleting, or unpublishing a quote may cause today's displayed quote to change. From the next day on, everything works as normal again.
Yes. The REST endpoint returns proper Cache-Control and Expires headers that expire at midnight. It works correctly with WP Rocket, W3 Total Cache, LiteSpeed Cache, Cloudflare, and similar solutions.
There is no hard limit. The plugin loads up to 5,000 published quote IDs into a transient cache (refreshed daily), which is sufficient for any practical use case.
Yes. Go to "Quotes → Import / Export" in the admin. Upload a JSON file containing an array of objects with the fields text, author, and extra. Duplicate quotes (matching text) are automatically skipped.
No. All fields (text, author, extra) are stored and output as plain text only. This prevents XSS issues and keeps quotes portable. Line breaks entered in the text field are preserved in the frontend output.
Yes. The plugin outputs a simple HTML structure with BEM-style CSS classes. Separators between author and source (dash and dot) have their own classes and can be hidden or replaced via CSS. Add your own styles in your theme's stylesheet or via the WordPress Customizer. Interactive examples are available at https://citatly.com/docs/css-styling
Yes, if the /build directory with the compiled block files is present. The shortcode works independently of the block and is always available.
All plugin data is permanently removed: all quote posts, their meta fields, and the transient cache. Use the export function (Quotes → Import / Export) before deleting the plugin if you want to keep your quotes.
Yes. The plugin is fully translated into German (de_DE). The text domain is citatly-daily-quote.
The plugin loads the daily quote via a REST API request in the visitor's browser. If the REST API is restricted or disabled for unauthenticated visitors, the quote will not be displayed.
Most performance and security plugins that restrict the REST API also provide a way to whitelist specific endpoints. Add citatly/v1/today as an exception to restore functionality. The exact method depends on the plugin or server configuration used — please refer to its documentation for details.
Note: If you are using Perfmatters, the plugin registers the exception automatically — no manual configuration needed.
Yes. However, if the REST API cache is enabled, the quote may not change daily as expected. To fix this, set "Default REST TTL" to 0 under LiteSpeed Cache → Cache settings. A fix for automatic compatibility is included in an upcoming LiteSpeed Cache release.
.citatly__separator, .citatly__divider) and can be hidden or replaced via CSS