UNPKG

@wordpress/block-library

Version:
34 lines (33 loc) • 1.35 kB
"use strict"; Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } }); let _wordpress_i18n = require("@wordpress/i18n"); // packages/block-library/src/post-date/variations.js const variations = [{ name: "post-date", title: (0, _wordpress_i18n.__)("Post Date"), description: (0, _wordpress_i18n.__)("Display a post's publish date."), attributes: { metadata: { bindings: { datetime: { source: "core/post-data", args: { field: "date" } } } } }, scope: ["inserter", "transform"], isActive: (blockAttributes) => blockAttributes?.metadata?.bindings?.datetime?.source === "core/post-data" && blockAttributes?.metadata?.bindings?.datetime?.args?.field === "date" }, { name: "post-date-modified", title: (0, _wordpress_i18n.__)("Modified Date"), description: (0, _wordpress_i18n.__)("Display a post's last updated date."), attributes: { metadata: { bindings: { datetime: { source: "core/post-data", args: { field: "modified" } } } }, className: "wp-block-post-date__modified-date" }, scope: ["inserter", "transform"], isActive: (blockAttributes) => blockAttributes?.metadata?.bindings?.datetime?.source === "core/post-data" && blockAttributes?.metadata?.bindings?.datetime?.args?.field === "modified" }]; exports.default = variations; //# sourceMappingURL=variations.cjs.map