Changeset 3346454
- Timestamp:
- 08/18/2025 01:50:36 PM (8 months ago)
- Location:
- digiblocks
- Files:
-
- 340 added
- 2 deleted
- 67 edited
-
tags/1.0.1 (added)
-
tags/1.0.1/admin (added)
-
tags/1.0.1/admin/dashboard.php (added)
-
tags/1.0.1/admin/settings.php (added)
-
tags/1.0.1/assets (added)
-
tags/1.0.1/assets/css (added)
-
tags/1.0.1/assets/css/admin (added)
-
tags/1.0.1/assets/css/admin/admin.css (added)
-
tags/1.0.1/assets/css/admin/review-notice.css (added)
-
tags/1.0.1/assets/css/blocks (added)
-
tags/1.0.1/assets/css/blocks/editor.css (added)
-
tags/1.0.1/assets/js (added)
-
tags/1.0.1/assets/js/admin (added)
-
tags/1.0.1/assets/js/admin/admin.js (added)
-
tags/1.0.1/assets/js/admin/review-notice.js (added)
-
tags/1.0.1/assets/js/blocks (added)
-
tags/1.0.1/assets/js/blocks/accordion (added)
-
tags/1.0.1/assets/js/blocks/accordion/index.js (added)
-
tags/1.0.1/assets/js/blocks/button (added)
-
tags/1.0.1/assets/js/blocks/button/index.js (added)
-
tags/1.0.1/assets/js/blocks/buttons (added)
-
tags/1.0.1/assets/js/blocks/buttons/index.js (added)
-
tags/1.0.1/assets/js/blocks/call-to-action (added)
-
tags/1.0.1/assets/js/blocks/call-to-action/index.js (added)
-
tags/1.0.1/assets/js/blocks/column (added)
-
tags/1.0.1/assets/js/blocks/column/index.js (added)
-
tags/1.0.1/assets/js/blocks/container (added)
-
tags/1.0.1/assets/js/blocks/container/index.js (added)
-
tags/1.0.1/assets/js/blocks/countdown (added)
-
tags/1.0.1/assets/js/blocks/countdown/index.js (added)
-
tags/1.0.1/assets/js/blocks/counter (added)
-
tags/1.0.1/assets/js/blocks/counter/index.js (added)
-
tags/1.0.1/assets/js/blocks/faq (added)
-
tags/1.0.1/assets/js/blocks/faq/index.js (added)
-
tags/1.0.1/assets/js/blocks/forms (added)
-
tags/1.0.1/assets/js/blocks/forms/index.js (added)
-
tags/1.0.1/assets/js/blocks/google-map (added)
-
tags/1.0.1/assets/js/blocks/google-map/index.js (added)
-
tags/1.0.1/assets/js/blocks/heading (added)
-
tags/1.0.1/assets/js/blocks/heading/index.js (added)
-
tags/1.0.1/assets/js/blocks/icon (added)
-
tags/1.0.1/assets/js/blocks/icon-box (added)
-
tags/1.0.1/assets/js/blocks/icon-box/index.js (added)
-
tags/1.0.1/assets/js/blocks/icon-list (added)
-
tags/1.0.1/assets/js/blocks/icon-list/index.js (added)
-
tags/1.0.1/assets/js/blocks/icon/index.js (added)
-
tags/1.0.1/assets/js/blocks/image (added)
-
tags/1.0.1/assets/js/blocks/image/index.js (added)
-
tags/1.0.1/assets/js/blocks/lottie (added)
-
tags/1.0.1/assets/js/blocks/lottie/index.js (added)
-
tags/1.0.1/assets/js/blocks/newsletter (added)
-
tags/1.0.1/assets/js/blocks/newsletter/index.js (added)
-
tags/1.0.1/assets/js/blocks/pricing-table (added)
-
tags/1.0.1/assets/js/blocks/pricing-table/index.js (added)
-
tags/1.0.1/assets/js/blocks/row (added)
-
tags/1.0.1/assets/js/blocks/row/index.js (added)
-
tags/1.0.1/assets/js/blocks/separator (added)
-
tags/1.0.1/assets/js/blocks/separator/index.js (added)
-
tags/1.0.1/assets/js/blocks/social-icons (added)
-
tags/1.0.1/assets/js/blocks/social-icons/index.js (added)
-
tags/1.0.1/assets/js/blocks/spacer (added)
-
tags/1.0.1/assets/js/blocks/spacer/index.js (added)
-
tags/1.0.1/assets/js/blocks/table (added)
-
tags/1.0.1/assets/js/blocks/table/index.js (added)
-
tags/1.0.1/assets/js/blocks/team (added)
-
tags/1.0.1/assets/js/blocks/team/index.js (added)
-
tags/1.0.1/assets/js/blocks/testimonials (added)
-
tags/1.0.1/assets/js/blocks/testimonials/index.js (added)
-
tags/1.0.1/assets/js/blocks/text (added)
-
tags/1.0.1/assets/js/blocks/text/index.js (added)
-
tags/1.0.1/assets/js/front-animations.js (added)
-
tags/1.0.1/assets/js/globals.js (added)
-
tags/1.0.1/assets/js/lottie.js (added)
-
tags/1.0.1/blocks (added)
-
tags/1.0.1/blocks/accordion (added)
-
tags/1.0.1/blocks/accordion/edit.js (added)
-
tags/1.0.1/blocks/accordion/index.js (added)
-
tags/1.0.1/blocks/accordion/save.js (added)
-
tags/1.0.1/blocks/accordion/script.php (added)
-
tags/1.0.1/blocks/accordion/styles.php (added)
-
tags/1.0.1/blocks/button (added)
-
tags/1.0.1/blocks/button/edit.js (added)
-
tags/1.0.1/blocks/button/index.js (added)
-
tags/1.0.1/blocks/button/save.js (added)
-
tags/1.0.1/blocks/button/styles.php (added)
-
tags/1.0.1/blocks/buttons (added)
-
tags/1.0.1/blocks/buttons/edit.js (added)
-
tags/1.0.1/blocks/buttons/index.js (added)
-
tags/1.0.1/blocks/buttons/save.js (added)
-
tags/1.0.1/blocks/buttons/styles.php (added)
-
tags/1.0.1/blocks/call-to-action (added)
-
tags/1.0.1/blocks/call-to-action/edit.js (added)
-
tags/1.0.1/blocks/call-to-action/index.js (added)
-
tags/1.0.1/blocks/call-to-action/save.js (added)
-
tags/1.0.1/blocks/call-to-action/script.php (added)
-
tags/1.0.1/blocks/call-to-action/styles.php (added)
-
tags/1.0.1/blocks/column (added)
-
tags/1.0.1/blocks/column/edit.js (added)
-
tags/1.0.1/blocks/column/index.js (added)
-
tags/1.0.1/blocks/column/save.js (added)
-
tags/1.0.1/blocks/column/styles.php (added)
-
tags/1.0.1/blocks/container (added)
-
tags/1.0.1/blocks/container/edit.js (added)
-
tags/1.0.1/blocks/container/index.js (added)
-
tags/1.0.1/blocks/container/save.js (added)
-
tags/1.0.1/blocks/container/script.php (added)
-
tags/1.0.1/blocks/container/styles.php (added)
-
tags/1.0.1/blocks/countdown (added)
-
tags/1.0.1/blocks/countdown/edit.js (added)
-
tags/1.0.1/blocks/countdown/index.js (added)
-
tags/1.0.1/blocks/countdown/save.js (added)
-
tags/1.0.1/blocks/countdown/script.php (added)
-
tags/1.0.1/blocks/countdown/styles.php (added)
-
tags/1.0.1/blocks/counter (added)
-
tags/1.0.1/blocks/counter/edit.js (added)
-
tags/1.0.1/blocks/counter/index.js (added)
-
tags/1.0.1/blocks/counter/save.js (added)
-
tags/1.0.1/blocks/counter/script.php (added)
-
tags/1.0.1/blocks/counter/styles.php (added)
-
tags/1.0.1/blocks/faq (added)
-
tags/1.0.1/blocks/faq/edit.js (added)
-
tags/1.0.1/blocks/faq/index.js (added)
-
tags/1.0.1/blocks/faq/save.js (added)
-
tags/1.0.1/blocks/faq/script.php (added)
-
tags/1.0.1/blocks/faq/styles.php (added)
-
tags/1.0.1/blocks/forms (added)
-
tags/1.0.1/blocks/forms/edit.js (added)
-
tags/1.0.1/blocks/forms/index.js (added)
-
tags/1.0.1/blocks/forms/save.js (added)
-
tags/1.0.1/blocks/forms/script.php (added)
-
tags/1.0.1/blocks/forms/styles.php (added)
-
tags/1.0.1/blocks/google-map (added)
-
tags/1.0.1/blocks/google-map/edit.js (added)
-
tags/1.0.1/blocks/google-map/index.js (added)
-
tags/1.0.1/blocks/google-map/save.js (added)
-
tags/1.0.1/blocks/google-map/script.php (added)
-
tags/1.0.1/blocks/google-map/styles.php (added)
-
tags/1.0.1/blocks/heading (added)
-
tags/1.0.1/blocks/heading/edit.js (added)
-
tags/1.0.1/blocks/heading/index.js (added)
-
tags/1.0.1/blocks/heading/save.js (added)
-
tags/1.0.1/blocks/heading/script.php (added)
-
tags/1.0.1/blocks/heading/styles.php (added)
-
tags/1.0.1/blocks/icon (added)
-
tags/1.0.1/blocks/icon-box (added)
-
tags/1.0.1/blocks/icon-box/edit.js (added)
-
tags/1.0.1/blocks/icon-box/index.js (added)
-
tags/1.0.1/blocks/icon-box/save.js (added)
-
tags/1.0.1/blocks/icon-box/styles.php (added)
-
tags/1.0.1/blocks/icon-list (added)
-
tags/1.0.1/blocks/icon-list/edit.js (added)
-
tags/1.0.1/blocks/icon-list/index.js (added)
-
tags/1.0.1/blocks/icon-list/save.js (added)
-
tags/1.0.1/blocks/icon-list/styles.php (added)
-
tags/1.0.1/blocks/icon/edit.js (added)
-
tags/1.0.1/blocks/icon/index.js (added)
-
tags/1.0.1/blocks/icon/save.js (added)
-
tags/1.0.1/blocks/icon/styles.php (added)
-
tags/1.0.1/blocks/image (added)
-
tags/1.0.1/blocks/image/edit.js (added)
-
tags/1.0.1/blocks/image/index.js (added)
-
tags/1.0.1/blocks/image/save.js (added)
-
tags/1.0.1/blocks/image/styles.php (added)
-
tags/1.0.1/blocks/lottie (added)
-
tags/1.0.1/blocks/lottie/edit.js (added)
-
tags/1.0.1/blocks/lottie/index.js (added)
-
tags/1.0.1/blocks/lottie/save.js (added)
-
tags/1.0.1/blocks/lottie/script.php (added)
-
tags/1.0.1/blocks/lottie/styles.php (added)
-
tags/1.0.1/blocks/newsletter (added)
-
tags/1.0.1/blocks/newsletter/edit.js (added)
-
tags/1.0.1/blocks/newsletter/index.js (added)
-
tags/1.0.1/blocks/newsletter/save.js (added)
-
tags/1.0.1/blocks/newsletter/script.php (added)
-
tags/1.0.1/blocks/newsletter/styles.php (added)
-
tags/1.0.1/blocks/pricing-table (added)
-
tags/1.0.1/blocks/pricing-table/edit.js (added)
-
tags/1.0.1/blocks/pricing-table/index.js (added)
-
tags/1.0.1/blocks/pricing-table/save.js (added)
-
tags/1.0.1/blocks/pricing-table/styles.php (added)
-
tags/1.0.1/blocks/row (added)
-
tags/1.0.1/blocks/row/edit.js (added)
-
tags/1.0.1/blocks/row/index.js (added)
-
tags/1.0.1/blocks/row/save.js (added)
-
tags/1.0.1/blocks/row/script.php (added)
-
tags/1.0.1/blocks/row/styles.php (added)
-
tags/1.0.1/blocks/separator (added)
-
tags/1.0.1/blocks/separator/edit.js (added)
-
tags/1.0.1/blocks/separator/index.js (added)
-
tags/1.0.1/blocks/separator/save.js (added)
-
tags/1.0.1/blocks/separator/styles.php (added)
-
tags/1.0.1/blocks/social-icons (added)
-
tags/1.0.1/blocks/social-icons/edit.js (added)
-
tags/1.0.1/blocks/social-icons/index.js (added)
-
tags/1.0.1/blocks/social-icons/save.js (added)
-
tags/1.0.1/blocks/social-icons/styles.php (added)
-
tags/1.0.1/blocks/spacer (added)
-
tags/1.0.1/blocks/spacer/edit.js (added)
-
tags/1.0.1/blocks/spacer/index.js (added)
-
tags/1.0.1/blocks/spacer/save.js (added)
-
tags/1.0.1/blocks/spacer/styles.php (added)
-
tags/1.0.1/blocks/table (added)
-
tags/1.0.1/blocks/table/edit.js (added)
-
tags/1.0.1/blocks/table/index.js (added)
-
tags/1.0.1/blocks/table/save.js (added)
-
tags/1.0.1/blocks/table/styles.php (added)
-
tags/1.0.1/blocks/team (added)
-
tags/1.0.1/blocks/team/edit.js (added)
-
tags/1.0.1/blocks/team/index.js (added)
-
tags/1.0.1/blocks/team/save.js (added)
-
tags/1.0.1/blocks/team/styles.php (added)
-
tags/1.0.1/blocks/testimonials (added)
-
tags/1.0.1/blocks/testimonials/edit.js (added)
-
tags/1.0.1/blocks/testimonials/index.js (added)
-
tags/1.0.1/blocks/testimonials/save.js (added)
-
tags/1.0.1/blocks/testimonials/styles.php (added)
-
tags/1.0.1/blocks/text (added)
-
tags/1.0.1/blocks/text/edit.js (added)
-
tags/1.0.1/blocks/text/index.js (added)
-
tags/1.0.1/blocks/text/save.js (added)
-
tags/1.0.1/blocks/text/styles.php (added)
-
tags/1.0.1/digiblocks.php (added)
-
tags/1.0.1/includes (added)
-
tags/1.0.1/includes/class-digiblocks-blocks-data.php (added)
-
tags/1.0.1/includes/class-digiblocks-fonts.php (added)
-
tags/1.0.1/includes/class-digiblocks-forms-handler.php (added)
-
tags/1.0.1/includes/class-digiblocks-image-api-handler.php (added)
-
tags/1.0.1/includes/class-digiblocks-install.php (added)
-
tags/1.0.1/includes/class-digiblocks-newsletter-handler.php (added)
-
tags/1.0.1/includes/class-digiblocks-review-notice.php (added)
-
tags/1.0.1/includes/class-digiblocks-schema-markup.php (added)
-
tags/1.0.1/includes/class-digiblocks.php (added)
-
tags/1.0.1/includes/helpers.php (added)
-
tags/1.0.1/includes/icons (added)
-
tags/1.0.1/includes/icons/all-icons.json (added)
-
tags/1.0.1/languages (added)
-
tags/1.0.1/languages/digiblocks.pot (added)
-
tags/1.0.1/readme.txt (added)
-
tags/1.0.1/resources (added)
-
tags/1.0.1/resources/css (added)
-
tags/1.0.1/resources/css/admin (added)
-
tags/1.0.1/resources/css/admin/admin.css (added)
-
tags/1.0.1/resources/css/admin/review-notice.css (added)
-
tags/1.0.1/resources/css/blocks (added)
-
tags/1.0.1/resources/css/blocks/_container.css (added)
-
tags/1.0.1/resources/css/blocks/_dimension.css (added)
-
tags/1.0.1/resources/css/blocks/_font-awesome.css (added)
-
tags/1.0.1/resources/css/blocks/_gradient.css (added)
-
tags/1.0.1/resources/css/blocks/_range.css (added)
-
tags/1.0.1/resources/css/blocks/_responsive-control.css (added)
-
tags/1.0.1/resources/css/blocks/_row.css (added)
-
tags/1.0.1/resources/css/blocks/_social-icons.css (added)
-
tags/1.0.1/resources/css/blocks/_tabs.css (added)
-
tags/1.0.1/resources/css/blocks/_typography.css (added)
-
tags/1.0.1/resources/css/blocks/editor.css (added)
-
tags/1.0.1/resources/js (added)
-
tags/1.0.1/resources/js/admin (added)
-
tags/1.0.1/resources/js/admin/admin.js (added)
-
tags/1.0.1/resources/js/admin/review-notice.js (added)
-
tags/1.0.1/resources/js/blocks (added)
-
tags/1.0.1/resources/js/blocks/index.js (added)
-
tags/1.0.1/resources/js/blocks/utils.js (added)
-
tags/1.0.1/resources/js/components (added)
-
tags/1.0.1/resources/js/components/box-shadow-control.js (added)
-
tags/1.0.1/resources/js/components/button-group-control.js (added)
-
tags/1.0.1/resources/js/components/dimension-control.js (added)
-
tags/1.0.1/resources/js/components/font-awesome-control.js (added)
-
tags/1.0.1/resources/js/components/gradient-control.js (added)
-
tags/1.0.1/resources/js/components/range-control.js (added)
-
tags/1.0.1/resources/js/components/responsive-control.js (added)
-
tags/1.0.1/resources/js/components/tab-panel.js (added)
-
tags/1.0.1/resources/js/components/typography-control.js (added)
-
tags/1.0.1/resources/js/front-animations.js (added)
-
tags/1.0.1/resources/js/globals.js (added)
-
tags/1.0.1/resources/js/lottie.js (added)
-
tags/1.0.1/resources/js/utils (added)
-
tags/1.0.1/resources/js/utils/animations.js (added)
-
tags/1.0.1/resources/js/utils/google-fonts.js (added)
-
tags/1.0.1/resources/js/utils/helpers.js (added)
-
trunk/assets/css/blocks/editor.css (modified) (1 diff)
-
trunk/assets/js/blocks/accordion (added)
-
trunk/assets/js/blocks/accordion/index.js (added)
-
trunk/assets/js/blocks/button (added)
-
trunk/assets/js/blocks/button/index.js (added)
-
trunk/assets/js/blocks/buttons (added)
-
trunk/assets/js/blocks/buttons/index.js (added)
-
trunk/assets/js/blocks/call-to-action (added)
-
trunk/assets/js/blocks/call-to-action/index.js (added)
-
trunk/assets/js/blocks/column (added)
-
trunk/assets/js/blocks/column/index.js (added)
-
trunk/assets/js/blocks/container (added)
-
trunk/assets/js/blocks/container/index.js (added)
-
trunk/assets/js/blocks/countdown (added)
-
trunk/assets/js/blocks/countdown/index.js (added)
-
trunk/assets/js/blocks/counter (added)
-
trunk/assets/js/blocks/counter/index.js (added)
-
trunk/assets/js/blocks/faq (added)
-
trunk/assets/js/blocks/faq/index.js (added)
-
trunk/assets/js/blocks/forms (added)
-
trunk/assets/js/blocks/forms/index.js (added)
-
trunk/assets/js/blocks/google-map (added)
-
trunk/assets/js/blocks/google-map/index.js (added)
-
trunk/assets/js/blocks/heading (added)
-
trunk/assets/js/blocks/heading/index.js (added)
-
trunk/assets/js/blocks/icon (added)
-
trunk/assets/js/blocks/icon-box (added)
-
trunk/assets/js/blocks/icon-box/index.js (added)
-
trunk/assets/js/blocks/icon-list (added)
-
trunk/assets/js/blocks/icon-list/index.js (added)
-
trunk/assets/js/blocks/icon/index.js (added)
-
trunk/assets/js/blocks/image (added)
-
trunk/assets/js/blocks/image/index.js (added)
-
trunk/assets/js/blocks/index.js (deleted)
-
trunk/assets/js/blocks/lottie (added)
-
trunk/assets/js/blocks/lottie/index.js (added)
-
trunk/assets/js/blocks/newsletter (added)
-
trunk/assets/js/blocks/newsletter/index.js (added)
-
trunk/assets/js/blocks/pricing-table (added)
-
trunk/assets/js/blocks/pricing-table/index.js (added)
-
trunk/assets/js/blocks/row (added)
-
trunk/assets/js/blocks/row/index.js (added)
-
trunk/assets/js/blocks/separator (added)
-
trunk/assets/js/blocks/separator/index.js (added)
-
trunk/assets/js/blocks/social-icons (added)
-
trunk/assets/js/blocks/social-icons/index.js (added)
-
trunk/assets/js/blocks/spacer (added)
-
trunk/assets/js/blocks/spacer/index.js (added)
-
trunk/assets/js/blocks/table (added)
-
trunk/assets/js/blocks/table/index.js (added)
-
trunk/assets/js/blocks/team (added)
-
trunk/assets/js/blocks/team/index.js (added)
-
trunk/assets/js/blocks/testimonials (added)
-
trunk/assets/js/blocks/testimonials/index.js (added)
-
trunk/assets/js/blocks/text (added)
-
trunk/assets/js/blocks/text/index.js (added)
-
trunk/blocks/accordion/edit.js (modified) (2 diffs)
-
trunk/blocks/accordion/index.js (modified) (4 diffs)
-
trunk/blocks/accordion/styles.php (modified) (4 diffs)
-
trunk/blocks/button/edit.js (modified) (2 diffs)
-
trunk/blocks/button/index.js (modified) (3 diffs)
-
trunk/blocks/button/styles.php (modified) (3 diffs)
-
trunk/blocks/buttons/index.js (modified) (2 diffs)
-
trunk/blocks/call-to-action/edit.js (modified) (3 diffs)
-
trunk/blocks/call-to-action/index.js (modified) (3 diffs)
-
trunk/blocks/call-to-action/styles.php (modified) (2 diffs)
-
trunk/blocks/container/edit.js (modified) (3 diffs)
-
trunk/blocks/container/index.js (modified) (3 diffs)
-
trunk/blocks/container/styles.php (modified) (4 diffs)
-
trunk/blocks/countdown/edit.js (modified) (15 diffs)
-
trunk/blocks/countdown/index.js (modified) (4 diffs)
-
trunk/blocks/countdown/styles.php (modified) (11 diffs)
-
trunk/blocks/counter/edit.js (modified) (7 diffs)
-
trunk/blocks/counter/index.js (modified) (8 diffs)
-
trunk/blocks/counter/save.js (modified) (3 diffs)
-
trunk/blocks/counter/styles.php (modified) (12 diffs)
-
trunk/blocks/faq/index.js (modified) (5 diffs)
-
trunk/blocks/faq/styles.php (modified) (4 diffs)
-
trunk/blocks/forms/index.js (modified) (4 diffs)
-
trunk/blocks/forms/styles.php (modified) (5 diffs)
-
trunk/blocks/google-map/index.js (modified) (2 diffs)
-
trunk/blocks/google-map/script.php (modified) (8 diffs)
-
trunk/blocks/heading/edit.js (modified) (1 diff)
-
trunk/blocks/heading/index.js (modified) (5 diffs)
-
trunk/blocks/heading/styles.php (modified) (5 diffs)
-
trunk/blocks/icon-box/edit.js (modified) (3 diffs)
-
trunk/blocks/icon-box/index.js (modified) (14 diffs)
-
trunk/blocks/icon-box/styles.php (modified) (10 diffs)
-
trunk/blocks/icon-list/edit.js (modified) (4 diffs)
-
trunk/blocks/icon-list/index.js (modified) (3 diffs)
-
trunk/blocks/icon-list/styles.php (modified) (3 diffs)
-
trunk/blocks/icon/edit.js (modified) (5 diffs)
-
trunk/blocks/icon/index.js (modified) (3 diffs)
-
trunk/blocks/icon/styles.php (modified) (4 diffs)
-
trunk/blocks/image/index.js (modified) (2 diffs)
-
trunk/blocks/lottie/index.js (modified) (2 diffs)
-
trunk/blocks/newsletter/index.js (modified) (4 diffs)
-
trunk/blocks/newsletter/styles.php (modified) (4 diffs)
-
trunk/blocks/posts (deleted)
-
trunk/blocks/pricing-table/edit.js (modified) (3 diffs)
-
trunk/blocks/pricing-table/index.js (modified) (2 diffs)
-
trunk/blocks/pricing-table/save.js (modified) (1 diff)
-
trunk/blocks/row (added)
-
trunk/blocks/row/edit.js (added)
-
trunk/blocks/row/index.js (added)
-
trunk/blocks/row/save.js (added)
-
trunk/blocks/row/script.php (added)
-
trunk/blocks/row/styles.php (added)
-
trunk/blocks/separator/index.js (modified) (2 diffs)
-
trunk/blocks/social-icons/edit.js (modified) (14 diffs)
-
trunk/blocks/social-icons/index.js (modified) (5 diffs)
-
trunk/blocks/social-icons/styles.php (modified) (11 diffs)
-
trunk/blocks/spacer/index.js (modified) (2 diffs)
-
trunk/blocks/table/edit.js (modified) (5 diffs)
-
trunk/blocks/table/index.js (modified) (2 diffs)
-
trunk/blocks/table/save.js (modified) (1 diff)
-
trunk/blocks/table/styles.php (modified) (1 diff)
-
trunk/blocks/team/index.js (modified) (2 diffs)
-
trunk/blocks/testimonials/index.js (modified) (2 diffs)
-
trunk/blocks/text/edit.js (modified) (2 diffs)
-
trunk/blocks/text/index.js (modified) (5 diffs)
-
trunk/blocks/text/styles.php (modified) (6 diffs)
-
trunk/digiblocks.php (modified) (2 diffs)
-
trunk/includes/class-digiblocks-blocks-data.php (modified) (1 diff)
-
trunk/includes/class-digiblocks.php (modified) (29 diffs)
-
trunk/includes/helpers.php (modified) (1 diff)
-
trunk/readme.txt (modified) (4 diffs)
-
trunk/resources/css/blocks/_container.css (modified) (1 diff)
-
trunk/resources/css/blocks/_row.css (added)
-
trunk/resources/css/blocks/editor.css (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
digiblocks/trunk/assets/css/blocks/editor.css
r3317829 r3346454 1 .digiblocks-tab-panel{margin-top:10px}.digiblocks-tabs-wrapper{display:flex}.digiblocks-tab-button{align-items:center;background:none;border:none;border-bottom:2px solid transparent;cursor:pointer;display:flex;flex:1;flex-direction:column;gap:.5rem;justify-content:center;padding:10px 15px;transition:all .2s ease}.digiblocks-tab-button:hover{background-color:#f5f5f5}.digiblocks-tab-button.is-active{border-bottom:2px solid #007cba;color:#007cba}.digiblocks-tab-button.is-active svg path{fill:#007cba}.digiblocks-tab-icon{height:1.2rem;width:1.2rem}.digiblocks-tab-icon svg{height:100%;width:100%}.digiblocks-tab-title{font-size:11px;font-weight:500;text-transform:uppercase}.components-panel__body.is-opened>.components-panel__body-title{margin-bottom:16px}.digiblocks-tab-panel.four .digiblocks-tabs-wrapper{display:grid;grid-template-columns:1fr 1fr;grid-template-rows:1fr 1fr}.digiblocks-font-awesome-control{margin-bottom:24px;position:relative}.digiblocks-font-awesome-control .digiblocks-control-label{box-sizing:border-box;display:block;font-size:11px;font-weight:500;line-height:1.4;margin-bottom:.5rem;text-transform:uppercase}.digiblocks-ip-placeholder-wrap{align-items:center;background:#f0f0f1;border:1px solid #dcdcde;border-radius:4px;cursor:pointer;display:flex;padding:12px;position:relative;transition:all .2s ease}.digiblocks-ip-placeholder-wrap:hover{background:#f6f7f7;border-color:#007cba;box-shadow:0 0 0 1px #007cba}.digiblocks-ip-selected-icon{align-items:center;background:#fff;border-radius:4px;box-shadow:0 1px 3px rgba(0,0,0,.1);height:45px;justify-content:center;margin-right:10px;overflow:hidden;position:relative;width:45px}.digiblocks-ip-selected-icon,.digiblocks-ip-selected-icon-value,.digiblocks-ip-selected-icon-value span{display:flex}.digiblocks-ip-selected-icon svg{color:#3c434a;height:24px;width:24px}.digiblocks-ip-remove-icon{align-items:center;background:#cc1818;border-radius:50%;cursor:pointer;display:flex;height:20px;justify-content:center;opacity:0;position:absolute;right:-8px;top:-8px;transform:scale(.8);transition:all .2s ease;width:20px;z-index:10}.digiblocks-ip-placeholder-wrap:hover .digiblocks-ip-remove-icon{opacity:1;transform:scale(1)}.digiblocks-ip-remove-icon svg{height:12px;width:12px;fill:#fff}.digiblocks-ip-actions{color:#3c434a;flex:1;font-size:13px}.digiblocks-ip-actions span{display:inline-block;transition:color .2s ease}.digiblocks-ip-placeholder-wrap:hover .digiblocks-ip-actions span{color:#007cba}.digiblocks-ip-modal-wrapper-overlay{animation:modal-appear .2s ease-out;background:rgba(0,0,0,.7)!important;z-index:160000!important}@keyframes modal-appear{0%{opacity:0}to{opacity:1}}.digiblocks-ip-modal-wrapper{animation:modal-slide-up .25s ease-out;border-radius:6px!important;box-shadow:0 5px 15px rgba(0,0,0,.3)!important;height:600px!important;max-height:80vh!important;max-width:900px!important;overflow:hidden!important;padding:0!important;width:90%!important}.digiblocks-ip-modal-wrapper .components-modal__header{display:none}.digiblocks-ip-modal-wrapper .components-modal__content{margin:0;padding:0}.digiblocks-ip-modal-wrapper .components-modal__content.has-scrolled-content:not(.hide-header) .components-modal__header{border:0}@keyframes modal-slide-up{0%{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}.digiblocks-ip-header{align-items:center;background:#fff;border-bottom:1px solid #dcdcde;display:flex;gap:2rem;justify-content:space-between;padding:16px 24px}.digiblocks-ip-header h2{color:#1e1e1e;font-size:18px;font-weight:600;margin:0}.digiblocks-ip-search-container{flex:1}.digiblocks-ip-search-container .components-base-control{width:100%}.digiblocks-ip-search-bar{align-items:center;display:flex;position:relative}.digiblocks-ip-search-bar svg{height:16px;left:10px;position:absolute;width:16px;fill:#757575}.digiblocks-ip-search-bar input.components-text-control__input{border:1px solid #dcdcde;border-radius:4px;height:36px;padding-left:32px!important;width:100%}.digiblocks-ip-search-bar input.components-text-control__input:focus{border-color:#007cba;box-shadow:0 0 0 1px #007cba}.digiblocks-ip-search-bar span{color:#757575;cursor:pointer;font-size:18px;font-weight:700;position:absolute;right:10px;transition:color .2s ease}.digiblocks-ip-search-bar span:hover{color:#cc1818}.digiblocks-ip-lr-container{display:flex;height:calc(100% - 130px);overflow:hidden}.digiblocks-ip-left{background:#f6f7f7;border-right:1px solid #dcdcde;display:flex;flex-direction:column;overflow:hidden;width:220px}.digiblocks-ip-categories-list{flex:1;overflow-y:auto;padding:12px 0}.digiblocks-ip-categories-list div{border-left:3px solid transparent;color:#3c434a;cursor:pointer;font-size:13px;padding:8px 16px;transition:all .2s ease}.digiblocks-ip-categories-list div:hover{background:rgba(0,0,0,.04);color:#007cba}.digiblocks-ip-categories-list div.selected{background:#f0f6fc;border-left-color:#007cba;color:#007cba;font-weight:500}.digiblocks-ip-style-selector{background:#f0f0f1;border-top:1px solid #dcdcde;padding:16px}.digiblocks-ip-style-selector .components-base-control__label{font-weight:500;margin-bottom:8px}.digiblocks-ip-style-selector .components-select-control__input{height:36px}.digiblocks-ip-right{display:flex;flex:1;flex-direction:column;overflow:hidden}.digiblocks-ip-modal-container{background:#fff;flex:1;overflow-y:auto;padding:16px}.digiblocks-ip-loading{align-items:center;color:#3c434a;display:flex;flex-direction:column;height:100%;justify-content:center}.digiblocks-ip-loading .components-spinner{margin:0 0 12px}.digiblocks-ip-icons{display:grid;gap:12px;grid-template-columns:repeat(auto-fill,minmax(100px,1fr));padding-bottom:16px}.digiblocks-ip-icons.icon-not-found{align-items:center;color:#757575;display:flex;font-size:14px;height:100%;justify-content:center}.digiblocks-icon-item{align-items:center;border:1px solid transparent;border-radius:4px;cursor:pointer;display:flex;flex-direction:column;height:90px;justify-content:center;padding:8px;text-align:center;transition:all .2s ease}.digiblocks-icon-item:hover{background:#f6f7f7;border-color:#dcdcde;box-shadow:0 2px 5px rgba(0,0,0,.08);transform:translateY(-2px)}.digiblocks-icon-item.selected{background:#f0f6fc;border-color:#007cba}.digiblocks-icon-item svg{color:#3c434a;height:28px;margin-bottom:8px;width:28px}.digiblocks-icon-item span:nth-child(2){color:#757575;display:-webkit-box;font-size:11px;-webkit-line-clamp:2;-webkit-box-orient:vertical;line-height:1.3;max-width:100%;overflow:hidden}.digiblocks-ip-load-more{display:block!important;grid-column:1/-1;margin:16px auto 0!important}.digiblocks-ip-footer{background:#f6f7f7;border-top:1px solid #dcdcde;display:flex;justify-content:flex-end;padding:16px 24px}.digiblocks-ip-footer button{justify-content:center;min-width:80px}@media (max-width:782px){.digiblocks-ip-modal-wrapper{height:90vh!important;max-height:none!important;width:95%!important}.digiblocks-ip-header{align-items:flex-start;flex-direction:column}.digiblocks-ip-search-container{margin:16px 0 0;max-width:none;width:100%}.digiblocks-ip-lr-container{flex-direction:column;height:calc(100% - 180px)}.digiblocks-ip-left{border-bottom:1px solid #dcdcde;border-right:none;height:auto;width:100%}.digiblocks-ip-categories-list{display:flex;overflow-x:auto;padding:8px}.digiblocks-ip-categories-list div{border-bottom:3px solid transparent;border-left:none;padding:8px 12px;white-space:nowrap}.digiblocks-ip-categories-list div.selected{border-bottom-color:#007cba;border-left-color:transparent}.digiblocks-ip-icons{grid-template-columns:repeat(auto-fill,minmax(80px,1fr))}.digiblocks-icon-item{height:80px}}.digiblocks-ip-modal-wrapper{animation:fadeIn .2s ease-out}.digiblocks-icon-item{animation:fadeIn .3s ease-out}.digiblocks-icon-box{position:relative;transition:all .3s ease}.digiblocks-icon-box[data-hover-effect=lift]:hover{transform:translateY(-10px)}.digiblocks-icon-box[data-hover-effect=scale]:hover{transform:scale(1.05)}.digiblocks-icon-box[data-hover-effect=glow]:hover{box-shadow:0 0 20px rgba(0,120,215,.2)}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes slideInUp{0%{opacity:0;transform:translateY(30px)}to{opacity:1;transform:translateY(0)}}@keyframes slideInLeft{0%{opacity:0;transform:translateX(-30px)}to{opacity:1;transform:translateX(0)}}@keyframes slideInRight{0%{opacity:0;transform:translateX(30px)}to{opacity:1;transform:translateX(0)}}@keyframes zoomIn{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes bounce{0%,20%,50%,80%,to{transform:translateY(0)}40%{transform:translateY(-20px)}60%{transform:translateY(-10px)}}.digiblocks-icon-box[data-animation=fade-in]{animation:fadeIn 1s ease}.digiblocks-icon-box[data-animation=slide-up]{animation:slideInUp 1s ease}.digiblocks-icon-box[data-animation=slide-left]{animation:slideInLeft 1s ease}.digiblocks-icon-box[data-animation=slide-right]{animation:slideInRight 1s ease}.digiblocks-icon-box[data-animation=zoom-in]{animation:zoomIn 1s ease}.digiblocks-icon-box[data-animation=bounce]{animation:bounce 1s ease}body .editor-styles-wrapper{transition:all .3s ease-in-out}.digiblocks-responsive-control{margin-bottom:24px}.digiblocks-responsive-control-content{padding:0}.digiblocks-responsive-label-wrap{gap:.5rem}.digiblocks-responsive-common-button{border:0;box-shadow:none!important;color:#50575e;cursor:pointer;display:flex;height:auto;line-height:0;margin:0;outline:0;padding:4px}.digiblocks-responsive-common-button:active,.digiblocks-responsive-common-button:focus,.digiblocks-responsive-common-button:hover{box-shadow:none;color:#007cba;outline:none}.digiblocks-responsive-common-button svg{height:.6rem;width:.6rem;fill:currentColor}.digiblocks-control-label{color:#50575e;font-size:13px;font-weight:400;line-height:1.4em;margin-bottom:0}.digiblocks-typography-options{margin-bottom:24px}.digiblocks-typography-options .digiblocks-select-control .components-select-control,.digiblocks-typography-options .digiblocks-typography-advanced>.components-base-control{align-items:center;display:grid;gap:0;grid-template-columns:50% 50%}.digiblocks-typography-options .digiblocks-select-control .components-select-control label,.digiblocks-typography-options .digiblocks-typography-advanced>.components-base-control label{margin-bottom:0}.digiblocks-control-popup__options--action-wrapper{align-items:center;display:flex;justify-content:space-between;margin-bottom:8px}body .components-button.digiblocks-typography-button{background:transparent!important;border:1px solid #e6e7e9;border-radius:14px;color:#50575e;cursor:pointer;height:28px;margin:0;padding:5px;width:28px}body .components-button.digiblocks-typography-button .dashicons-edit{font-size:15px;line-height:20px;outline:none}body .components-button.digiblocks-typography-button:hover{color:#007cba}body .components-button.digiblocks-typography-button.is-pressed{background-color:#fff;color:#007cba}.digiblocks-typography-advanced{background:#fff;border-radius:2px;box-shadow:0 2px 8px rgba(0,0,0,.2);margin-bottom:16px;padding:16px;position:relative;top:5px;width:100%}.digiblocks-font-family-searchable-select__wrapper{margin-bottom:15px}.digiblocks-font-family-searchable-select__wrapper .components-input-control__label{color:#50575e;font-size:13px!important;font-weight:400!important;line-height:1.4em!important;margin-bottom:10px;text-transform:none!important}.digiblocks-size-type-field-tabs{margin-bottom:15px}.digiblocks-size-type-field-tabs:last-child{margin-bottom:0}.digiblocks-responsive-label-wrap{align-items:center;display:flex}.digiblocks-control__header .digiblocks-control__actions{gap:.25rem}.digiblocks-range-control__mobile-controls{align-items:center;display:flex}.digiblocks-range-control__mobile-controls>.components-base-control{width:100%}.digiblocks-select-control{margin-bottom:15px}.digiblocks-select-control--layout-inline .components-base-control__field{display:flex;flex-direction:column}.digiblocks-select-control--layout-inline .components-base-control__label,.digiblocks-select-control--layout-inline .components-input-control__label{color:#50575e;font-size:13px!important;font-weight:400!important;line-height:1.4em!important;margin-bottom:8px;text-transform:none!important}.digiblocks-select-control--layout-inline .components-select-control__input{color:#50575e;line-height:30px;text-transform:capitalize}.digiblocks-typography-decoration{margin-bottom:15px}.components-popover.components-dropdown-menu__popover{z-index:1000}body .components-base-control__field{margin:0}.digiblocks-responsive-control-content{display:flex;flex-direction:column}.digiblocks-control__header{align-items:center;display:flex;justify-content:space-between;margin-bottom:10px;width:100%}.digiblocks-control__actions{direction:ltr;display:flex;position:relative;top:0}.digiblocks-reset.components-button.is-small.has-icon:not(.has-text){min-width:auto;padding:0;width:auto}body .components-button.is-secondary.digiblocks-reset.is-small{background:transparent;box-shadow:unset;color:#ccc;padding:0 4px}body .components-button.is-secondary.digiblocks-reset.is-small:not(:disabled){color:#007cba}.digiblocks-reset .dashicons-image-rotate{font-size:10px;height:10px;width:10px}.digiblocks-reset.is-small.is-pressed,.digiblocks-reset.is-small:focus:not(:disabled){border:0}.digiblocks-control__units{align-items:center;direction:ltr;display:flex;gap:.25rem}.digiblocks-control__units .components-button{cursor:pointer;font-size:10px;justify-content:center;padding:0;text-align:center;text-shadow:none;text-transform:uppercase;width:100%}.digiblocks-control__units .components-button.is-pressed,.digiblocks-control__units .components-button:focus:not(:disabled){border:0}.digiblocks-control__units .components-button.is-primary.is-small,.digiblocks-control__units .components-button.is-secondary.is-small{box-shadow:unset}.digiblocks-control__units .components-button.is-primary{background:unset;background-color:unset;box-shadow:unset;color:#007cba}.digiblocks-control__units .components-button.is-secondary,.digiblocks-control__units .components-button.is-tertiary{background:unset;background-color:unset;color:#50575e}.digiblocks-control__units .components-button.is-secondary:hover:not(:disabled),.digiblocks-control__units .components-button.is-tertiary:hover:not(:disabled){color:#007cba}.digiblocks-control__units .components-button:last-child{padding:0}.digiblocks-spacing-inputs{display:flex}.digiblocks-spacing-input[type=number]{border-bottom-color:#e6e7e9;border-left:1px solid #e6e7e9;border-radius:0;border-right:1px solid #e6e7e9;border-top-color:#e6e7e9;box-shadow:none!important;color:#50575e;flex:1;font-size:14px;height:30px;line-height:20px;margin:0 -1px 0 0;max-width:50px;padding-left:4px;padding-right:1px;text-align:center}.digiblocks-spacing-input::-webkit-inner-spin-button,.digiblocks-spacing-input::-webkit-outer-spin-button{margin:0}.digiblocks-spacing-input:focus{outline:1px solid #ccc;outline-offset:-1px;z-index:1}.digiblocks-spacing-input::-moz-placeholder{color:#aaa}.digiblocks-spacing-input::placeholder{color:#aaa}.digiblocks-spacing-inputs>.digiblocks-spacing-input:first-child{border-radius:3px 0 0 3px}.digiblocks-spacing-link{align-items:center;background-color:#959595;border:1px solid #959595;border-radius:0 3px 3px 0;color:#fff;cursor:pointer;display:flex;flex:1;font-size:12px;height:auto;justify-content:center;transition:none}.digiblocks-spacing-link.digiblocks-spacing-control-disconnected{background-color:#fff;border-color:#e6e7e9;color:#959595}.digiblocks-spacing-labels{display:flex;margin-top:5px}.digiblocks-spacing-label{color:#ccc;display:block;flex:1;font-size:10px;text-align:center}.digiblocks-spacing-label.digiblocks-spacing-link-label{flex:1}.digiblocks-dimension-control{margin-bottom:25px}.digiblocks-dimension-control.is-responsive{margin-bottom:0}.digiblocks-gradient-control{margin-bottom:16px;width:100%}.digiblocks-gradient-preview{border:1px solid #ddd;border-radius:4px;margin:12px 0;overflow:hidden;position:relative}.digiblocks-gradient-preview-inner{height:60px;position:relative;width:100%}.digiblocks-gradient-colors{margin-top:16px}.digiblocks-gradient-colors-header{align-items:center;display:flex;justify-content:space-between;margin-bottom:12px}.digiblocks-gradient-colors-header strong{color:#1e1e1e;font-weight:600}.digiblocks-gradient-color-stops{display:flex;flex-direction:column;gap:12px}.digiblocks-gradient-color-stop{align-items:center;background:#f8f9fa;border:1px solid #e9ecef;border-radius:6px;display:grid;gap:12px;grid-template-columns:40px 1fr 36px;padding:12px;transition:all .2s ease}.digiblocks-gradient-color-stop:hover{background:#f1f3f4;border-color:#d0d7de}.digiblocks-color-indicator-button{align-items:center;background:transparent;border:2px solid #fff;border-radius:50%;box-shadow:0 0 0 1px rgba(0,0,0,.1),inset 0 0 0 1px hsla(0,0%,100%,.1);cursor:pointer;display:flex;height:32px;justify-content:center;min-width:32px;overflow:hidden;padding:0;position:relative;width:32px}.digiblocks-color-indicator-button .component-color-indicator{box-shadow:none}.digiblocks-color-indicator-button:hover{box-shadow:0 0 0 1px rgba(0,0,0,.2),inset 0 0 0 1px hsla(0,0%,100%,.1);transform:scale(1.05)}.digiblocks-color-indicator-button:focus{box-shadow:0 0 0 2px #007cba;outline:none}.digiblocks-color-indicator-button .components-color-indicator{display:none}.digiblocks-color-dropdown{position:relative}.digiblocks-color-dropdown-content{margin-top:8px;z-index:999999!important}.digiblocks-gradient-color-stop-position{position:relative}.digiblocks-gradient-color-stop-position .components-base-control__field,.digiblocks-gradient-color-stop-position .components-range-control,.digiblocks-gradient-color-stop-position .components-range-control__wrapper{margin-bottom:0!important}.digiblocks-gradient-color-stop-position .components-input-control__container{min-height:36px}.digiblocks-gradient-color-stop-remove{align-items:center;display:flex;justify-content:center}.digiblocks-gradient-color-stop-remove .components-button{align-items:center;border-radius:4px;display:flex;height:32px;justify-content:center;min-width:32px;padding:0}.digiblocks-gradient-color-stop-remove .components-button:disabled{cursor:not-allowed;opacity:.3}.digiblocks-gradient-colors-header .components-button{border-radius:4px;font-size:12px;height:32px;padding:0 12px}.digiblocks-gradient-control .components-range-control,.digiblocks-gradient-control .components-select-control,.digiblocks-gradient-control .components-toggle-group-control{margin-bottom:16px}@media (max-width:600px){.digiblocks-gradient-color-stop{gap:8px;grid-template-columns:36px 1fr 32px;padding:10px}.digiblocks-color-indicator-button{height:28px;min-width:28px;width:28px}.digiblocks-gradient-color-stop-remove .components-button{height:28px;min-width:28px}}.digiblocks-custom-range-control{align-items:center;display:flex;min-height:40px;width:100%}.range-slider-wrapper{align-items:center;display:flex;flex:1;height:30px;position:relative}.range-slider{cursor:pointer;height:100%;margin:0 -6px;opacity:0;position:absolute;width:calc(100% + 12px);z-index:2}.range-track{background-color:#ddd;width:100%}.range-track,.range-track-fill{border-radius:9999px;height:4px;position:absolute}.range-thumb,.range-track-fill{background-color:var(--wp-admin-theme-color,#3858e9);pointer-events:none}.range-thumb{border-radius:50%;box-shadow:0 1px 1px rgba(0,0,0,.03),0 1px 2px rgba(0,0,0,.02),0 3px 3px rgba(0,0,0,.02),0 4px 4px rgba(0,0,0,.01);height:12px;margin-left:-6px;position:absolute;width:12px}.input-wrapper{margin-left:16px;width:80px}.number-input[type=number]{background-color:#fff;border:1px solid #d5d5d5;border-radius:2px;box-shadow:none!important;color:#1e1e1e;font-size:13px;height:40px;line-height:1;min-height:40px;padding:0 12px;width:100%}.number-input[type=number]:focus{border-color:var(--wp-admin-theme-color,#3858e9);outline:none}.block-editor-block-list__block[data-type="digiblocks/container"]{border:1px dashed #ddd;display:flex;justify-content:center;max-width:none!important;padding:10px;position:relative}.block-editor-block-list__block[data-type="digiblocks/container"].has-child-selected:before,.block-editor-block-list__block[data-type="digiblocks/container"].is-selected:before{border:1px dashed #ddd;bottom:0;content:"";left:0;pointer-events:none;position:absolute;right:0;top:0;z-index:1}.digiblocks-container-inner{position:relative;width:100%}.block-editor-block-list__block[data-type="digiblocks/column"]{border:1px dashed #ddd;min-height:50px;padding:10px;position:relative}.block-editor-block-list__block[data-type="digiblocks/column"].is-selected:before{border:1px dashed #1e1e1e;bottom:0;content:"";left:0;pointer-events:none;position:absolute;right:0;top:0;z-index:1}.digiblocks-layout-selector{background-color:#f8f9fa;border-radius:4px;grid-column:span 12;padding:20px;text-align:center}.digiblocks-layout-selector h2{color:#666;font-size:18px;font-weight:500;margin-bottom:20px;margin-top:0;text-align:center;text-transform:uppercase}.digiblocks-layout-grid{display:flex;flex-wrap:wrap;justify-content:center;margin:auto;max-width:650px;padding:0}.digiblocks-layout-option{box-sizing:border-box;cursor:pointer;list-style:none;padding:5px 10px;position:relative;transition:transform .2s ease;width:20%}.digiblocks-layout-option:hover{transform:scale(1.05)}.digiblocks-layout-icon{align-items:center;display:flex;justify-content:center;margin-bottom:8px;width:100%}.digiblocks-layout-icon svg{width:100%;fill:#d4dce6;transition:all .3s ease}.digiblocks-layout-option:hover .digiblocks-layout-icon svg{fill:#007cba}.digiblocks-layout-label{color:#555;font-size:12px}.digiblocks-layout-option .screen-reader-text{border:0;clip:rect(1px,1px,1px,1px);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;word-wrap:normal!important}.digiblocks-change-layout-button{margin-bottom:10px!important;width:100%}.digiblocks-media-control{margin-bottom:24px}.digiblocks-media-upload-wrapper{margin-top:8px}.digiblocks-media-preview{background-color:#f0f0f0;border-radius:4px;overflow:hidden;position:relative}.digiblocks-media-preview img{display:block;height:auto;max-height:200px;-o-object-fit:cover;object-fit:cover;width:100%}.digiblocks-media-preview video{background-color:#000;display:block;height:auto;max-height:200px;-o-object-fit:contain;object-fit:contain;width:100%}.digiblocks-media-controls{display:flex;gap:8px;position:absolute;right:5px;top:5px}.digiblocks-media-controls.digiblocks-media-controls .components-button{border-radius:50%;height:28px;justify-content:center;margin:0;outline:none;padding:0;width:28px}.digiblocks-media-controls .components-button.is-destructive:not(.is-primary):not(.is-secondary):not(.is-tertiary):not(.is-link),.digiblocks-media-controls .components-button.is-destructive:not(.is-primary):not(.is-secondary):not(.is-tertiary):not(.is-link):active:not(:disabled,[aria-disabled=true]){background-color:#dc3545;color:#fff}.digiblocks-media-controls .components-button.is-destructive:not(.is-primary):not(.is-secondary):not(.is-tertiary):not(.is-link):hover:not(:disabled,[aria-disabled=true]){background-color:#a32531;color:#fff}.digiblocks-media-controls .components-button.is-destructive:not(.is-primary):not(.is-secondary):not(.is-tertiary):not(.is-link):focus,.digiblocks-media-controls .components-button.is-primary:focus:not(:disabled){box-shadow:none}.digiblocks-media-upload-button{justify-content:center;width:100%}.digiblocks-responsive-indicator{align-items:center;color:#757575;display:flex;font-size:12px;margin-bottom:8px}.digiblocks-responsive-indicator-icon{margin-right:5px}.edit-post-visual-editor__content-area:not(.is-tablet-preview):not(.is-mobile-preview) .digiblocks-responsive-desktop{display:block}.edit-post-visual-editor__content-area:not(.is-tablet-preview):not(.is-mobile-preview) .digiblocks-responsive-mobile,.edit-post-visual-editor__content-area:not(.is-tablet-preview):not(.is-mobile-preview) .digiblocks-responsive-tablet{display:none}.edit-post-visual-editor__content-area.is-tablet-preview .digiblocks-responsive-tablet{display:block}.edit-post-visual-editor__content-area.is-tablet-preview .digiblocks-responsive-desktop,.edit-post-visual-editor__content-area.is-tablet-preview .digiblocks-responsive-mobile{display:none}.edit-post-visual-editor__content-area.is-mobile-preview .digiblocks-responsive-mobile{display:block}.edit-post-visual-editor__content-area.is-mobile-preview .digiblocks-responsive-desktop,.edit-post-visual-editor__content-area.is-mobile-preview .digiblocks-responsive-tablet{display:none}. digiblocks-social-icons-list{margin-bottom:20px}.digiblocks-social-icon-item{background-color:#fff;border:1px solid #e0e0e0;border-radius:4px;margin-bottom:16px;overflow:hidden;transition:box-shadow .2s ease}.digiblocks-social-icon-item.dragging{border:1px solid #007cba;box-shadow:0 4px 12px rgba(0,0,0,.15);opacity:.9;position:relative;z-index:100}.digiblocks-social-icon-item.drag-over{background-color:rgba(0,124,186,.05);border:1px dashed #007cba}.digiblocks-social-icon-header{align-items:center;background-color:#f9f9f9;border-bottom:1px solid #e0e0e0;cursor:pointer;display:flex;justify-content:space-between;padding:10px 12px}.digiblocks-social-icon-item.is-closed .digiblocks-social-icon-header{border-bottom:none}.digiblocks-social-icon-title{cursor:pointer;flex-grow:1;font-size:14px;font-weight:600;margin-left:8px}.digiblocks-social-icon-drag-handle{align-items:center;color:#757575;cursor:grab;display:flex;justify-content:center}.digiblocks-social-icon-drag-handle:hover{color:#007cba}.digiblocks-social-icon-drag-handle .dashicons{font-size:18px;height:18px;width:18px}.digiblocks-social-icon-actions{display:flex;gap:5px}.digiblocks-social-icon-content{display:flex;flex-direction:column;padding:16px}.digiblocks-add-social-icon{justify-content:center;margin-top:12px!important;width:100%}.digiblocks-social-icon-fields .social-media-icon-picker{margin-bottom:16px}.block-editor-block-list__block .digiblocks-social-icon{display:inline-flex!important}[data-type="digiblocks/social-icons"]{padding:10px}.digiblocks-social-icon-fields .fa-selector-button-group{display:flex;flex-wrap:wrap;gap:8px;margin-top:8px}.digiblocks-social-icon-fields .fa-selector-button{align-items:center;background:#f7f7f7;border:1px solid #ddd;border-radius:4px;cursor:pointer;display:flex;height:36px;justify-content:center;padding:0;width:36px}.digiblocks-social-icon-fields .fa-selector-button:hover{background:#f0f0f0;border-color:#007cba}.digiblocks-social-icon-fields .fa-selector-button.selected{background:#f0f7fc;border-color:#007cba;box-shadow:0 0 0 1px #007cba}.digiblocks-social-icon-fields .fa-selector-button svg{height:18px;width:18px}.digiblocks-social-icon-actions .components-button.is-small{height:24px;min-width:24px;padding:0}.digiblocks-social-icon-item:focus-within{box-shadow:0 0 0 1.5px #007cba}.digiblocks-social-icon-content{max-height:1000px;overflow:hidden;transition:max-height .3s ease-in-out}.digiblocks-social-icon-item.is-closed .digiblocks-social-icon-content{border-top:none;max-height:0;padding-bottom:0;padding-top:0}.is-root-container *{box-sizing:border-box}.components-panel__body .digiblocks-control-tabs.first{margin-top:-16px}.width-full{justify-content:center;width:100%}.digiblocks-tabs .components-tab-panel__tabs{border-bottom:1px solid #e0e0e0;display:flex;margin-bottom:15px}.digiblocks-tabs .components-tab-panel__tabs-item{border-bottom:2px solid transparent;flex:1;font-weight:500;justify-content:center;margin-bottom:-1px}.digiblocks-tabs .components-tab-panel__tabs-item.is-active{border-bottom-color:#1e73be}body .components-button.is-secondary{justify-content:center}.block-editor-block-icon.has-colors svg.digiblocks-editor-icons{fill:#526bfe}body .components-input-control__backdrop{border-color:#d5d5d5!important}body .block-editor-panel-color-gradient-settings{border:0;margin-bottom:24px;padding:0}body .block-editor-tools-panel-color-gradient-settings__item:nth-child(1 of .block-editor-tools-panel-color-gradient-settings__item){margin-top:15px}.digiblocks-control__header .components-base-control{align-items:center;display:flex}.digiblocks-control__header .components-toggle-group-control{border:0;gap:.25rem;min-height:auto;padding:0}.digiblocks-control__header .components-toggle-group-control>div{min-width:auto}.digiblocks-control__header .components-toggle-group-control:before{display:none}.digiblocks-control__header .components-toggle-group-control-option-base{background:none;padding:0}.digiblocks-control__header .components-toggle-group-control-option-base[aria-checked=true]{color:#007cba}.digiblocks-control__header .components-toggle-group-control-option-base[aria-checked=false]{color:#757575}.digiblocks-control__header .components-toggle-group-control-option-base[aria-checked=false]:hover{color:#333}.components-range-control__root .components-range-control__reset.components-button.is-small{align-items:center;background:none;box-shadow:none!important;box-sizing:initial;color:#1e1e1e;display:inline-flex;font-size:0;height:10px;justify-content:center;line-height:0;outline:none;padding:2px;width:10px}.components-range-control__root .components-range-control__reset.components-button.is-small[aria-disabled=true]{color:#949494}.components-range-control__root .components-range-control__reset.components-button.is-small:before{content:"\f531";font-family:dashicons;font-size:10px;line-height:1}.digiblocks-tab-panel .components-base-control__help{color:#757575;font-size:12px;font-style:normal;margin-bottom:0;margin-top:8px}.digiblocks-tab-panel .block-editor-link-control{min-width:auto}.digiblocks-tab-panel .block-editor-link-control__field{margin:0 0 16px}.digiblocks-tab-panel .block-editor-link-control__search-item .components-menu-item__item{min-width:auto}.digiblocks-tab-panel .block-editor-link-control__search-item.is-current{padding:0}@media (min-width:600px){.digiblocks-tab-panel .block-editor-url-input{min-width:auto}}.digiblocks-link-modal .block-editor-link-control__field{margin:0 0 16px}.digiblocks-link-modal .block-editor-link-control__search-item{max-width:350px}.digiblocks-link-modal .block-editor-link-control__search-item.is-current{padding:0}.digiblocks-link-modal .block-editor-link-control__search-actions{padding:8px 0 0}.digiblocks-link-modal .block-editor-link-control__search-results-wrapper{max-width:350px}.digiblocks-control-tabs .components-tab-panel__tabs{border-bottom:1px solid #e0e0e0;display:flex;gap:.5rem}.digiblocks-control-tabs .components-tab-panel__tabs-item{border-bottom:2px solid transparent;color:#757575;cursor:pointer;flex:1;font-size:13px;height:32px!important;justify-content:center;padding:0 16px 8px;transition:all .2s ease}.digiblocks-control-tabs .components-tab-panel__tabs-item:hover{color:#007cba}.digiblocks-control-tabs .components-tab-panel__tabs-item.active-tab{border-bottom:2px solid #007cba;color:#007cba}.digiblocks-control-tabs .components-tab-panel__tab-content,.digiblocks-control-tabs .components-tab-panel__tabs .components-tab-panel__tab-content{margin-top:1rem}.components-datetime__time-field,.components-datetime__time-field-hours-input,.components-datetime__time-field-minutes-input{margin:0!important}1 .digiblocks-tab-panel{margin-top:10px}.digiblocks-tabs-wrapper{display:flex}.digiblocks-tab-button{align-items:center;background:none;border:none;border-bottom:2px solid transparent;cursor:pointer;display:flex;flex:1;flex-direction:column;gap:.5rem;justify-content:center;padding:10px 15px;transition:all .2s ease}.digiblocks-tab-button:hover{background-color:#f5f5f5}.digiblocks-tab-button.is-active{border-bottom:2px solid #007cba;color:#007cba}.digiblocks-tab-button.is-active svg path{fill:#007cba}.digiblocks-tab-icon{height:1.2rem;width:1.2rem}.digiblocks-tab-icon svg{height:100%;width:100%}.digiblocks-tab-title{font-size:11px;font-weight:500;text-transform:uppercase}.components-panel__body.is-opened>.components-panel__body-title{margin-bottom:16px}.digiblocks-tab-panel.four .digiblocks-tabs-wrapper{display:grid;grid-template-columns:1fr 1fr;grid-template-rows:1fr 1fr}.digiblocks-font-awesome-control{margin-bottom:24px;position:relative}.digiblocks-font-awesome-control .digiblocks-control-label{box-sizing:border-box;display:block;font-size:11px;font-weight:500;line-height:1.4;margin-bottom:.5rem;text-transform:uppercase}.digiblocks-ip-placeholder-wrap{align-items:center;background:#f0f0f1;border:1px solid #dcdcde;border-radius:4px;cursor:pointer;display:flex;padding:12px;position:relative;transition:all .2s ease}.digiblocks-ip-placeholder-wrap:hover{background:#f6f7f7;border-color:#007cba;box-shadow:0 0 0 1px #007cba}.digiblocks-ip-selected-icon{align-items:center;background:#fff;border-radius:4px;box-shadow:0 1px 3px rgba(0,0,0,.1);height:45px;justify-content:center;margin-right:10px;overflow:hidden;position:relative;width:45px}.digiblocks-ip-selected-icon,.digiblocks-ip-selected-icon-value,.digiblocks-ip-selected-icon-value span{display:flex}.digiblocks-ip-selected-icon svg{color:#3c434a;height:24px;width:24px}.digiblocks-ip-remove-icon{align-items:center;background:#cc1818;border-radius:50%;cursor:pointer;display:flex;height:20px;justify-content:center;opacity:0;position:absolute;right:-8px;top:-8px;transform:scale(.8);transition:all .2s ease;width:20px;z-index:10}.digiblocks-ip-placeholder-wrap:hover .digiblocks-ip-remove-icon{opacity:1;transform:scale(1)}.digiblocks-ip-remove-icon svg{height:12px;width:12px;fill:#fff}.digiblocks-ip-actions{color:#3c434a;flex:1;font-size:13px}.digiblocks-ip-actions span{display:inline-block;transition:color .2s ease}.digiblocks-ip-placeholder-wrap:hover .digiblocks-ip-actions span{color:#007cba}.digiblocks-ip-modal-wrapper-overlay{animation:modal-appear .2s ease-out;background:rgba(0,0,0,.7)!important;z-index:160000!important}@keyframes modal-appear{0%{opacity:0}to{opacity:1}}.digiblocks-ip-modal-wrapper{animation:modal-slide-up .25s ease-out;border-radius:6px!important;box-shadow:0 5px 15px rgba(0,0,0,.3)!important;height:600px!important;max-height:80vh!important;max-width:900px!important;overflow:hidden!important;padding:0!important;width:90%!important}.digiblocks-ip-modal-wrapper .components-modal__header{display:none}.digiblocks-ip-modal-wrapper .components-modal__content{margin:0;padding:0}.digiblocks-ip-modal-wrapper .components-modal__content.has-scrolled-content:not(.hide-header) .components-modal__header{border:0}@keyframes modal-slide-up{0%{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}.digiblocks-ip-header{align-items:center;background:#fff;border-bottom:1px solid #dcdcde;display:flex;gap:2rem;justify-content:space-between;padding:16px 24px}.digiblocks-ip-header h2{color:#1e1e1e;font-size:18px;font-weight:600;margin:0}.digiblocks-ip-search-container{flex:1}.digiblocks-ip-search-container .components-base-control{width:100%}.digiblocks-ip-search-bar{align-items:center;display:flex;position:relative}.digiblocks-ip-search-bar svg{height:16px;left:10px;position:absolute;width:16px;fill:#757575}.digiblocks-ip-search-bar input.components-text-control__input{border:1px solid #dcdcde;border-radius:4px;height:36px;padding-left:32px!important;width:100%}.digiblocks-ip-search-bar input.components-text-control__input:focus{border-color:#007cba;box-shadow:0 0 0 1px #007cba}.digiblocks-ip-search-bar span{color:#757575;cursor:pointer;font-size:18px;font-weight:700;position:absolute;right:10px;transition:color .2s ease}.digiblocks-ip-search-bar span:hover{color:#cc1818}.digiblocks-ip-lr-container{display:flex;height:calc(100% - 130px);overflow:hidden}.digiblocks-ip-left{background:#f6f7f7;border-right:1px solid #dcdcde;display:flex;flex-direction:column;overflow:hidden;width:220px}.digiblocks-ip-categories-list{flex:1;overflow-y:auto;padding:12px 0}.digiblocks-ip-categories-list div{border-left:3px solid transparent;color:#3c434a;cursor:pointer;font-size:13px;padding:8px 16px;transition:all .2s ease}.digiblocks-ip-categories-list div:hover{background:rgba(0,0,0,.04);color:#007cba}.digiblocks-ip-categories-list div.selected{background:#f0f6fc;border-left-color:#007cba;color:#007cba;font-weight:500}.digiblocks-ip-style-selector{background:#f0f0f1;border-top:1px solid #dcdcde;padding:16px}.digiblocks-ip-style-selector .components-base-control__label{font-weight:500;margin-bottom:8px}.digiblocks-ip-style-selector .components-select-control__input{height:36px}.digiblocks-ip-right{display:flex;flex:1;flex-direction:column;overflow:hidden}.digiblocks-ip-modal-container{background:#fff;flex:1;overflow-y:auto;padding:16px}.digiblocks-ip-loading{align-items:center;color:#3c434a;display:flex;flex-direction:column;height:100%;justify-content:center}.digiblocks-ip-loading .components-spinner{margin:0 0 12px}.digiblocks-ip-icons{display:grid;gap:12px;grid-template-columns:repeat(auto-fill,minmax(100px,1fr));padding-bottom:16px}.digiblocks-ip-icons.icon-not-found{align-items:center;color:#757575;display:flex;font-size:14px;height:100%;justify-content:center}.digiblocks-icon-item{align-items:center;border:1px solid transparent;border-radius:4px;cursor:pointer;display:flex;flex-direction:column;height:90px;justify-content:center;padding:8px;text-align:center;transition:all .2s ease}.digiblocks-icon-item:hover{background:#f6f7f7;border-color:#dcdcde;box-shadow:0 2px 5px rgba(0,0,0,.08);transform:translateY(-2px)}.digiblocks-icon-item.selected{background:#f0f6fc;border-color:#007cba}.digiblocks-icon-item svg{color:#3c434a;height:28px;margin-bottom:8px;width:28px}.digiblocks-icon-item span:nth-child(2){color:#757575;display:-webkit-box;font-size:11px;-webkit-line-clamp:2;-webkit-box-orient:vertical;line-height:1.3;max-width:100%;overflow:hidden}.digiblocks-ip-load-more{display:block!important;grid-column:1/-1;margin:16px auto 0!important}.digiblocks-ip-footer{background:#f6f7f7;border-top:1px solid #dcdcde;display:flex;justify-content:flex-end;padding:16px 24px}.digiblocks-ip-footer button{justify-content:center;min-width:80px}@media (max-width:782px){.digiblocks-ip-modal-wrapper{height:90vh!important;max-height:none!important;width:95%!important}.digiblocks-ip-header{align-items:flex-start;flex-direction:column}.digiblocks-ip-search-container{margin:16px 0 0;max-width:none;width:100%}.digiblocks-ip-lr-container{flex-direction:column;height:calc(100% - 180px)}.digiblocks-ip-left{border-bottom:1px solid #dcdcde;border-right:none;height:auto;width:100%}.digiblocks-ip-categories-list{display:flex;overflow-x:auto;padding:8px}.digiblocks-ip-categories-list div{border-bottom:3px solid transparent;border-left:none;padding:8px 12px;white-space:nowrap}.digiblocks-ip-categories-list div.selected{border-bottom-color:#007cba;border-left-color:transparent}.digiblocks-ip-icons{grid-template-columns:repeat(auto-fill,minmax(80px,1fr))}.digiblocks-icon-item{height:80px}}.digiblocks-ip-modal-wrapper{animation:fadeIn .2s ease-out}.digiblocks-icon-item{animation:fadeIn .3s ease-out}.digiblocks-icon-box{position:relative;transition:all .3s ease}.digiblocks-icon-box[data-hover-effect=lift]:hover{transform:translateY(-10px)}.digiblocks-icon-box[data-hover-effect=scale]:hover{transform:scale(1.05)}.digiblocks-icon-box[data-hover-effect=glow]:hover{box-shadow:0 0 20px rgba(0,120,215,.2)}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes slideInUp{0%{opacity:0;transform:translateY(30px)}to{opacity:1;transform:translateY(0)}}@keyframes slideInLeft{0%{opacity:0;transform:translateX(-30px)}to{opacity:1;transform:translateX(0)}}@keyframes slideInRight{0%{opacity:0;transform:translateX(30px)}to{opacity:1;transform:translateX(0)}}@keyframes zoomIn{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes bounce{0%,20%,50%,80%,to{transform:translateY(0)}40%{transform:translateY(-20px)}60%{transform:translateY(-10px)}}.digiblocks-icon-box[data-animation=fade-in]{animation:fadeIn 1s ease}.digiblocks-icon-box[data-animation=slide-up]{animation:slideInUp 1s ease}.digiblocks-icon-box[data-animation=slide-left]{animation:slideInLeft 1s ease}.digiblocks-icon-box[data-animation=slide-right]{animation:slideInRight 1s ease}.digiblocks-icon-box[data-animation=zoom-in]{animation:zoomIn 1s ease}.digiblocks-icon-box[data-animation=bounce]{animation:bounce 1s ease}body .editor-styles-wrapper{transition:all .3s ease-in-out}.digiblocks-responsive-control{margin-bottom:24px}.digiblocks-responsive-control-content{padding:0}.digiblocks-responsive-label-wrap{gap:.5rem}.digiblocks-responsive-common-button{border:0;box-shadow:none!important;color:#50575e;cursor:pointer;display:flex;height:auto;line-height:0;margin:0;outline:0;padding:4px}.digiblocks-responsive-common-button:active,.digiblocks-responsive-common-button:focus,.digiblocks-responsive-common-button:hover{box-shadow:none;color:#007cba;outline:none}.digiblocks-responsive-common-button svg{height:.6rem;width:.6rem;fill:currentColor}.digiblocks-control-label{color:#50575e;font-size:13px;font-weight:400;line-height:1.4em;margin-bottom:0}.digiblocks-typography-options{margin-bottom:24px}.digiblocks-typography-options .digiblocks-select-control .components-select-control,.digiblocks-typography-options .digiblocks-typography-advanced>.components-base-control{align-items:center;display:grid;gap:0;grid-template-columns:50% 50%}.digiblocks-typography-options .digiblocks-select-control .components-select-control label,.digiblocks-typography-options .digiblocks-typography-advanced>.components-base-control label{margin-bottom:0}.digiblocks-control-popup__options--action-wrapper{align-items:center;display:flex;justify-content:space-between;margin-bottom:8px}body .components-button.digiblocks-typography-button{background:transparent!important;border:1px solid #e6e7e9;border-radius:14px;color:#50575e;cursor:pointer;height:28px;margin:0;padding:5px;width:28px}body .components-button.digiblocks-typography-button .dashicons-edit{font-size:15px;line-height:20px;outline:none}body .components-button.digiblocks-typography-button:hover{color:#007cba}body .components-button.digiblocks-typography-button.is-pressed{background-color:#fff;color:#007cba}.digiblocks-typography-advanced{background:#fff;border-radius:2px;box-shadow:0 2px 8px rgba(0,0,0,.2);margin-bottom:16px;padding:16px;position:relative;top:5px;width:100%}.digiblocks-font-family-searchable-select__wrapper{margin-bottom:15px}.digiblocks-font-family-searchable-select__wrapper .components-input-control__label{color:#50575e;font-size:13px!important;font-weight:400!important;line-height:1.4em!important;margin-bottom:10px;text-transform:none!important}.digiblocks-size-type-field-tabs{margin-bottom:15px}.digiblocks-size-type-field-tabs:last-child{margin-bottom:0}.digiblocks-responsive-label-wrap{align-items:center;display:flex}.digiblocks-control__header .digiblocks-control__actions{gap:.25rem}.digiblocks-range-control__mobile-controls{align-items:center;display:flex}.digiblocks-range-control__mobile-controls>.components-base-control{width:100%}.digiblocks-select-control{margin-bottom:15px}.digiblocks-select-control--layout-inline .components-base-control__field{display:flex;flex-direction:column}.digiblocks-select-control--layout-inline .components-base-control__label,.digiblocks-select-control--layout-inline .components-input-control__label{color:#50575e;font-size:13px!important;font-weight:400!important;line-height:1.4em!important;margin-bottom:8px;text-transform:none!important}.digiblocks-select-control--layout-inline .components-select-control__input{color:#50575e;line-height:30px;text-transform:capitalize}.digiblocks-typography-decoration{margin-bottom:15px}.components-popover.components-dropdown-menu__popover{z-index:1000}body .components-base-control__field{margin:0}.digiblocks-responsive-control-content{display:flex;flex-direction:column}.digiblocks-control__header{align-items:center;display:flex;justify-content:space-between;margin-bottom:10px;width:100%}.digiblocks-control__actions{direction:ltr;display:flex;position:relative;top:0}.digiblocks-reset.components-button.is-small.has-icon:not(.has-text){min-width:auto;padding:0;width:auto}body .components-button.is-secondary.digiblocks-reset.is-small{background:transparent;box-shadow:unset;color:#ccc;padding:0 4px}body .components-button.is-secondary.digiblocks-reset.is-small:not(:disabled){color:#007cba}.digiblocks-reset .dashicons-image-rotate{font-size:10px;height:10px;width:10px}.digiblocks-reset.is-small.is-pressed,.digiblocks-reset.is-small:focus:not(:disabled){border:0}.digiblocks-control__units{align-items:center;direction:ltr;display:flex;gap:.25rem}.digiblocks-control__units .components-button{cursor:pointer;font-size:10px;justify-content:center;padding:0;text-align:center;text-shadow:none;text-transform:uppercase;width:100%}.digiblocks-control__units .components-button.is-pressed,.digiblocks-control__units .components-button:focus:not(:disabled){border:0}.digiblocks-control__units .components-button.is-primary.is-small,.digiblocks-control__units .components-button.is-secondary.is-small{box-shadow:unset}.digiblocks-control__units .components-button.is-primary{background:unset;background-color:unset;box-shadow:unset;color:#007cba}.digiblocks-control__units .components-button.is-secondary,.digiblocks-control__units .components-button.is-tertiary{background:unset;background-color:unset;color:#50575e}.digiblocks-control__units .components-button.is-secondary:hover:not(:disabled),.digiblocks-control__units .components-button.is-tertiary:hover:not(:disabled){color:#007cba}.digiblocks-control__units .components-button:last-child{padding:0}.digiblocks-spacing-inputs{display:flex}.digiblocks-spacing-input[type=number]{border-bottom-color:#e6e7e9;border-left:1px solid #e6e7e9;border-radius:0;border-right:1px solid #e6e7e9;border-top-color:#e6e7e9;box-shadow:none!important;color:#50575e;flex:1;font-size:14px;height:30px;line-height:20px;margin:0 -1px 0 0;max-width:50px;padding-left:4px;padding-right:1px;text-align:center}.digiblocks-spacing-input::-webkit-inner-spin-button,.digiblocks-spacing-input::-webkit-outer-spin-button{margin:0}.digiblocks-spacing-input:focus{outline:1px solid #ccc;outline-offset:-1px;z-index:1}.digiblocks-spacing-input::-moz-placeholder{color:#aaa}.digiblocks-spacing-input::placeholder{color:#aaa}.digiblocks-spacing-inputs>.digiblocks-spacing-input:first-child{border-radius:3px 0 0 3px}.digiblocks-spacing-link{align-items:center;background-color:#959595;border:1px solid #959595;border-radius:0 3px 3px 0;color:#fff;cursor:pointer;display:flex;flex:1;font-size:12px;height:auto;justify-content:center;transition:none}.digiblocks-spacing-link.digiblocks-spacing-control-disconnected{background-color:#fff;border-color:#e6e7e9;color:#959595}.digiblocks-spacing-labels{display:flex;margin-top:5px}.digiblocks-spacing-label{color:#ccc;display:block;flex:1;font-size:10px;text-align:center}.digiblocks-spacing-label.digiblocks-spacing-link-label{flex:1}.digiblocks-dimension-control{margin-bottom:25px}.digiblocks-dimension-control.is-responsive{margin-bottom:0}.digiblocks-gradient-control{margin-bottom:16px;width:100%}.digiblocks-gradient-preview{border:1px solid #ddd;border-radius:4px;margin:12px 0;overflow:hidden;position:relative}.digiblocks-gradient-preview-inner{height:60px;position:relative;width:100%}.digiblocks-gradient-colors{margin-top:16px}.digiblocks-gradient-colors-header{align-items:center;display:flex;justify-content:space-between;margin-bottom:12px}.digiblocks-gradient-colors-header strong{color:#1e1e1e;font-weight:600}.digiblocks-gradient-color-stops{display:flex;flex-direction:column;gap:12px}.digiblocks-gradient-color-stop{align-items:center;background:#f8f9fa;border:1px solid #e9ecef;border-radius:6px;display:grid;gap:12px;grid-template-columns:40px 1fr 36px;padding:12px;transition:all .2s ease}.digiblocks-gradient-color-stop:hover{background:#f1f3f4;border-color:#d0d7de}.digiblocks-color-indicator-button{align-items:center;background:transparent;border:2px solid #fff;border-radius:50%;box-shadow:0 0 0 1px rgba(0,0,0,.1),inset 0 0 0 1px hsla(0,0%,100%,.1);cursor:pointer;display:flex;height:32px;justify-content:center;min-width:32px;overflow:hidden;padding:0;position:relative;width:32px}.digiblocks-color-indicator-button .component-color-indicator{box-shadow:none}.digiblocks-color-indicator-button:hover{box-shadow:0 0 0 1px rgba(0,0,0,.2),inset 0 0 0 1px hsla(0,0%,100%,.1);transform:scale(1.05)}.digiblocks-color-indicator-button:focus{box-shadow:0 0 0 2px #007cba;outline:none}.digiblocks-color-indicator-button .components-color-indicator{display:none}.digiblocks-color-dropdown{position:relative}.digiblocks-color-dropdown-content{margin-top:8px;z-index:999999!important}.digiblocks-gradient-color-stop-position{position:relative}.digiblocks-gradient-color-stop-position .components-base-control__field,.digiblocks-gradient-color-stop-position .components-range-control,.digiblocks-gradient-color-stop-position .components-range-control__wrapper{margin-bottom:0!important}.digiblocks-gradient-color-stop-position .components-input-control__container{min-height:36px}.digiblocks-gradient-color-stop-remove{align-items:center;display:flex;justify-content:center}.digiblocks-gradient-color-stop-remove .components-button{align-items:center;border-radius:4px;display:flex;height:32px;justify-content:center;min-width:32px;padding:0}.digiblocks-gradient-color-stop-remove .components-button:disabled{cursor:not-allowed;opacity:.3}.digiblocks-gradient-colors-header .components-button{border-radius:4px;font-size:12px;height:32px;padding:0 12px}.digiblocks-gradient-control .components-range-control,.digiblocks-gradient-control .components-select-control,.digiblocks-gradient-control .components-toggle-group-control{margin-bottom:16px}@media (max-width:600px){.digiblocks-gradient-color-stop{gap:8px;grid-template-columns:36px 1fr 32px;padding:10px}.digiblocks-color-indicator-button{height:28px;min-width:28px;width:28px}.digiblocks-gradient-color-stop-remove .components-button{height:28px;min-width:28px}}.digiblocks-custom-range-control{align-items:center;display:flex;min-height:40px;width:100%}.range-slider-wrapper{align-items:center;display:flex;flex:1;height:30px;position:relative}.range-slider{cursor:pointer;height:100%;margin:0 -6px;opacity:0;position:absolute;width:calc(100% + 12px);z-index:2}.range-track{background-color:#ddd;width:100%}.range-track,.range-track-fill{border-radius:9999px;height:4px;position:absolute}.range-thumb,.range-track-fill{background-color:var(--wp-admin-theme-color,#3858e9);pointer-events:none}.range-thumb{border-radius:50%;box-shadow:0 1px 1px rgba(0,0,0,.03),0 1px 2px rgba(0,0,0,.02),0 3px 3px rgba(0,0,0,.02),0 4px 4px rgba(0,0,0,.01);height:12px;margin-left:-6px;position:absolute;width:12px}.input-wrapper{margin-left:16px;width:80px}.number-input[type=number]{background-color:#fff;border:1px solid #d5d5d5;border-radius:2px;box-shadow:none!important;color:#1e1e1e;font-size:13px;height:40px;line-height:1;min-height:40px;padding:0 12px;width:100%}.number-input[type=number]:focus{border-color:var(--wp-admin-theme-color,#3858e9);outline:none}.block-editor-block-list__block[data-type="digiblocks/container"]{border:1px dashed #ddd;display:flex;justify-content:center;max-width:none!important;padding:10px;position:relative}.block-editor-block-list__block[data-type="digiblocks/container"].has-child-selected:before,.block-editor-block-list__block[data-type="digiblocks/container"].is-selected:before{border:1px dashed #ddd;bottom:0;content:"";left:0;pointer-events:none;position:absolute;right:0;top:0;z-index:1}.digiblocks-container-inner{position:relative;width:100%}.block-editor-block-list__block[data-type="digiblocks/column"]{border:1px dashed #ddd;min-height:50px;padding:10px;position:relative}.block-editor-block-list__block[data-type="digiblocks/column"].is-selected:before{border:1px dashed #1e1e1e;bottom:0;content:"";left:0;pointer-events:none;position:absolute;right:0;top:0;z-index:1}.digiblocks-layout-selector{background-color:#f8f9fa;border-radius:4px;grid-column:span 12;padding:20px;text-align:center}.digiblocks-layout-selector h2{color:#666;font-size:18px;font-weight:500;margin-bottom:20px;margin-top:0;text-align:center;text-transform:uppercase}.digiblocks-layout-grid{display:flex;flex-wrap:wrap;justify-content:center;margin:auto;max-width:650px;padding:0}.digiblocks-layout-option{box-sizing:border-box;cursor:pointer;list-style:none;padding:5px 10px;position:relative;transition:transform .2s ease;width:20%}.digiblocks-layout-option:hover{transform:scale(1.05)}.digiblocks-layout-icon{align-items:center;display:flex;justify-content:center;margin-bottom:8px;width:100%}.digiblocks-layout-icon svg{width:100%;fill:#d4dce6;transition:all .3s ease}.digiblocks-layout-option:hover .digiblocks-layout-icon svg{fill:#007cba}.digiblocks-layout-label{color:#555;font-size:12px}.digiblocks-layout-option .screen-reader-text{border:0;clip:rect(1px,1px,1px,1px);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;word-wrap:normal!important}.digiblocks-change-layout-button{margin-bottom:10px!important;width:100%}.digiblocks-media-control{margin-bottom:24px}.digiblocks-media-upload-wrapper{margin-top:8px}.digiblocks-media-preview{background-color:#f0f0f0;border-radius:4px;overflow:hidden;position:relative}.digiblocks-media-preview img{display:block;height:auto;max-height:200px;-o-object-fit:cover;object-fit:cover;width:100%}.digiblocks-media-preview video{background-color:#000;display:block;height:auto;max-height:200px;-o-object-fit:contain;object-fit:contain;width:100%}.digiblocks-media-controls{display:flex;gap:8px;position:absolute;right:5px;top:5px}.digiblocks-media-controls.digiblocks-media-controls .components-button{border-radius:50%;height:28px;justify-content:center;margin:0;outline:none;padding:0;width:28px}.digiblocks-media-controls .components-button.is-destructive:not(.is-primary):not(.is-secondary):not(.is-tertiary):not(.is-link),.digiblocks-media-controls .components-button.is-destructive:not(.is-primary):not(.is-secondary):not(.is-tertiary):not(.is-link):active:not(:disabled,[aria-disabled=true]){background-color:#dc3545;color:#fff}.digiblocks-media-controls .components-button.is-destructive:not(.is-primary):not(.is-secondary):not(.is-tertiary):not(.is-link):hover:not(:disabled,[aria-disabled=true]){background-color:#a32531;color:#fff}.digiblocks-media-controls .components-button.is-destructive:not(.is-primary):not(.is-secondary):not(.is-tertiary):not(.is-link):focus,.digiblocks-media-controls .components-button.is-primary:focus:not(:disabled){box-shadow:none}.digiblocks-media-upload-button{justify-content:center;width:100%}.digiblocks-responsive-indicator{align-items:center;color:#757575;display:flex;font-size:12px;margin-bottom:8px}.digiblocks-responsive-indicator-icon{margin-right:5px}.edit-post-visual-editor__content-area:not(.is-tablet-preview):not(.is-mobile-preview) .digiblocks-responsive-desktop{display:block}.edit-post-visual-editor__content-area:not(.is-tablet-preview):not(.is-mobile-preview) .digiblocks-responsive-mobile,.edit-post-visual-editor__content-area:not(.is-tablet-preview):not(.is-mobile-preview) .digiblocks-responsive-tablet{display:none}.edit-post-visual-editor__content-area.is-tablet-preview .digiblocks-responsive-tablet{display:block}.edit-post-visual-editor__content-area.is-tablet-preview .digiblocks-responsive-desktop,.edit-post-visual-editor__content-area.is-tablet-preview .digiblocks-responsive-mobile{display:none}.edit-post-visual-editor__content-area.is-mobile-preview .digiblocks-responsive-mobile{display:block}.edit-post-visual-editor__content-area.is-mobile-preview .digiblocks-responsive-desktop,.edit-post-visual-editor__content-area.is-mobile-preview .digiblocks-responsive-tablet{display:none}.block-editor-block-list__block[data-type="digiblocks/row"]{border:1px dashed #ddd;display:flex;justify-content:center;max-width:none!important;padding:10px;position:relative}.block-editor-block-list__block[data-type="digiblocks/row"].has-child-selected:before,.block-editor-block-list__block[data-type="digiblocks/row"].is-selected:before{border:1px dashed #ddd;bottom:0;content:"";left:0;pointer-events:none;position:absolute;right:0;top:0;z-index:1}.block-editor-block-list__block[data-type="digiblocks/row"] .is-nested{width:auto}.digiblocks-row .block-list-appender{width:100%}.digiblocks-row-inner{position:relative;width:100%}.digiblocks-social-icons-list{margin-bottom:20px}.digiblocks-social-icon-item{background-color:#fff;border:1px solid #e0e0e0;border-radius:4px;margin-bottom:16px;overflow:hidden;transition:box-shadow .2s ease}.digiblocks-social-icon-item.dragging{border:1px solid #007cba;box-shadow:0 4px 12px rgba(0,0,0,.15);opacity:.9;position:relative;z-index:100}.digiblocks-social-icon-item.drag-over{background-color:rgba(0,124,186,.05);border:1px dashed #007cba}.digiblocks-social-icon-header{align-items:center;background-color:#f9f9f9;border-bottom:1px solid #e0e0e0;cursor:pointer;display:flex;justify-content:space-between;padding:10px 12px}.digiblocks-social-icon-item.is-closed .digiblocks-social-icon-header{border-bottom:none}.digiblocks-social-icon-title{cursor:pointer;flex-grow:1;font-size:14px;font-weight:600;margin-left:8px}.digiblocks-social-icon-drag-handle{align-items:center;color:#757575;cursor:grab;display:flex;justify-content:center}.digiblocks-social-icon-drag-handle:hover{color:#007cba}.digiblocks-social-icon-drag-handle .dashicons{font-size:18px;height:18px;width:18px}.digiblocks-social-icon-actions{display:flex;gap:5px}.digiblocks-social-icon-content{display:flex;flex-direction:column;padding:16px}.digiblocks-add-social-icon{justify-content:center;margin-top:12px!important;width:100%}.digiblocks-social-icon-fields .social-media-icon-picker{margin-bottom:16px}.block-editor-block-list__block .digiblocks-social-icon{display:inline-flex!important}[data-type="digiblocks/social-icons"]{padding:10px}.digiblocks-social-icon-fields .fa-selector-button-group{display:flex;flex-wrap:wrap;gap:8px;margin-top:8px}.digiblocks-social-icon-fields .fa-selector-button{align-items:center;background:#f7f7f7;border:1px solid #ddd;border-radius:4px;cursor:pointer;display:flex;height:36px;justify-content:center;padding:0;width:36px}.digiblocks-social-icon-fields .fa-selector-button:hover{background:#f0f0f0;border-color:#007cba}.digiblocks-social-icon-fields .fa-selector-button.selected{background:#f0f7fc;border-color:#007cba;box-shadow:0 0 0 1px #007cba}.digiblocks-social-icon-fields .fa-selector-button svg{height:18px;width:18px}.digiblocks-social-icon-actions .components-button.is-small{height:24px;min-width:24px;padding:0}.digiblocks-social-icon-item:focus-within{box-shadow:0 0 0 1.5px #007cba}.digiblocks-social-icon-content{max-height:1000px;overflow:hidden;transition:max-height .3s ease-in-out}.digiblocks-social-icon-item.is-closed .digiblocks-social-icon-content{border-top:none;max-height:0;padding-bottom:0;padding-top:0}.is-root-container *{box-sizing:border-box}.components-panel__body .digiblocks-control-tabs.first{margin-top:-16px}.width-full{justify-content:center;width:100%}.digiblocks-tabs .components-tab-panel__tabs{border-bottom:1px solid #e0e0e0;display:flex;margin-bottom:15px}.digiblocks-tabs .components-tab-panel__tabs-item{border-bottom:2px solid transparent;flex:1;font-weight:500;justify-content:center;margin-bottom:-1px}.digiblocks-tabs .components-tab-panel__tabs-item.is-active{border-bottom-color:#1e73be}body .components-button.is-secondary{justify-content:center}.block-editor-block-icon.has-colors svg.digiblocks-editor-icons{fill:#526bfe}body .components-input-control__backdrop{border-color:#d5d5d5!important}body .block-editor-panel-color-gradient-settings{border:0;margin-bottom:24px;padding:0}body .block-editor-tools-panel-color-gradient-settings__item:nth-child(1 of .block-editor-tools-panel-color-gradient-settings__item){margin-top:15px}.digiblocks-control__header .components-base-control{align-items:center;display:flex}.digiblocks-control__header .components-toggle-group-control{border:0;gap:.25rem;min-height:auto;padding:0}.digiblocks-control__header .components-toggle-group-control>div{min-width:auto}.digiblocks-control__header .components-toggle-group-control:before{display:none}.digiblocks-control__header .components-toggle-group-control-option-base{background:none;padding:0}.digiblocks-control__header .components-toggle-group-control-option-base[aria-checked=true]{color:#007cba}.digiblocks-control__header .components-toggle-group-control-option-base[aria-checked=false]{color:#757575}.digiblocks-control__header .components-toggle-group-control-option-base[aria-checked=false]:hover{color:#333}.components-range-control__root .components-range-control__reset.components-button.is-small{align-items:center;background:none;box-shadow:none!important;box-sizing:initial;color:#1e1e1e;display:inline-flex;font-size:0;height:10px;justify-content:center;line-height:0;outline:none;padding:2px;width:10px}.components-range-control__root .components-range-control__reset.components-button.is-small[aria-disabled=true]{color:#949494}.components-range-control__root .components-range-control__reset.components-button.is-small:before{content:"\f531";font-family:dashicons;font-size:10px;line-height:1}.digiblocks-tab-panel .components-base-control__help{color:#757575;font-size:12px;font-style:normal;margin-bottom:0;margin-top:8px}.digiblocks-tab-panel .block-editor-link-control{min-width:auto}.digiblocks-tab-panel .block-editor-link-control__field{margin:0 0 16px}.digiblocks-tab-panel .block-editor-link-control__search-item .components-menu-item__item{min-width:auto}.digiblocks-tab-panel .block-editor-link-control__search-item.is-current{padding:0}@media (min-width:600px){.digiblocks-tab-panel .block-editor-url-input{min-width:auto}}.digiblocks-link-modal .block-editor-link-control__field{margin:0 0 16px}.digiblocks-link-modal .block-editor-link-control__search-item{max-width:350px}.digiblocks-link-modal .block-editor-link-control__search-item.is-current{padding:0}.digiblocks-link-modal .block-editor-link-control__search-actions{padding:8px 0 0}.digiblocks-link-modal .block-editor-link-control__search-results-wrapper{max-width:350px}.digiblocks-control-tabs .components-tab-panel__tabs{border-bottom:1px solid #e0e0e0;display:flex;gap:.5rem}.digiblocks-control-tabs .components-tab-panel__tabs-item{border-bottom:2px solid transparent;color:#757575;cursor:pointer;flex:1;font-size:13px;height:32px!important;justify-content:center;padding:0 16px 8px;transition:all .2s ease}.digiblocks-control-tabs .components-tab-panel__tabs-item:hover{color:#007cba}.digiblocks-control-tabs .components-tab-panel__tabs-item.active-tab{border-bottom:2px solid #007cba;color:#007cba}.digiblocks-control-tabs .components-tab-panel__tab-content,.digiblocks-control-tabs .components-tab-panel__tabs .components-tab-panel__tab-content{margin-top:1rem}.components-datetime__time-field,.components-datetime__time-field-hours-input,.components-datetime__time-field-minutes-input{margin:0!important} -
digiblocks/trunk/blocks/accordion/edit.js
r3317829 r3346454 421 421 .${id} .digiblocks-accordion-title { 422 422 margin: 0; 423 color: ${titleColor || '#333333'};423 color: ${titleColor}; 424 424 flex: 1; 425 425 ${titleTypographyCSS} … … 446 446 /* SVG icon fill color */ 447 447 .${id} .digiblocks-accordion-icon svg { 448 fill: ${iconColor || '#333333'};448 fill: ${iconColor}; 449 449 width: ${iconSize[activeDevice]}px; 450 450 height: ${iconSize[activeDevice]}px; -
digiblocks/trunk/blocks/accordion/index.js
r3317829 r3346454 7 7 import AccordionEdit from './edit'; 8 8 import AccordionSave from './save'; 9 const { getBlockActiveStatus } = wp.digiBlocks; 9 10 10 11 11 /** … … 30 30 // Disable all default controls and settings panels 31 31 supports: { 32 inserter: getBlockActiveStatus('accordion') ? true : false,33 32 html: false, 34 33 className: false, … … 76 75 titleColor: { 77 76 type: 'string', 78 default: ' #333333'77 default: '' 79 78 }, 80 79 titleHoverColor: { … … 212 211 iconColor: { 213 212 type: 'string', 214 default: ' #333333'213 default: '' 215 214 }, 216 215 iconHoverColor: { -
digiblocks/trunk/blocks/accordion/styles.php
r3317829 r3346454 19 19 ]; 20 20 $items = isset( $attrs['items'] ) ? $attrs['items'] : array(); 21 $titleColor = isset( $attrs['titleColor'] ) ? $attrs['titleColor'] : ' #333333';21 $titleColor = isset( $attrs['titleColor'] ) ? $attrs['titleColor'] : ''; 22 22 $titleHoverColor = isset( $attrs['titleHoverColor'] ) ? $attrs['titleHoverColor'] : ''; 23 23 $titleActiveColor = isset( $attrs['titleActiveColor'] ) ? $attrs['titleActiveColor'] : '#1e73be'; … … 30 30 $borderHoverColor = isset( $attrs['borderHoverColor'] ) ? $attrs['borderHoverColor'] : ''; 31 31 $iconPosition = isset( $attrs['iconPosition'] ) ? $attrs['iconPosition'] : 'right'; 32 $iconColor = isset( $attrs['iconColor'] ) ? $attrs['iconColor'] : ' #333333';32 $iconColor = isset( $attrs['iconColor'] ) ? $attrs['iconColor'] : ''; 33 33 $iconHoverColor = isset( $attrs['iconHoverColor'] ) ? $attrs['iconHoverColor'] : ''; 34 34 $iconActiveColor = isset( $attrs['iconActiveColor'] ) ? $attrs['iconActiveColor'] : '#1e73be'; … … 287 287 .<?php echo esc_attr( $id ); ?> .digiblocks-accordion-title { 288 288 margin: 0; 289 color: <?php echo esc_attr( $titleColor ); ?>; 289 <?php if ( ! empty( $titleColor ) ) : ?> 290 color: <?php echo esc_attr( $titleColor ); ?>; 291 <?php endif; ?> 290 292 flex: 1; 291 293 <?php if ( ! empty( $titleTypography['fontFamily'] ) ) : ?> … … 371 373 overflow: hidden; 372 374 <?php echo esc_attr( digiblocks_get_dimensions( $padding, 'padding', 'desktop' ) ); ?> 375 <?php if ( ! empty( $contentColor ) ) : ?> 373 376 color: <?php echo esc_attr( $contentColor ); ?>; 377 <?php endif; ?> 374 378 <?php if ( ! empty( $contentTypography['fontFamily'] ) ) : ?> 375 379 font-family: <?php echo esc_attr( $contentTypography['fontFamily'] ); ?>; -
digiblocks/trunk/blocks/button/edit.js
r3317829 r3346454 207 207 borderCSS = ` 208 208 border-style: ${borderStyle}; 209 border-color: ${borderColor || '#333333'};209 border-color: ${borderColor}; 210 210 ${borderWidthStyle} 211 211 `; … … 620 620 } 621 621 defaults={{ 622 fontSize: { desktop: 16, tablet: 15, mobile: 14},622 fontSize: { desktop: '', tablet: '', mobile: '' }, 623 623 fontSizeUnit: 'px', 624 lineHeight: { desktop: 1.5, tablet: 1.4, mobile: 1.3},624 lineHeight: { desktop: '', tablet: '', mobile: '' }, 625 625 lineHeightUnit: 'em', 626 626 }} -
digiblocks/trunk/blocks/button/index.js
r3317829 r3346454 96 96 default: { 97 97 fontFamily: '', 98 fontSize: { desktop: 16, tablet: 15, mobile: 14},98 fontSize: { desktop: '', tablet: '', mobile: '' }, 99 99 fontSizeUnit: 'px', 100 100 fontWeight: '', … … 102 102 textTransform: '', 103 103 textDecoration: '', 104 lineHeight: { desktop: 1.5, tablet: 1.4, mobile: 1.3},104 lineHeight: { desktop: '', tablet: '', mobile: '' }, 105 105 lineHeightUnit: 'em', 106 letterSpacing: { desktop: 0, tablet: 0, mobile: 0},106 letterSpacing: { desktop: '', tablet: '', mobile: '' }, 107 107 letterSpacingUnit: 'px' 108 108 } … … 180 180 default: { 181 181 desktop: { top: 12, right: 24, bottom: 12, left: 24, unit: 'px' }, 182 tablet: { top: 10, right: 20, bottom: 10, left: 20, unit: 'px' },183 mobile: { top: 8, right: 16, bottom: 8, left: 16, unit: 'px' }182 tablet: { top: '', right: '', bottom: '', left: '', unit: 'px' }, 183 mobile: { top: '', right: '', bottom: '', left: '', unit: 'px' } 184 184 } 185 185 }, -
digiblocks/trunk/blocks/button/styles.php
r3317829 r3346454 33 33 $padding = isset( $attrs['padding'] ) ? $attrs['padding'] : array( 34 34 'desktop' => array( 'top' => 12, 'right' => 24, 'bottom' => 12, 'left' => 24, 'unit' => 'px' ), 35 'tablet' => array( 'top' => 10, 'right' => 20, 'bottom' => 10, 'left' => 20, 'unit' => 'px' ),36 'mobile' => array( 'top' => 8, 'right' => 16, 'bottom' => 8, 'left' => 16, 'unit' => 'px' ),35 'tablet' => array( 'top' => '', 'right' => '', 'bottom' => '', 'left' => '', 'unit' => 'px' ), 36 'mobile' => array( 'top' => '', 'right' => '', 'bottom' => '', 'left' => '', 'unit' => 'px' ), 37 37 ); 38 38 … … 69 69 $buttonTypography = isset( $attrs['buttonTypography'] ) ? $attrs['buttonTypography'] : array( 70 70 'fontFamily' => '', 71 'fontSize' => array( 'desktop' => 16, 'tablet' => 15, 'mobile' => 14),71 'fontSize' => array( 'desktop' => '', 'tablet' => '', 'mobile' => '' ), 72 72 'fontSizeUnit' => 'px', 73 73 'fontWeight' => '', … … 75 75 'textTransform' => '', 76 76 'textDecoration' => '', 77 'lineHeight' => array( 'desktop' => 1.5, 'tablet' => 1.4, 'mobile' => 1.3),77 'lineHeight' => array( 'desktop' => '', 'tablet' => '', 'mobile' => '' ), 78 78 'lineHeightUnit' => 'em', 79 'letterSpacing' => array( 'desktop' => 0, 'tablet' => 0, 'mobile' => 0),79 'letterSpacing' => array( 'desktop' => '', 'tablet' => '', 'mobile' => '' ), 80 80 'letterSpacingUnit' => 'px', 81 81 ); -
digiblocks/trunk/blocks/buttons/index.js
r3317829 r3346454 7 7 import ButtonsEdit from './edit'; 8 8 import ButtonsSave from './save'; 9 const { getBlockActiveStatus } = wp.digiBlocks; 9 10 10 11 11 /** … … 29 29 keywords: [__('buttons', 'digiblocks'), __('button group', 'digiblocks'), __('link', 'digiblocks')], 30 30 supports: { 31 inserter: getBlockActiveStatus('buttons') ? true : false,32 31 html: false, 33 32 className: false, -
digiblocks/trunk/blocks/call-to-action/edit.js
r3317829 r3346454 1037 1037 1038 1038 .${id} .digiblocks-cta-title { 1039 color: ${titleColor || '#333'};1039 color: ${titleColor}; 1040 1040 margin-bottom: 15px; 1041 1041 } … … 1069 1069 1070 1070 .${id} .digiblocks-cta-title { 1071 color: ${titleColor || '#333'};1071 color: ${titleColor}; 1072 1072 margin-bottom: 15px; 1073 1073 } … … 1204 1204 1205 1205 .${id} .digiblocks-cta-title { 1206 color: ${titleColor || '#333333'};1206 color: ${titleColor}; 1207 1207 margin-top: 0; 1208 1208 margin-bottom: 20px; -
digiblocks/trunk/blocks/call-to-action/index.js
r3317829 r3346454 7 7 import CallToActionEdit from './edit'; 8 8 import CallToActionSave from './save'; 9 const { getBlockActiveStatus } = wp.digiBlocks; 9 10 10 11 11 /** … … 29 29 keywords: [__('cta', 'digiblocks'), __('call to action', 'digiblocks'), __('button', 'digiblocks'), __('conversion', 'digiblocks')], 30 30 supports: { 31 inserter: getBlockActiveStatus('call-to-action') ? true : false,32 31 html: false, 33 32 className: false, … … 78 77 titleColor: { 79 78 type: 'string', 80 default: ' #333333'79 default: '' 81 80 }, 82 81 textColor: { -
digiblocks/trunk/blocks/call-to-action/styles.php
r3317829 r3346454 29 29 ]; 30 30 $margin = isset( $attrs['margin'] ) ? $attrs['margin'] : digiblocks_get_default_dimensions('px'); 31 $titleColor = isset( $attrs['titleColor'] ) ? $attrs['titleColor'] : ' #333333';31 $titleColor = isset( $attrs['titleColor'] ) ? $attrs['titleColor'] : ''; 32 32 $textColor = isset( $attrs['textColor'] ) ? $attrs['textColor'] : '#666666'; 33 33 $buttonColor = isset( $attrs['buttonColor'] ) ? $attrs['buttonColor'] : '#1e73be'; … … 295 295 296 296 .<?php echo esc_attr( $id ); ?> .digiblocks-cta-title { 297 color: <?php echo esc_attr( $titleColor ); ?>; 297 <?php if ( !empty( $titleColor ) ) : ?> 298 color: <?php echo esc_attr( $titleColor ); ?>; 299 <?php endif; ?> 298 300 margin-top: 0; 299 301 margin-bottom: 20px; -
digiblocks/trunk/blocks/container/edit.js
r3317829 r3346454 149 149 horizontalAlign, 150 150 verticalAlign, 151 columnVerticalAlign, 151 152 heightType, 152 153 minHeight, … … 801 802 }` : ''} 802 803 } 803 804 805 ${Object.keys(verticalAlign).some(device => verticalAlign[device] === 'stretch') ? ` 806 /* Column vertical alignment when container uses stretch */ 807 @media (min-width: 992px) { 808 .${id} > .digiblocks-container-inner .digiblocks-column { 809 ${verticalAlign['desktop'] === 'stretch' ? `justify-content: ${columnVerticalAlign['desktop']};` : ''} 810 } 811 } 812 813 @media (max-width: 991px) { 814 .${id} > .digiblocks-container-inner .digiblocks-column { 815 ${verticalAlign['tablet'] === 'stretch' ? `justify-content: ${columnVerticalAlign['tablet'] || columnVerticalAlign['desktop']};` : ''} 816 } 817 } 818 819 @media (max-width: 767px) { 820 .${id} > .digiblocks-container-inner .digiblocks-column { 821 ${verticalAlign['mobile'] === 'stretch' ? `justify-content: ${columnVerticalAlign['mobile'] || columnVerticalAlign['tablet'] || columnVerticalAlign['desktop']};` : ''} 822 } 823 } 824 ` : ''} 825 804 826 /* Animation keyframes */ 805 827 ${animationCSS} … … 1013 1035 { label: __("Top", "digiblocks"), value: "flex-start" }, 1014 1036 { label: __("Middle", "digiblocks"), value: "center" }, 1015 { label: __("Bottom", "digiblocks"), value: "flex-end" } 1037 { label: __("Bottom", "digiblocks"), value: "flex-end" }, 1038 { label: __("Stretch", "digiblocks"), value: "stretch" } 1016 1039 ]} 1017 1040 /> 1041 1042 {verticalAlign[localActiveDevice] === 'stretch' && ( 1043 <ResponsiveButtonGroup 1044 label={__("Column Vertical Align", "digiblocks")} 1045 value={columnVerticalAlign} 1046 onChange={(value) => setAttributes({ columnVerticalAlign: value })} 1047 options={[ 1048 { label: __("Top", "digiblocks"), value: "flex-start" }, 1049 { label: __("Middle", "digiblocks"), value: "center" }, 1050 { label: __("Bottom", "digiblocks"), value: "flex-end" } 1051 ]} 1052 help={__("Controls the vertical alignment of content within stretched columns.", "digiblocks")} 1053 /> 1054 )} 1018 1055 </TabPanelBody> 1019 1056 -
digiblocks/trunk/blocks/container/index.js
r3317829 r3346454 7 7 import ContainerEdit from './edit'; 8 8 import ContainerSave from './save'; 9 const { getBlockActiveStatus } = wp.digiBlocks;10 9 11 10 /** … … 29 28 keywords: [__('container', 'digiblocks'), __('section', 'digiblocks'), __('row', 'digiblocks'), __('layout', 'digiblocks'), __('columns', 'digiblocks')], 30 29 supports: { 31 inserter: getBlockActiveStatus('container') ? true : false,32 30 html: false, 33 31 className: false, … … 116 114 } 117 115 }, 116 columnVerticalAlign: { 117 type: 'object', 118 default: { 119 desktop: 'flex-start', 120 tablet: 'flex-start', 121 mobile: 'flex-start' 122 } 123 }, 118 124 minHeight: { 119 125 type: 'object', -
digiblocks/trunk/blocks/container/styles.php
r3317829 r3346454 56 56 'mobile' => 'center', 57 57 ]; 58 $columnVerticalAlign = isset( $attrs['columnVerticalAlign'] ) ? $attrs['columnVerticalAlign'] : [ 59 'desktop' => 'flex-start', 60 'tablet' => 'flex-start', 61 'mobile' => 'flex-start', 62 ]; 63 64 $hasStretchVerticalAlign = 65 $verticalAlign['desktop'] === 'stretch' || 66 $verticalAlign['tablet'] === 'stretch' || 67 $verticalAlign['mobile'] === 'stretch'; 58 68 $minHeight = isset( $attrs['minHeight'] ) ? $attrs['minHeight'] : [ 59 69 'desktop' => 0, … … 258 268 } 259 269 270 <?php if ( $hasStretchVerticalAlign ) : ?> 271 272 /* Column vertical alignment when container uses stretch */ 273 <?php if ( $verticalAlign['desktop'] === 'stretch' ) : ?> 274 @media (min-width: 992px) { 275 .<?php echo esc_attr( $id ); ?> > .digiblocks-container-inner .digiblocks-column { 276 justify-content: <?php echo esc_attr( $columnVerticalAlign['desktop'] ); ?>; 277 } 278 } 279 <?php endif; ?> 280 281 <?php if ( $verticalAlign['tablet'] === 'stretch' ) : ?> 282 @media (max-width: 991px) { 283 .<?php echo esc_attr( $id ); ?> > .digiblocks-container-inner .digiblocks-column { 284 justify-content: <?php echo esc_attr( !empty($columnVerticalAlign['tablet']) ? $columnVerticalAlign['tablet'] : $columnVerticalAlign['desktop'] ); ?>; 285 } 286 } 287 <?php endif; ?> 288 289 <?php if ( $verticalAlign['mobile'] === 'stretch' ) : ?> 290 @media (max-width: 767px) { 291 .<?php echo esc_attr( $id ); ?> > .digiblocks-container-inner .digiblocks-column { 292 justify-content: <?php echo esc_attr( !empty($columnVerticalAlign['mobile']) ? $columnVerticalAlign['mobile'] : (!empty($columnVerticalAlign['tablet']) ? $columnVerticalAlign['tablet'] : $columnVerticalAlign['desktop']) ); ?>; 293 } 294 } 295 <?php endif; ?> 296 297 <?php endif; ?> 298 260 299 <?php if (!$isNested) : ?> 261 300 .<?php echo esc_attr( $id ); ?>.alignfull > .digiblocks-container-inner { … … 287 326 288 327 /* Background video */ 289 .<?php echo esc_attr( $id ); ?> >.digiblocks-bg-video-container {328 .<?php echo esc_attr( $id ); ?> .digiblocks-bg-video-container { 290 329 position: absolute; 291 330 top: 0; … … 299 338 } 300 339 301 .<?php echo esc_attr( $id ); ?> >.digiblocks-bg-video {340 .<?php echo esc_attr( $id ); ?> .digiblocks-bg-video { 302 341 position: absolute; 303 top: 50%; 304 left: 50%; 305 min-width: 100%; 306 min-height: 100%; 307 width: auto; 308 height: auto; 309 transform: translateX(-50%) translateY(-50%); 342 width: 100%; 343 height: 100%; 344 -o-object-fit: cover; 310 345 object-fit: cover; 311 346 } -
digiblocks/trunk/blocks/countdown/edit.js
r3317829 r3346454 366 366 .${id} .digiblocks-countdown-item-inner { 367 367 background-color: ${digitBackground || '#f0f0f0'}; 368 color: ${digitColor || '#333333'};368 color: ${digitColor}; 369 369 ${getDimensionCSS(boxPadding, 'padding', activeDevice)} 370 370 ${getDimensionCSS(boxBorderRadius, 'border-radius', activeDevice)} … … 373 373 .${id} .digiblocks-countdown-item:hover .digiblocks-countdown-item-inner { 374 374 background-color: ${digitHoverBackground || digitBackground || '#e0e0e0'}; 375 color: ${digitHoverColor || digitColor || '#333333'};375 color: ${digitHoverColor || digitColor}; 376 376 ${boxShadowHoverCSS} 377 377 } … … 382 382 .${id} .digiblocks-countdown-item-inner { 383 383 background-color: transparent; 384 color: ${digitColor || '#333333'};384 color: ${digitColor}; 385 385 ${getDimensionCSS(boxPadding, 'padding', activeDevice)} 386 386 border-style: solid; … … 393 393 .${id} .digiblocks-countdown-item:hover .digiblocks-countdown-item-inner { 394 394 background-color: ${digitHoverBackground || 'transparent'}; 395 color: ${digitHoverColor || digitColor || '#333333'};395 color: ${digitHoverColor || digitColor}; 396 396 ${boxShadowHoverCSS} 397 397 } … … 402 402 .${id} .digiblocks-countdown-item-inner { 403 403 background-color: ${digitBackground || '#f0f0f0'}; 404 color: ${digitColor || '#333333'};404 color: ${digitColor}; 405 405 border-radius: 50px; 406 406 ${getDimensionCSS(boxPadding, 'padding', activeDevice)} … … 409 409 .${id} .digiblocks-countdown-item:hover .digiblocks-countdown-item-inner { 410 410 background-color: ${digitHoverBackground || digitBackground || '#e0e0e0'}; 411 color: ${digitHoverColor || digitColor || '#333333'};411 color: ${digitHoverColor || digitColor}; 412 412 ${boxShadowHoverCSS} 413 413 } … … 418 418 .${id} .digiblocks-countdown-item-inner { 419 419 background-color: ${digitBackground || '#f0f0f0'}; 420 color: ${digitColor || '#333333'};420 color: ${digitColor}; 421 421 border-radius: 8px; 422 422 ${getDimensionCSS(boxPadding, 'padding', activeDevice)} … … 425 425 .${id} .digiblocks-countdown-item:hover .digiblocks-countdown-item-inner { 426 426 background-color: ${digitHoverBackground || digitBackground || '#e0e0e0'}; 427 color: ${digitHoverColor || digitColor || '#333333'};427 color: ${digitHoverColor || digitColor}; 428 428 ${boxShadowHoverCSS} 429 429 } … … 434 434 .${id} .digiblocks-countdown-item-inner { 435 435 background-color: ${digitBackground || '#f0f0f0'}; 436 color: ${digitColor || '#333333'};436 color: ${digitColor}; 437 437 border-radius: 50%; 438 438 aspect-ratio: 1/1; … … 445 445 .${id} .digiblocks-countdown-item:hover .digiblocks-countdown-item-inner { 446 446 background-color: ${digitHoverBackground || digitBackground || '#e0e0e0'}; 447 color: ${digitHoverColor || digitColor || '#333333'};447 color: ${digitHoverColor || digitColor}; 448 448 ${boxShadowHoverCSS} 449 449 } … … 454 454 specificStyles = ` 455 455 .${id} .digiblocks-countdown-item-inner { 456 color: ${digitColor || '#333333'};456 color: ${digitColor}; 457 457 ${boxShadowCSS} 458 458 } 459 459 .${id} .digiblocks-countdown-item:hover .digiblocks-countdown-item-inner { 460 color: ${digitHoverColor || digitColor || '#333333'};460 color: ${digitHoverColor || digitColor}; 461 461 ${boxShadowHoverCSS} 462 462 } … … 468 468 specificStyles = ` 469 469 .${id} .digiblocks-countdown-item-inner { 470 color: ${digitColor || '#333333'};470 color: ${digitColor}; 471 471 } 472 472 .${id} .digiblocks-countdown-item:hover .digiblocks-countdown-item-inner { 473 color: ${digitHoverColor || digitColor || '#333333'};473 color: ${digitHoverColor || digitColor}; 474 474 } 475 475 `; … … 501 501 separatorStyles = ` 502 502 .${id} .digiblocks-countdown-separator { 503 color: ${separatorColor || '#333333'};503 color: ${separatorColor}; 504 504 font-size: ${titleTypography && titleTypography.fontSize && titleTypography.fontSize[activeDevice] ? titleTypography.fontSize[activeDevice] + (titleTypography.fontSizeUnit || 'px') : '2rem'}; 505 505 } … … 508 508 } 509 509 .${id}:hover .digiblocks-countdown-separator { 510 color: ${separatorHoverColor || separatorColor || '#333333'};510 color: ${separatorHoverColor || separatorColor}; 511 511 } 512 512 `; … … 623 623 .${id} .digiblocks-countdown-expired { 624 624 ${titleTypographyCSS} 625 color: ${digitColor || '#333333'};625 color: ${digitColor}; 626 626 text-align: ${align}; 627 627 } -
digiblocks/trunk/blocks/countdown/index.js
r3317829 r3346454 7 7 import CountdownEdit from './edit'; 8 8 import CountdownSave from './save'; 9 const { getBlockActiveStatus } = wp.digiBlocks; 9 10 10 11 11 /** … … 29 29 keywords: [__('countdown', 'digiblocks'), __('timer', 'digiblocks'), __('clock', 'digiblocks')], 30 30 supports: { 31 inserter: getBlockActiveStatus('countdown') ? true : false,32 31 html: false, 33 32 className: false, … … 94 93 digitColor: { 95 94 type: 'string', 96 default: ' #333333'95 default: '' 97 96 }, 98 97 digitBackground: { … … 118 117 separatorColor: { 119 118 type: 'string', 120 default: ' #333333'119 default: '' 121 120 }, 122 121 separatorHoverColor: { -
digiblocks/trunk/blocks/countdown/styles.php
r3317829 r3346454 27 27 $minutesLabel = isset( $attrs['minutesLabel'] ) ? $attrs['minutesLabel'] : __( 'Minutes', 'digiblocks' ); 28 28 $secondsLabel = isset( $attrs['secondsLabel'] ) ? $attrs['secondsLabel'] : __( 'Seconds', 'digiblocks' ); 29 $digitColor = isset( $attrs['digitColor'] ) ? $attrs['digitColor'] : ' #333333';29 $digitColor = isset( $attrs['digitColor'] ) ? $attrs['digitColor'] : ''; 30 30 $digitBackground = isset( $attrs['digitBackground'] ) ? $attrs['digitBackground'] : '#f0f0f0'; 31 31 $digitHoverColor = isset( $attrs['digitHoverColor'] ) ? $attrs['digitHoverColor'] : ''; … … 33 33 $labelColor = isset( $attrs['labelColor'] ) ? $attrs['labelColor'] : '#666666'; 34 34 $labelHoverColor = isset( $attrs['labelHoverColor'] ) ? $attrs['labelHoverColor'] : ''; 35 $separatorColor = isset( $attrs['separatorColor'] ) ? $attrs['separatorColor'] : ' #333333';35 $separatorColor = isset( $attrs['separatorColor'] ) ? $attrs['separatorColor'] : ''; 36 36 $separatorHoverColor = isset( $attrs['separatorHoverColor'] ) ? $attrs['separatorHoverColor'] : ''; 37 37 $boxStyle = isset( $attrs['boxStyle'] ) ? $attrs['boxStyle'] : 'default'; … … 361 361 <?php endif; ?> 362 362 363 color: <?php echo esc_attr( $digitColor ); ?>; 363 <?php if ( ! empty( $digitColor ) ) : ?> 364 color: <?php echo esc_attr( $digitColor ); ?>; 365 <?php endif; ?> 364 366 text-align: <?php echo esc_attr( $align ); ?>; 365 367 } … … 367 369 <?php if ( $displaySeparator ) : ?> 368 370 .<?php echo esc_attr( $id ); ?> .digiblocks-countdown-separator { 371 <?php if ( ! empty( $separatorColor ) ) : ?> 369 372 color: <?php echo esc_attr( $separatorColor ); ?>; 373 <?php endif; ?> 370 374 font-size: <?php echo esc_attr( $titleTypography['fontSize']['desktop'] . ( $titleTypography['fontSizeUnit'] ?: 'px' ) ); ?>; 371 375 } … … 398 402 .<?php echo esc_attr( $id ); ?> .digiblocks-countdown-item-inner { 399 403 background-color: <?php echo esc_attr( $digitBackground ); ?>; 400 color: <?php echo esc_attr( $digitColor ); ?>; 404 <?php if ( ! empty( $digitColor ) ) : ?> 405 color: <?php echo esc_attr( $digitColor ); ?>; 406 <?php endif; ?> 401 407 <?php echo esc_attr( digiblocks_get_dimensions( $boxBorderRadius, 'border-radius', 'desktop' ) ); ?> 402 408 padding: <?php echo esc_attr( $boxPadding['desktop']['top'] . $boxPadding['desktop']['unit'] . ' ' . $boxPadding['desktop']['right'] . $boxPadding['desktop']['unit'] . ' ' . $boxPadding['desktop']['bottom'] . $boxPadding['desktop']['unit'] . ' ' . $boxPadding['desktop']['left'] . $boxPadding['desktop']['unit'] ); ?>; … … 424 430 .<?php echo esc_attr( $id ); ?> .digiblocks-countdown-item-inner { 425 431 background-color: transparent; 432 <?php if ( ! empty( $digitColor ) ) : ?> 426 433 color: <?php echo esc_attr( $digitColor ); ?>; 434 <?php endif; ?> 427 435 border-style: solid; 428 436 <?php echo esc_attr( digiblocks_get_dimensions( $boxBorderWidth, 'border-width', 'desktop' ) ); ?> … … 453 461 .<?php echo esc_attr( $id ); ?> .digiblocks-countdown-item-inner { 454 462 background-color: <?php echo esc_attr( $digitBackground ); ?>; 463 <?php if ( ! empty( $digitColor ) ) : ?> 455 464 color: <?php echo esc_attr( $digitColor ); ?>; 465 <?php endif; ?> 456 466 border-radius: 50px; 457 467 <?php echo esc_attr( digiblocks_get_dimensions( $boxPadding, 'padding', 'desktop' ) ); ?> … … 479 489 .<?php echo esc_attr( $id ); ?> .digiblocks-countdown-item-inner { 480 490 background-color: <?php echo esc_attr( $digitBackground ); ?>; 491 <?php if ( ! empty( $digitColor ) ) : ?> 481 492 color: <?php echo esc_attr( $digitColor ); ?>; 493 <?php endif; ?> 482 494 border-radius: 8px; 483 495 <?php echo esc_attr( digiblocks_get_dimensions( $boxPadding, 'padding', 'desktop' ) ); ?> … … 505 517 .<?php echo esc_attr( $id ); ?> .digiblocks-countdown-item-inner { 506 518 background-color: <?php echo esc_attr( $digitBackground ); ?>; 519 <?php if ( ! empty( $digitColor ) ) : ?> 507 520 color: <?php echo esc_attr( $digitColor ); ?>; 521 <?php endif; ?> 508 522 border-radius: 50%; 509 523 aspect-ratio: 1/1; … … 535 549 /* Default box style */ 536 550 .<?php echo esc_attr( $id ); ?> .digiblocks-countdown-item-inner { 551 <?php if ( ! empty( $digitColor ) ) : ?> 537 552 color: <?php echo esc_attr( $digitColor ); ?>; 553 <?php endif; ?> 538 554 <?php if ( $showBoxShadow && isset( $boxShadow['enable'] ) && $boxShadow['enable'] ) : ?> 539 555 <?php $inset = isset( $boxShadow['position'] ) && 'inset' === $boxShadow['position'] ? 'inset ' : ''; ?> … … 555 571 <?php else : ?> 556 572 /* Simple style (no boxes) */ 573 <?php if ( ! empty( $digitColor ) ) : ?> 557 574 .<?php echo esc_attr( $id ); ?> .digiblocks-countdown-item-inner { 558 575 color: <?php echo esc_attr( $digitColor ); ?>; 559 576 } 577 <?php endif; ?> 560 578 .<?php echo esc_attr( $id ); ?> .digiblocks-countdown-item:hover .digiblocks-countdown-item-inner { 561 579 <?php if ( $digitHoverColor ) : ?> -
digiblocks/trunk/blocks/counter/edit.js
r3317829 r3346454 38 38 visibility, 39 39 customClasses, 40 displayIcon, 41 iconSource, 42 customSvg, 40 43 iconValue, 41 44 startNumber, … … 88 91 counterSuffix, 89 92 counterSuffixSpacing, 90 numberWithCommas, 91 displayIcon 93 numberWithCommas 92 94 } = attributes; 93 95 … … 590 592 .${id} .digiblocks-counter-prefix { 591 593 margin-right: ${counterPrefixSpacing || 5}px; 592 color: ${counterColor || '#333333'};594 color: ${counterColor}; 593 595 ${typographyCSS} 594 596 transition: color 0.3s ease; … … 597 599 .${id} .digiblocks-counter-suffix { 598 600 margin-left: ${counterSuffixSpacing || 5}px; 599 color: ${counterColor || '#333333'};601 color: ${counterColor}; 600 602 ${typographyCSS} 601 603 transition: color 0.3s ease; … … 603 605 604 606 .${id} .digiblocks-counter-number { 605 color: ${counterColor || '#333333'};607 color: ${counterColor}; 606 608 ${typographyCSS} 607 609 transition: color 0.3s ease; … … 672 674 // Render icon 673 675 const renderIcon = () => { 674 // Make sure we only try to display an icon if the iconValue exists and has a non-empty svg property 675 if (!displayIcon || !iconValue || !iconValue.svg || iconValue.svg.trim() === '') { 676 return null; 676 // For library icons 677 if (iconSource === 'library' && iconValue && iconValue.svg && iconValue.svg.trim() !== '') { 678 return ( 679 <div className="digiblocks-counter-icon"> 680 <span 681 dangerouslySetInnerHTML={{ 682 __html: iconValue.svg, 683 }} 684 /> 685 </div> 686 ); 677 687 } 678 688 679 return ( 680 <div className="digiblocks-counter-icon"> 681 <span 682 dangerouslySetInnerHTML={{ 683 __html: iconValue.svg, 684 }} 685 /> 686 </div> 687 ); 689 // For custom SVG 690 if (iconSource === 'custom' && customSvg && customSvg.trim() !== '') { 691 return ( 692 <div className="digiblocks-counter-icon"> 693 <span 694 dangerouslySetInnerHTML={{ 695 __html: customSvg, 696 }} 697 /> 698 </div> 699 ); 700 } 701 702 return null; 688 703 }; 689 704 … … 847 862 {displayIcon && ( 848 863 <div style={{ marginBottom: '2rem' }}> 849 {!componentsLoaded ? ( 850 <div style={{ textAlign: 'center', padding: '20px 0' }}> 851 <div className="components-spinner"></div> 852 <p>{__('Loading icon selector...', 'digiblocks')}</p> 864 <ToggleGroupControl 865 label={__("Icon Source", "digiblocks")} 866 value={iconSource || 'library'} 867 onChange={(value) => setAttributes({ iconSource: value })} 868 isBlock 869 __next40pxDefaultSize={true} 870 __nextHasNoMarginBottom={true} 871 > 872 <ToggleGroupControlOption 873 value="library" 874 label={__("Library", "digiblocks")} 875 /> 876 <ToggleGroupControlOption 877 value="custom" 878 label={__("Custom", "digiblocks")} 879 /> 880 </ToggleGroupControl> 881 882 {/* Show library picker if 'library' is selected */} 883 {iconSource === 'library' && ( 884 <> 885 {!componentsLoaded ? ( 886 <div style={{ textAlign: 'center', padding: '20px 0' }}> 887 <div className="components-spinner"></div> 888 <p>{__('Loading icon selector...', 'digiblocks')}</p> 889 </div> 890 ) : ( 891 <FontAwesomeControl 892 label={__('Select Icon', 'digiblocks')} 893 value={iconValue} 894 onChange={setIconValue} 895 /> 896 )} 897 898 {iconValue && componentsLoaded && ( 899 <> 900 {/* Show info about selected icon */} 901 <div style={{ marginTop: '15px', marginBottom: '15px', padding: '10px', background: '#f0f0f1', borderRadius: '3px' }}> 902 <p style={{ margin: '0 0 5px 0' }}> 903 <strong>{__('Selected Icon:', 'digiblocks')}</strong> {iconValue.name} 904 </p> 905 <p style={{ margin: '0 0 5px 0' }}> 906 <strong>{__('Style:', 'digiblocks')}</strong> {iconValue.style} 907 </p> 908 {iconValue.categories && iconValue.categories.length > 0 && ( 909 <p style={{ margin: '0' }}> 910 <strong>{__('Categories:', 'digiblocks')}</strong> {iconValue.categories.join(', ')} 911 </p> 912 )} 913 </div> 914 </> 915 )} 916 </> 917 )} 918 919 {/* Show custom SVG textarea if 'custom' is selected */} 920 {iconSource === 'custom' && ( 921 <div style={{ marginTop: '15px' }}> 922 <div className="components-base-control"> 923 <label className="components-base-control__label" htmlFor="custom-svg-input"> 924 {__('Custom SVG Code', 'digiblocks')} 925 </label> 926 <textarea 927 id="custom-svg-input" 928 className="components-textarea-control__input" 929 value={customSvg || ''} 930 onChange={(e) => { 931 const newSvg = e.target.value; 932 933 // Create an iconValue object with the custom SVG 934 const newIconValue = { 935 id: 'custom-svg', 936 name: 'Custom SVG', 937 svg: newSvg, 938 style: 'custom', 939 categories: ['custom'] 940 }; 941 942 // Update both the customSvg attribute and the iconValue 943 setAttributes({ 944 customSvg: newSvg, 945 iconValue: newIconValue 946 }); 947 }} 948 placeholder={__('Paste your SVG code here...', 'digiblocks')} 949 rows={10} 950 style={{ width: '100%', marginTop: '8px' }} 951 /> 952 <p className="components-base-control__help"> 953 {__('Paste your SVG code here. Make sure it only contains valid SVG markup. For security reasons, scripts and external references will be removed.', 'digiblocks')} 954 </p> 955 </div> 956 957 {/* Preview of custom SVG */} 958 {customSvg && ( 959 <div style={{ marginTop: '15px', marginBottom: '15px' }}> 960 <p><strong>{__('Preview:', 'digiblocks')}</strong></p> 961 <div style={{ padding: '20px', background: '#f0f0f1', borderRadius: '3px', display: 'flex', justifyContent: 'center', alignItems: 'center' }}> 962 <div className="digiblocks-custom-svg-preview" style={{ width: '50px', height: '50px' }} dangerouslySetInnerHTML={{ __html: customSvg }}></div> 963 </div> 964 </div> 965 )} 853 966 </div> 854 ) : (855 <FontAwesomeControl856 label={__('Select Icon', 'digiblocks')}857 value={iconValue}858 onChange={setIconValue}859 />860 )}861 862 {iconValue && componentsLoaded && (863 <>864 {/* Show info about selected icon */}865 <div style={{ marginTop: '15px', marginBottom: '15px', padding: '10px', background: '#f0f0f1', borderRadius: '3px' }}>866 <p style={{ margin: '0 0 5px 0' }}>867 <strong>{__('Selected Icon:', 'digiblocks')}</strong> {iconValue.name}868 </p>869 <p style={{ margin: '0 0 5px 0' }}>870 <strong>{__('Style:', 'digiblocks')}</strong> {iconValue.style}871 </p>872 {iconValue.categories && iconValue.categories.length > 0 && (873 <p style={{ margin: '0' }}>874 <strong>{__('Categories:', 'digiblocks')}</strong> {iconValue.categories.join(', ')}875 </p>876 )}877 </div>878 </>879 967 )} 880 968 </div> -
digiblocks/trunk/blocks/counter/index.js
r3317829 r3346454 7 7 import CounterEdit from './edit'; 8 8 import CounterSave from './save'; 9 const { getBlockActiveStatus } = wp.digiBlocks; 9 10 10 11 11 /** … … 29 29 keywords: [__('counter', 'digiblocks'), __('number', 'digiblocks'), __('stats', 'digiblocks'), __('count up', 'digiblocks')], 30 30 supports: { 31 inserter: getBlockActiveStatus('counter') ? true : false,32 31 html: false, 33 32 className: false, … … 56 55 default: '' 57 56 }, 57 displayIcon: { 58 type: 'boolean', 59 default: false 60 }, 61 iconSource: { 62 type: 'string', 63 default: 'library' 64 }, 65 customSvg: { 66 type: 'string', 67 default: '' 68 }, 58 69 iconValue: { 59 70 type: 'object', … … 94 105 counterColor: { 95 106 type: 'string', 96 default: ' #333333'107 default: '' 97 108 }, 98 109 counterHoverColor: { … … 102 113 titleColor: { 103 114 type: 'string', 104 default: ' #333333'115 default: '' 105 116 }, 106 117 titleHoverColor: { … … 244 255 default: { 245 256 desktop: { 246 top: 30,247 right: 30,248 bottom: 30,249 left: 30,257 top: "", 258 right: "", 259 bottom: "", 260 left: "", 250 261 unit: 'px' 251 262 }, 252 263 tablet: { 253 top: 25,254 right: 25,255 bottom: 25,256 left: 25,264 top: "", 265 right: "", 266 bottom: "", 267 left: "", 257 268 unit: 'px' 258 269 }, 259 270 mobile: { 260 top: 20,261 right: 20,262 bottom: 20,263 left: 20,271 top: "", 272 right: "", 273 bottom: "", 274 left: "", 264 275 unit: 'px' 265 276 } … … 270 281 default: { 271 282 desktop: { 272 top: 0,273 right: 0,274 bottom: 30,275 left: 0,283 top: "", 284 right: "", 285 bottom: "", 286 left: "", 276 287 unit: 'px' 277 288 }, 278 289 tablet: { 279 top: 0,280 right: 0,281 bottom: 25,282 left: 0,290 top: "", 291 right: "", 292 bottom: "", 293 left: "", 283 294 unit: 'px' 284 295 }, 285 296 mobile: { 286 top: 0,287 right: 0,288 bottom: 20,289 left: 0,297 top: "", 298 right: "", 299 bottom: "", 300 left: "", 290 301 unit: 'px' 291 302 } … … 415 426 type: 'number', 416 427 default: 15 417 },418 displayIcon: {419 type: 'boolean',420 default: false421 428 }, 422 429 numberWithCommas: { -
digiblocks/trunk/blocks/counter/save.js
r3317829 r3346454 12 12 anchor, 13 13 customClasses, 14 iconSource, 15 customSvg, 14 16 iconValue, 15 17 startNumber, … … 34 36 const blockClasses = [ 35 37 "digiblocks-counter", 36 id,38 id, 37 39 `align-${align || 'center'}`, 38 40 `layout-${layoutStyle || 'stacked'}`, … … 58 60 // Render icon if provided 59 61 const renderIcon = () => { 60 // Make sure we only try to display an icon if the iconValue exists and has a non-empty svg property 61 if (!displayIcon || !iconValue || !iconValue.svg || iconValue.svg.trim() === '') { 62 return null; 62 // For library icons 63 if (iconSource === 'library' && iconValue && iconValue.svg && iconValue.svg.trim() !== '') { 64 return ( 65 <div className="digiblocks-counter-icon"> 66 <span dangerouslySetInnerHTML={{ __html: iconValue.svg }} /> 67 </div> 68 ); 63 69 } 64 70 65 return ( 66 <div className="digiblocks-counter-icon"> 67 <span dangerouslySetInnerHTML={{ __html: iconValue.svg }} /> 68 </div> 69 ); 71 // For custom SVG 72 if (iconSource === 'custom' && customSvg && customSvg.trim() !== '') { 73 return ( 74 <div className="digiblocks-counter-icon"> 75 <span dangerouslySetInnerHTML={{ __html: customSvg }} /> 76 </div> 77 ); 78 } 79 80 return null; 70 81 }; 71 82 -
digiblocks/trunk/blocks/counter/styles.php
r3317829 r3346454 27 27 $title = isset( $attrs['title'] ) ? $attrs['title'] : ''; 28 28 $description = isset( $attrs['description'] ) ? $attrs['description'] : ''; 29 $counterColor = isset( $attrs['counterColor'] ) ? $attrs['counterColor'] : ' #333333';29 $counterColor = isset( $attrs['counterColor'] ) ? $attrs['counterColor'] : ''; 30 30 $counterHoverColor = isset( $attrs['counterHoverColor'] ) ? $attrs['counterHoverColor'] : ''; 31 $titleColor = isset( $attrs['titleColor'] ) ? $attrs['titleColor'] : ' #333333';31 $titleColor = isset( $attrs['titleColor'] ) ? $attrs['titleColor'] : ''; 32 32 $titleHoverColor = isset( $attrs['titleHoverColor'] ) ? $attrs['titleHoverColor'] : ''; 33 33 $textColor = isset( $attrs['textColor'] ) ? $attrs['textColor'] : '#666666'; … … 58 58 59 59 // Get padding and margin (with fallback) 60 $padding = isset( $attrs['padding'] ) ? $attrs['padding'] : array( 61 'desktop' => array( 62 'top' => 30, 63 'right' => 30, 64 'bottom' => 30, 65 'left' => 30, 66 'unit' => 'px', 67 ), 68 'tablet' => array( 69 'top' => 25, 70 'right' => 25, 71 'bottom' => 25, 72 'left' => 25, 73 'unit' => 'px', 74 ), 75 'mobile' => array( 76 'top' => 20, 77 'right' => 20, 78 'bottom' => 20, 79 'left' => 20, 80 'unit' => 'px', 81 ), 82 ); 83 84 $margin = isset( $attrs['margin'] ) ? $attrs['margin'] : array( 85 'desktop' => array( 86 'top' => 0, 87 'right' => 0, 88 'bottom' => 30, 89 'left' => 0, 90 'unit' => 'px', 91 ), 92 'tablet' => array( 93 'top' => 0, 94 'right' => 0, 95 'bottom' => 25, 96 'left' => 0, 97 'unit' => 'px', 98 ), 99 'mobile' => array( 100 'top' => 0, 101 'right' => 0, 102 'bottom' => 20, 103 'left' => 0, 104 'unit' => 'px', 105 ), 106 ); 60 $padding = isset( $attrs['padding'] ) ? $attrs['padding'] : digiblocks_get_default_dimensions('px'); 61 62 $margin = isset( $attrs['margin'] ) ? $attrs['margin'] : digiblocks_get_default_dimensions('px'); 107 63 108 64 // Get iconSize (with fallback) … … 411 367 .<?php echo esc_attr( $id ); ?> .digiblocks-counter-prefix { 412 368 margin-right: <?php echo esc_attr( $counterPrefixSpacing ); ?>px; 369 <?php if ( ! empty( $counterColor ) ) : ?> 413 370 color: <?php echo esc_attr( $counterColor ); ?>; 371 <?php endif; ?> 414 372 <?php if ( ! empty( $typography['fontFamily'] ) ) : ?> 415 373 font-family: <?php echo esc_attr( $typography['fontFamily'] ); ?>; … … 449 407 .<?php echo esc_attr( $id ); ?> .digiblocks-counter-suffix { 450 408 margin-left: <?php echo esc_attr( $counterSuffixSpacing ); ?>px; 409 <?php if ( ! empty( $counterColor ) ) : ?> 451 410 color: <?php echo esc_attr( $counterColor ); ?>; 411 <?php endif; ?> 452 412 <?php if ( ! empty( $typography['fontFamily'] ) ) : ?> 453 413 font-family: <?php echo esc_attr( $typography['fontFamily'] ); ?>; … … 486 446 487 447 .<?php echo esc_attr( $id ); ?> .digiblocks-counter-number { 448 <?php if ( ! empty( $counterColor ) ) : ?> 488 449 color: <?php echo esc_attr( $counterColor ); ?>; 450 <?php endif; ?> 489 451 <?php if ( ! empty( $typography['fontFamily'] ) ) : ?> 490 452 font-family: <?php echo esc_attr( $typography['fontFamily'] ); ?>; … … 533 495 /* Title styles */ 534 496 .<?php echo esc_attr( $id ); ?> .digiblocks-counter-title { 497 <?php if ( ! empty( $titleColor ) ) : ?> 535 498 color: <?php echo esc_attr( $titleColor ); ?>; 499 <?php endif; ?> 536 500 margin-bottom: 10px; 537 501 … … 667 631 <?php endif; ?> 668 632 669 <?php if ( isset( $typography['fontSize']['tablet'] ) || isset( $typography['lineHeight']['tablet'] ) || isset( $typography['letterSpacing']['tablet'] ) ) : ?>633 <?php if ( ! empty( $typography['fontSize']['tablet'] ) || ! empty( $typography['lineHeight']['tablet'] ) || ! empty( $typography['letterSpacing']['tablet'] ) ) : ?> 670 634 .<?php echo esc_attr( $id ); ?> .digiblocks-counter-number, 671 635 .<?php echo esc_attr( $id ); ?> .digiblocks-counter-prefix, 672 636 .<?php echo esc_attr( $id ); ?> .digiblocks-counter-suffix { 673 <?php if ( isset( $typography['fontSize']['tablet'] ) ) : ?>637 <?php if ( ! empty( $typography['fontSize']['tablet'] ) ) : ?> 674 638 font-size: <?php echo esc_attr( $typography['fontSize']['tablet'] . ( $typography['fontSizeUnit'] ?: 'px' ) ); ?>; 675 639 <?php endif; ?> 676 <?php if ( isset( $typography['lineHeight']['tablet'] ) ) : ?>640 <?php if ( ! empty( $typography['lineHeight']['tablet'] ) ) : ?> 677 641 line-height: <?php echo esc_attr( $typography['lineHeight']['tablet'] . ( $typography['lineHeightUnit'] ?: 'em' ) ); ?>; 678 642 <?php endif; ?> 679 <?php if ( isset( $typography['letterSpacing']['tablet'] ) ) : ?>643 <?php if ( ! empty( $typography['letterSpacing']['tablet'] ) ) : ?> 680 644 letter-spacing: <?php echo esc_attr( $typography['letterSpacing']['tablet'] . ( $typography['letterSpacingUnit'] ?: 'px' ) ); ?>; 681 645 <?php endif; ?> … … 683 647 <?php endif; ?> 684 648 685 <?php if ( isset( $titleTypography['fontSize']['tablet'] ) || isset( $titleTypography['lineHeight']['tablet'] ) || isset( $titleTypography['letterSpacing']['tablet'] ) ) : ?>649 <?php if ( ! empty( $titleTypography['fontSize']['tablet'] ) || ! empty( $titleTypography['lineHeight']['tablet'] ) || ! empty( $titleTypography['letterSpacing']['tablet'] ) ) : ?> 686 650 .<?php echo esc_attr( $id ); ?> .digiblocks-counter-title { 687 <?php if ( isset( $titleTypography['fontSize']['tablet'] ) ) : ?>651 <?php if ( ! empty( $titleTypography['fontSize']['tablet'] ) ) : ?> 688 652 font-size: <?php echo esc_attr( $titleTypography['fontSize']['tablet'] . ( $titleTypography['fontSizeUnit'] ?: 'px' ) ); ?>; 689 653 <?php endif; ?> 690 <?php if ( isset( $titleTypography['lineHeight']['tablet'] ) ) : ?>654 <?php if ( ! empty( $titleTypography['lineHeight']['tablet'] ) ) : ?> 691 655 line-height: <?php echo esc_attr( $titleTypography['lineHeight']['tablet'] . ( $titleTypography['lineHeightUnit'] ?: 'em' ) ); ?>; 692 656 <?php endif; ?> 693 <?php if ( isset( $titleTypography['letterSpacing']['tablet'] ) ) : ?>657 <?php if ( ! empty( $titleTypography['letterSpacing']['tablet'] ) ) : ?> 694 658 letter-spacing: <?php echo esc_attr( $titleTypography['letterSpacing']['tablet'] . ( $titleTypography['letterSpacingUnit'] ?: 'px' ) ); ?>; 695 659 <?php endif; ?> … … 697 661 <?php endif; ?> 698 662 699 <?php if ( isset( $contentTypography['fontSize']['tablet'] ) || isset( $contentTypography['lineHeight']['tablet'] ) || isset( $contentTypography['letterSpacing']['tablet'] ) ) : ?>663 <?php if ( ! empty( $contentTypography['fontSize']['tablet'] ) || ! empty( $contentTypography['lineHeight']['tablet'] ) || ! empty( $contentTypography['letterSpacing']['tablet'] ) ) : ?> 700 664 .<?php echo esc_attr( $id ); ?> .digiblocks-counter-description { 701 <?php if ( isset( $contentTypography['fontSize']['tablet'] ) ) : ?>665 <?php if ( ! empty( $contentTypography['fontSize']['tablet'] ) ) : ?> 702 666 font-size: <?php echo esc_attr( $contentTypography['fontSize']['tablet'] . ( $contentTypography['fontSizeUnit'] ?: 'px' ) ); ?>; 703 667 <?php endif; ?> 704 <?php if ( isset( $contentTypography['lineHeight']['tablet'] ) ) : ?>668 <?php if ( ! empty( $contentTypography['lineHeight']['tablet'] ) ) : ?> 705 669 line-height: <?php echo esc_attr( $contentTypography['lineHeight']['tablet'] . ( $contentTypography['lineHeightUnit'] ?: 'em' ) ); ?>; 706 670 <?php endif; ?> 707 <?php if ( isset( $contentTypography['letterSpacing']['tablet'] ) ) : ?>671 <?php if ( ! empty( $contentTypography['letterSpacing']['tablet'] ) ) : ?> 708 672 letter-spacing: <?php echo esc_attr( $contentTypography['letterSpacing']['tablet'] . ( $contentTypography['letterSpacingUnit'] ?: 'px' ) ); ?>; 709 673 <?php endif; ?> … … 755 719 <?php endif; ?> 756 720 757 <?php if ( isset( $typography['fontSize']['mobile'] ) || isset( $typography['lineHeight']['mobile'] ) || isset( $typography['letterSpacing']['mobile'] ) ) : ?>721 <?php if ( ! empty( $typography['fontSize']['mobile'] ) || ! empty( $typography['lineHeight']['mobile'] ) || ! empty( $typography['letterSpacing']['mobile'] ) ) : ?> 758 722 .<?php echo esc_attr( $id ); ?> .digiblocks-counter-number, 759 723 .<?php echo esc_attr( $id ); ?> .digiblocks-counter-prefix, 760 724 .<?php echo esc_attr( $id ); ?> .digiblocks-counter-suffix { 761 <?php if ( isset( $typography['fontSize']['mobile'] ) ) : ?>725 <?php if ( ! empty( $typography['fontSize']['mobile'] ) ) : ?> 762 726 font-size: <?php echo esc_attr( $typography['fontSize']['mobile'] . ( $typography['fontSizeUnit'] ?: 'px' ) ); ?>; 763 727 <?php endif; ?> 764 <?php if ( isset( $typography['lineHeight']['mobile'] ) ) : ?>728 <?php if ( ! empty( $typography['lineHeight']['mobile'] ) ) : ?> 765 729 line-height: <?php echo esc_attr( $typography['lineHeight']['mobile'] . ( $typography['lineHeightUnit'] ?: 'em' ) ); ?>; 766 730 <?php endif; ?> 767 <?php if ( isset( $typography['letterSpacing']['mobile'] ) ) : ?>731 <?php if ( ! empty( $typography['letterSpacing']['mobile'] ) ) : ?> 768 732 letter-spacing: <?php echo esc_attr( $typography['letterSpacing']['mobile'] . ( $typography['letterSpacingUnit'] ?: 'px' ) ); ?>; 769 733 <?php endif; ?> … … 771 735 <?php endif; ?> 772 736 773 <?php if ( isset( $titleTypography['fontSize']['mobile'] ) || isset( $titleTypography['lineHeight']['mobile'] ) || isset( $titleTypography['letterSpacing']['mobile'] ) ) : ?>737 <?php if ( ! empty( $titleTypography['fontSize']['mobile'] ) || ! empty( $titleTypography['lineHeight']['mobile'] ) || ! empty( $titleTypography['letterSpacing']['mobile'] ) ) : ?> 774 738 .<?php echo esc_attr( $id ); ?> .digiblocks-counter-title { 775 <?php if ( isset( $titleTypography['fontSize']['mobile'] ) ) : ?>739 <?php if ( ! empty( $titleTypography['fontSize']['mobile'] ) ) : ?> 776 740 font-size: <?php echo esc_attr( $titleTypography['fontSize']['mobile'] . ( $titleTypography['fontSizeUnit'] ?: 'px' ) ); ?>; 777 741 <?php endif; ?> 778 <?php if ( isset( $titleTypography['lineHeight']['mobile'] ) ) : ?>742 <?php if ( ! empty( $titleTypography['lineHeight']['mobile'] ) ) : ?> 779 743 line-height: <?php echo esc_attr( $titleTypography['lineHeight']['mobile'] . ( $titleTypography['lineHeightUnit'] ?: 'em' ) ); ?>; 780 744 <?php endif; ?> 781 <?php if ( isset( $titleTypography['letterSpacing']['mobile'] ) ) : ?>745 <?php if ( ! empty( $titleTypography['letterSpacing']['mobile'] ) ) : ?> 782 746 letter-spacing: <?php echo esc_attr( $titleTypography['letterSpacing']['mobile'] . ( $titleTypography['letterSpacingUnit'] ?: 'px' ) ); ?>; 783 747 <?php endif; ?> … … 785 749 <?php endif; ?> 786 750 787 <?php if ( isset( $contentTypography['fontSize']['mobile'] ) || isset( $contentTypography['lineHeight']['mobile'] ) || isset( $contentTypography['letterSpacing']['mobile'] ) ) : ?>751 <?php if ( ! empty( $contentTypography['fontSize']['mobile'] ) || ! empty( $contentTypography['lineHeight']['mobile'] ) || ! empty( $contentTypography['letterSpacing']['mobile'] ) ) : ?> 788 752 .<?php echo esc_attr( $id ); ?> .digiblocks-counter-description { 789 <?php if ( isset( $contentTypography['fontSize']['mobile'] ) ) : ?>753 <?php if ( ! empty( $contentTypography['fontSize']['mobile'] ) ) : ?> 790 754 font-size: <?php echo esc_attr( $contentTypography['fontSize']['mobile'] . ( $contentTypography['fontSizeUnit'] ?: 'px' ) ); ?>; 791 755 <?php endif; ?> 792 <?php if ( isset( $contentTypography['lineHeight']['mobile'] ) ) : ?>756 <?php if ( ! empty( $contentTypography['lineHeight']['mobile'] ) ) : ?> 793 757 line-height: <?php echo esc_attr( $contentTypography['lineHeight']['mobile'] . ( $contentTypography['lineHeightUnit'] ?: 'em' ) ); ?>; 794 758 <?php endif; ?> 795 <?php if ( isset( $contentTypography['letterSpacing']['mobile'] ) ) : ?>759 <?php if ( ! empty( $contentTypography['letterSpacing']['mobile'] ) ) : ?> 796 760 letter-spacing: <?php echo esc_attr( $contentTypography['letterSpacing']['mobile'] . ( $contentTypography['letterSpacingUnit'] ?: 'px' ) ); ?>; 797 761 <?php endif; ?> -
digiblocks/trunk/blocks/faq/index.js
r3317829 r3346454 7 7 import FAQEdit from './edit'; 8 8 import FAQSave from './save'; 9 const { getBlockActiveStatus } = wp.digiBlocks; 9 10 10 11 11 /** … … 30 30 // Disable all default controls and settings panels 31 31 supports: { 32 inserter: getBlockActiveStatus('faq') ? true : false,33 32 html: false, 34 33 className: false, … … 76 75 titleColor: { 77 76 type: 'string', 78 default: ' #333333'77 default: '' 79 78 }, 80 79 titleHoverColor: { … … 212 211 iconColor: { 213 212 type: 'string', 214 default: ' #333333'213 default: '' 215 214 }, 216 215 iconHoverColor: { … … 300 299 ], 301 300 layout: 'boxed', 302 titleColor: ' #333333',301 titleColor: '', 303 302 titleActiveColor: '#1e73be', 304 303 backgroundColor: '#ffffff' -
digiblocks/trunk/blocks/faq/styles.php
r3317829 r3346454 19 19 ]; 20 20 $items = isset( $attrs['items'] ) ? $attrs['items'] : array(); 21 $titleColor = isset( $attrs['titleColor'] ) ? $attrs['titleColor'] : ' #333333';21 $titleColor = isset( $attrs['titleColor'] ) ? $attrs['titleColor'] : ''; 22 22 $titleHoverColor = isset( $attrs['titleHoverColor'] ) ? $attrs['titleHoverColor'] : ''; 23 23 $titleActiveColor = isset( $attrs['titleActiveColor'] ) ? $attrs['titleActiveColor'] : '#1e73be'; … … 29 29 $borderColor = isset( $attrs['borderColor'] ) ? $attrs['borderColor'] : '#e0e0e0'; 30 30 $borderHoverColor = isset( $attrs['borderHoverColor'] ) ? $attrs['borderHoverColor'] : ''; 31 $iconColor = isset( $attrs['iconColor'] ) ? $attrs['iconColor'] : ' #333333';31 $iconColor = isset( $attrs['iconColor'] ) ? $attrs['iconColor'] : ''; 32 32 $iconHoverColor = isset( $attrs['iconHoverColor'] ) ? $attrs['iconHoverColor'] : ''; 33 33 $iconActiveColor = isset( $attrs['iconActiveColor'] ) ? $attrs['iconActiveColor'] : '#1e73be'; … … 163 163 .<?php echo esc_attr( $id ); ?> .digiblocks-faq-question-text, 164 164 .<?php echo esc_attr( $id ); ?> .digiblocks-faq-question-text-content { 165 <?php if ( ! empty( $titleColor ) ) : ?> 165 166 color: <?php echo esc_attr( $titleColor ); ?>; 167 <?php endif; ?> 166 168 <?php if ( ! empty( $titleTypography['fontFamily'] ) ) : ?> 167 169 font-family: <?php echo esc_attr( $titleTypography['fontFamily'] ); ?>; … … 268 270 align-items: center; 269 271 justify-content: center; 272 <?php if ( ! empty( $iconColor ) ) : ?> 270 273 color: <?php echo esc_attr( $iconColor ); ?>; 274 <?php endif; ?> 271 275 transition: all 0.3s ease; 272 276 font-size: <?php echo esc_attr( $iconSize['desktop'] ); ?>px; -
digiblocks/trunk/blocks/forms/index.js
r3317829 r3346454 7 7 import FormsEdit from './edit'; 8 8 import FormsSave from './save'; 9 const { getBlockActiveStatus } = wp.digiBlocks; 9 10 10 11 11 /** … … 29 29 keywords: [__('form', 'digiblocks'), __('contact', 'digiblocks'), __('input', 'digiblocks'), __('email', 'digiblocks'), __('field', 'digiblocks')], 30 30 supports: { 31 inserter: getBlockActiveStatus('forms') ? true : false,32 31 html: false, 33 32 className: false, … … 116 115 textColor: { 117 116 type: 'string', 118 default: ' #333333'117 default: '' 119 118 }, 120 119 labelColor: { 121 120 type: 'string', 122 default: ' #333333'121 default: '' 123 122 }, 124 123 buttonBackgroundColor: { … … 252 251 inputTextColor: { 253 252 type: 'string', 254 default: ' #333333'253 default: '' 255 254 }, 256 255 inputFocusBorderColor: { -
digiblocks/trunk/blocks/forms/styles.php
r3317829 r3346454 19 19 ]; 20 20 $backgroundColor = isset( $attrs['backgroundColor'] ) ? $attrs['backgroundColor'] : '#ffffff'; 21 $textColor = isset( $attrs['textColor'] ) ? $attrs['textColor'] : ' #333333';22 $labelColor = isset( $attrs['labelColor'] ) ? $attrs['labelColor'] : ' #333333';21 $textColor = isset( $attrs['textColor'] ) ? $attrs['textColor'] : ''; 22 $labelColor = isset( $attrs['labelColor'] ) ? $attrs['labelColor'] : ''; 23 23 $buttonBackgroundColor = isset( $attrs['buttonBackgroundColor'] ) ? $attrs['buttonBackgroundColor'] : '#4a6cf7'; 24 24 $buttonTextColor = isset( $attrs['buttonTextColor'] ) ? $attrs['buttonTextColor'] : '#ffffff'; … … 33 33 $inputBorderWidth = isset( $attrs['inputBorderWidth'] ) ? $attrs['inputBorderWidth'] : 1; 34 34 $inputBackgroundColor = isset( $attrs['inputBackgroundColor'] ) ? $attrs['inputBackgroundColor'] : '#ffffff'; 35 $inputTextColor = isset( $attrs['inputTextColor'] ) ? $attrs['inputTextColor'] : ' #333333';35 $inputTextColor = isset( $attrs['inputTextColor'] ) ? $attrs['inputTextColor'] : ''; 36 36 $inputFocusBorderColor = isset( $attrs['inputFocusBorderColor'] ) ? $attrs['inputFocusBorderColor'] : '#4a6cf7'; 37 37 … … 238 238 .<?php echo esc_attr( $id ); ?> { 239 239 background-color: <?php echo esc_attr( $backgroundColor ); ?>; 240 <?php if ( !empty($textColor) ) : ?> 240 241 color: <?php echo esc_attr( $textColor ); ?>; 242 <?php endif; ?> 241 243 <?php if ( 'none' !== $borderStyle ) : ?> 242 244 border-style: <?php echo esc_attr( $borderStyle ); ?>; … … 310 312 display: block; 311 313 margin-bottom: <?php echo esc_attr( $labelMargin['desktop'] ); ?>px; 314 <?php if ( !empty($labelColor) ) : ?> 312 315 color: <?php echo esc_attr( $labelColor ); ?>; 316 <?php endif; ?> 313 317 <?php if ( !empty($textTypography['fontFamily']) ) : ?> 314 318 font-family: <?php echo esc_attr( $textTypography['fontFamily'] ); ?>; … … 356 360 <?php endif; ?> 357 361 background-color: <?php echo esc_attr( $inputBackgroundColor ); ?>; 362 <?php if ( !empty($inputTextColor) ) : ?> 358 363 color: <?php echo esc_attr( $inputTextColor ); ?>; 364 <?php endif; ?> 359 365 transition: all 0.3s ease; 360 366 <?php if ( !empty($typography['fontFamily']) ) : ?> -
digiblocks/trunk/blocks/google-map/index.js
r3317829 r3346454 7 7 import GoogleMapEdit from './edit'; 8 8 import GoogleMapSave from './save'; 9 const { getBlockActiveStatus } = wp.digiBlocks; 9 10 10 11 11 /** … … 29 29 keywords: [__('map', 'digiblocks'), __('google', 'digiblocks'), __('location', 'digiblocks'), __('marker', 'digiblocks')], 30 30 supports: { 31 inserter: getBlockActiveStatus('google-map') ? true : false,32 31 html: false, 33 32 className: false, -
digiblocks/trunk/blocks/google-map/script.php
r3317829 r3346454 42 42 43 43 // Function to initialize Google Maps 44 async function initDigiGoogleMaps() { 45 console.log("DigiBlocks - Initializing Google Maps"); 46 44 async function initDigiGoogleMaps() { 47 45 // Find all map blocks 48 46 const mapBlocks = document.querySelectorAll('.digiblocks-google-map'); 49 50 console.log("DigiBlocks Map Count:", mapBlocks.length);51 47 52 48 if (!mapBlocks.length) return; … … 57 53 // Initialize each map 58 54 mapBlocks.forEach(async function(mapBlock) { 59 console.log("Processing map:", mapBlock.className);60 61 55 const mapContainer = mapBlock.querySelector('.digiblocks-google-map-container'); 62 56 const markersContainer = mapBlock.querySelector('.digiblocks-google-map-markers'); … … 74 68 const enableStreetView = mapBlock.getAttribute('data-enable-streetview') !== 'false'; 75 69 const enableMapType = mapBlock.getAttribute('data-enable-maptype') !== 'false'; 76 77 console.log("Map ID from data attribute:", mapId);78 console.log("Markers container exists:", !!markersContainer);79 70 80 71 // Get map style options from data attributes … … 104 95 markerElements = markersContainer.querySelectorAll('.digiblocks-google-map-marker'); 105 96 hasMarkers = markerElements.length > 0; 106 console.log("Marker count:", markerElements.length);107 97 } 108 98 … … 110 100 if (mapId) { 111 101 mapOptions.mapId = mapId; 112 console.log("Applied Map ID:", mapId);113 102 } 114 103 … … 261 250 // Process markers if we have any 262 251 if (hasMarkers) { 263 console.log("Processing markers - Map ID:", mapId);264 265 252 // Array to collect all markers 266 253 const markers = []; … … 279 266 const title = markerElement.getAttribute('data-title') || ''; 280 267 const description = markerElement.getAttribute('data-description') || ''; 281 282 console.log("Processing marker with lat/lng:", lat, lng);283 268 284 269 if (!isNaN(lat) && !isNaN(lng)) { … … 348 333 } else { 349 334 // No Map ID, use basic markers 350 console.log("No Map ID available, using basic markers");351 335 createBasicMarkers(); 352 336 } -
digiblocks/trunk/blocks/heading/edit.js
r3317829 r3346454 1158 1158 onChange={(value) => setAttributes({ typography: value })} 1159 1159 defaults={{ 1160 fontSize: { desktop: 32, tablet: 28, mobile: 24},1160 fontSize: { desktop: '', tablet: '', mobile: '' }, 1161 1161 fontSizeUnit: 'px', 1162 lineHeight: { desktop: 1.2, tablet: 1.2, mobile: 1.2},1162 lineHeight: { desktop: '', tablet: '', mobile: '' }, 1163 1163 lineHeightUnit: 'em', 1164 1164 }} -
digiblocks/trunk/blocks/heading/index.js
r3317829 r3346454 7 7 import HeadingEdit from './edit'; 8 8 import HeadingSave from './save'; 9 const { getBlockActiveStatus } = wp.digiBlocks; 9 10 10 11 11 /** … … 30 30 // Disable default controls and settings panels 31 31 supports: { 32 inserter: getBlockActiveStatus('heading') ? true : false,33 32 html: false, 34 33 className: false, 35 34 customClassName: false, 36 anchor: false ,35 anchor: false 37 36 }, 38 37 attributes: { … … 67 66 textColor: { 68 67 type: 'string', 69 default: ' #333333'68 default: '' 70 69 }, 71 70 textHoverColor: { … … 85 84 default: { 86 85 fontFamily: '', 87 fontSize: { desktop: 32, tablet: 28, mobile: 24},86 fontSize: { desktop: '', tablet: '', mobile: '' }, 88 87 fontSizeUnit: 'px', 89 88 fontWeight: '600', … … 91 90 textTransform: 'none', 92 91 textDecoration: 'none', 93 lineHeight: { desktop: 1.2, tablet: 1.2, mobile: 1.2},92 lineHeight: { desktop: '', tablet: '', mobile: '' }, 94 93 lineHeightUnit: 'em', 95 letterSpacing: { desktop: 0, tablet: 0, mobile: 0},94 letterSpacing: { desktop: '', tablet: '', mobile: '' }, 96 95 letterSpacingUnit: 'px' 97 96 } -
digiblocks/trunk/blocks/heading/styles.php
r3317829 r3346454 20 20 $content = isset( $attrs['content'] ) ? $attrs['content'] : ''; 21 21 $level = isset( $attrs['level'] ) ? $attrs['level'] : 2; 22 $textColor = isset( $attrs['textColor'] ) ? $attrs['textColor'] : ' #333333';22 $textColor = isset( $attrs['textColor'] ) ? $attrs['textColor'] : ''; 23 23 $textHoverColor = isset( $attrs['textHoverColor'] ) ? $attrs['textHoverColor'] : ''; 24 24 $backgroundColor = isset( $attrs['backgroundColor'] ) ? $attrs['backgroundColor'] : ''; … … 81 81 'fontFamily' => '', 82 82 'fontSize' => array( 83 'desktop' => 32,84 'tablet' => 28,85 'mobile' => 24,83 'desktop' => '', 84 'tablet' => '', 85 'mobile' => '', 86 86 ), 87 87 'fontSizeUnit' => 'px', … … 91 91 'textDecoration' => 'none', 92 92 'lineHeight' => array( 93 'desktop' => 1.2,94 'tablet' => 1.2,95 'mobile' => 1.2,93 'desktop' => '', 94 'tablet' => '', 95 'mobile' => '', 96 96 ), 97 97 'lineHeightUnit' => 'em', 98 98 'letterSpacing' => array( 99 'desktop' => 0,100 'tablet' => 0,101 'mobile' => 0,99 'desktop' => '', 100 'tablet' => '', 101 'mobile' => '', 102 102 ), 103 103 'letterSpacingUnit' => 'px', … … 436 436 } 437 437 438 <?php if ( isset( $typography['fontSize']['tablet'] ) ) : ?>438 <?php if ( ! empty( $typography['fontSize']['tablet'] ) ) : ?> 439 439 .<?php echo esc_attr( $id ); ?> .digiblocks-heading-text { 440 440 font-size: <?php echo esc_attr( $typography['fontSize']['tablet'] . ( $typography['fontSizeUnit'] ?: 'px' ) ); ?>; 441 441 442 <?php if ( isset( $typography['lineHeight']['tablet'] ) ) : ?>442 <?php if ( ! empty( $typography['lineHeight']['tablet'] ) ) : ?> 443 443 line-height: <?php echo esc_attr( $typography['lineHeight']['tablet'] . ( $typography['lineHeightUnit'] ?: 'em' ) ); ?>; 444 444 <?php endif; ?> 445 445 446 <?php if ( isset( $typography['letterSpacing']['tablet'] ) ) : ?>446 <?php if ( ! empty( $typography['letterSpacing']['tablet'] ) ) : ?> 447 447 letter-spacing: <?php echo esc_attr( $typography['letterSpacing']['tablet'] . ( $typography['letterSpacingUnit'] ?: 'px' ) ); ?>; 448 448 <?php endif; ?> … … 521 521 } 522 522 523 <?php if ( isset( $typography['fontSize']['mobile'] ) ) : ?>523 <?php if ( ! empty( $typography['fontSize']['mobile'] ) ) : ?> 524 524 .<?php echo esc_attr( $id ); ?> .digiblocks-heading-text { 525 525 font-size: <?php echo esc_attr( $typography['fontSize']['mobile'] . ( $typography['fontSizeUnit'] ?: 'px' ) ); ?>; 526 526 527 <?php if ( isset( $typography['lineHeight']['mobile'] ) ) : ?>527 <?php if ( ! empty( $typography['lineHeight']['mobile'] ) ) : ?> 528 528 line-height: <?php echo esc_attr( $typography['lineHeight']['mobile'] . ( $typography['lineHeightUnit'] ?: 'em' ) ); ?>; 529 529 <?php endif; ?> 530 530 531 <?php if ( isset( $typography['letterSpacing']['mobile'] ) ) : ?>531 <?php if ( ! empty( $typography['letterSpacing']['mobile'] ) ) : ?> 532 532 letter-spacing: <?php echo esc_attr( $typography['letterSpacing']['mobile'] . ( $typography['letterSpacingUnit'] ?: 'px' ) ); ?>; 533 533 <?php endif; ?> -
digiblocks/trunk/blocks/icon-box/edit.js
r3317829 r3346454 1715 1715 } 1716 1716 defaults={{ 1717 fontSize: { desktop: 16, tablet: 15, mobile: 14},1717 fontSize: { desktop: '', tablet: '', mobile: '' }, 1718 1718 fontSizeUnit: 'px', 1719 lineHeight: { desktop: 1.5, tablet: 1.4, mobile: 1.3},1719 lineHeight: { desktop: '', tablet: '', mobile: '' }, 1720 1720 lineHeightUnit: 'em', 1721 1721 }} … … 2065 2065 } 2066 2066 defaults={{ 2067 fontSize: { desktop: 24, tablet: 22, mobile: 20},2067 fontSize: { desktop: '', tablet: '', mobile: '' }, 2068 2068 fontSizeUnit: 'px', 2069 lineHeight: { desktop: 1.5, tablet: 1.4, mobile: 1.3},2069 lineHeight: { desktop: '', tablet: '', mobile: '' }, 2070 2070 lineHeightUnit: 'em', 2071 2071 }} … … 2084 2084 } 2085 2085 defaults={{ 2086 fontSize: { desktop: 16, tablet: 15, mobile: 14},2086 fontSize: { desktop: '', tablet: '', mobile: '' }, 2087 2087 fontSizeUnit: 'px', 2088 lineHeight: { desktop: 1.5, tablet: 1.4, mobile: 1.3},2088 lineHeight: { desktop: '', tablet: '', mobile: '' }, 2089 2089 lineHeightUnit: 'em', 2090 2090 }} -
digiblocks/trunk/blocks/icon-box/index.js
r3317829 r3346454 7 7 import IconBoxEdit from './edit'; 8 8 import IconBoxSave from './save'; 9 const { getBlockActiveStatus } = wp.digiBlocks; 9 10 10 11 11 /** … … 29 29 keywords: [__('icon', 'digiblocks'), __('box', 'digiblocks'), __('feature', 'digiblocks'), __('service', 'digiblocks')], 30 30 supports: { 31 inserter: getBlockActiveStatus('icon-box') ? true : false,32 31 html: false, 33 32 className: false, … … 122 121 titleColor: { 123 122 type: 'string', 124 default: ' #333333'123 default: '' 125 124 }, 126 125 titleHoverColor: { … … 138 137 backgroundColor: { 139 138 type: 'string', 140 default: ' #ffffff'139 default: '' 141 140 }, 142 141 backgroundHoverColor: { … … 312 311 default: { 313 312 fontFamily: '', 314 fontSize: { desktop: 16, tablet: 15, mobile: 14},313 fontSize: { desktop: '', tablet: '', mobile: '' }, 315 314 fontSizeUnit: 'px', 316 315 fontWeight: '500', … … 318 317 textTransform: '', 319 318 textDecoration: '', 320 lineHeight: { desktop: 1.5, tablet: 1.4, mobile: 1.3},319 lineHeight: { desktop: '', tablet: '', mobile: '' }, 321 320 lineHeightUnit: 'em', 322 letterSpacing: { desktop: 0, tablet: 0, mobile: 0},321 letterSpacing: { desktop: '', tablet: '', mobile: '' }, 323 322 letterSpacingUnit: 'px' 324 323 } … … 436 435 default: { 437 436 fontFamily: '', 438 fontSize: { desktop: 22, tablet: 20, mobile: 18},437 fontSize: { desktop: '', tablet: '', mobile: '' }, 439 438 fontSizeUnit: 'px', 440 439 fontWeight: '', … … 442 441 textTransform: '', 443 442 textDecoration: '', 444 lineHeight: { desktop: 1.5, tablet: 1.4, mobile: 1.3},443 lineHeight: { desktop: '', tablet: '', mobile: '' }, 445 444 lineHeightUnit: 'em', 446 letterSpacing: { desktop: 0, tablet: 0, mobile: 0},445 letterSpacing: { desktop: '', tablet: '', mobile: '' }, 447 446 letterSpacingUnit: 'px' 448 447 } … … 452 451 default: { 453 452 fontFamily: '', 454 fontSize: { desktop: 16, tablet: 15, mobile: 14},453 fontSize: { desktop: '', tablet: '', mobile: '' }, 455 454 fontSizeUnit: 'px', 456 455 fontWeight: '', … … 458 457 textTransform: '', 459 458 textDecoration: '', 460 lineHeight: { desktop: 1.5, tablet: 1.4, mobile: 1.3},459 lineHeight: { desktop: '', tablet: '', mobile: '' }, 461 460 lineHeightUnit: 'em', 462 letterSpacing: { desktop: 0, tablet: 0, mobile: 0},461 letterSpacing: { desktop: '', tablet: '', mobile: '' }, 463 462 letterSpacingUnit: 'px' 464 463 } … … 468 467 default: { 469 468 desktop: { 470 top: 30,471 right: 30,472 bottom: 30,473 left: 30,469 top: '', 470 right: '', 471 bottom: '', 472 left: '', 474 473 unit: 'px' 475 474 }, 476 475 tablet: { 477 top: 25,478 right: 25,479 bottom: 25,480 left: 25,476 top: '', 477 right: '', 478 bottom: '', 479 left: '', 481 480 unit: 'px' 482 481 }, 483 482 mobile: { 484 top: 20,485 right: 20,486 bottom: 20,487 left: 20,483 top: '', 484 right: '', 485 bottom: '', 486 left: '', 488 487 unit: 'px' 489 488 } … … 494 493 default: { 495 494 desktop: { 496 top: 0,497 right: 0,498 bottom: 30,499 left: 0,495 top: '', 496 right: '', 497 bottom: '', 498 left: '', 500 499 unit: 'px' 501 500 }, 502 501 tablet: { 503 top: 0,504 right: 0,505 bottom: 25,506 left: 0,502 top: '', 503 right: '', 504 bottom: '', 505 left: '', 507 506 unit: 'px' 508 507 }, 509 508 mobile: { 510 top: 0,511 right: 0,512 bottom: 20,513 left: 0,509 top: '', 510 right: '', 511 bottom: '', 512 left: '', 514 513 unit: 'px' 515 514 } … … 528 527 default: { 529 528 desktop: { 530 top: 8,531 right: 8,532 bottom: 8,533 left: 8,529 top: '', 530 right: '', 531 bottom: '', 532 left: '', 534 533 unit: 'px' 535 534 }, 536 535 tablet: { 537 top: 8,538 right: 8,539 bottom: 8,540 left: 8,536 top: '', 537 right: '', 538 bottom: '', 539 left: '', 541 540 unit: 'px' 542 541 }, 543 542 mobile: { 544 top: 8,545 right: 8,546 bottom: 8,547 left: 8,543 top: '', 544 right: '', 545 bottom: '', 546 left: '', 548 547 unit: 'px' 549 548 } … … 624 623 title: __('Feature Title', 'digiblocks'), 625 624 content: __('Add your feature description here. Explain what makes this feature special.', 'digiblocks'), 626 iconColor: '#1e73be', 627 backgroundColor: '#ffffff' 625 iconColor: '#1e73be' 628 626 }, 629 627 viewportWidth: 400 -
digiblocks/trunk/blocks/icon-box/styles.php
r3317829 r3346454 65 65 $showBadge = isset( $attrs['showBadge'] ) ? $attrs['showBadge'] : false; 66 66 $badgeText = isset( $attrs['badgeText'] ) ? $attrs['badgeText'] : __('Popular', 'digiblocks'); 67 $titleColor = isset( $attrs['titleColor'] ) ? $attrs['titleColor'] : ' #333333';67 $titleColor = isset( $attrs['titleColor'] ) ? $attrs['titleColor'] : ''; 68 68 $titleHoverColor = isset( $attrs['titleHoverColor'] ) ? $attrs['titleHoverColor'] : ''; 69 69 $textColor = isset( $attrs['textColor'] ) ? $attrs['textColor'] : '#666666'; 70 70 $textHoverColor = isset( $attrs['textHoverColor'] ) ? $attrs['textHoverColor'] : ''; 71 $backgroundColor = isset( $attrs['backgroundColor'] ) ? $attrs['backgroundColor'] : ' #ffffff';71 $backgroundColor = isset( $attrs['backgroundColor'] ) ? $attrs['backgroundColor'] : ''; 72 72 $backgroundHoverColor = isset( $attrs['backgroundHoverColor'] ) ? $attrs['backgroundHoverColor'] : ''; 73 73 $align = isset( $attrs['align'] ) ? $attrs['align'] : 'center'; … … 202 202 'fontFamily' => '', 203 203 'fontSize' => array( 204 'desktop' => 16,205 'tablet' => 15,206 'mobile' => 14,204 'desktop' => '', 205 'tablet' => '', 206 'mobile' => '', 207 207 ), 208 208 'fontSizeUnit' => 'px', … … 212 212 'textDecoration' => '', 213 213 'lineHeight' => array( 214 'desktop' => 1.5,215 'tablet' => 1.4,216 'mobile' => 1.3,214 'desktop' => '', 215 'tablet' => '', 216 'mobile' => '', 217 217 ), 218 218 'lineHeightUnit' => 'em', 219 219 'letterSpacing' => array( 220 'desktop' => 0,221 'tablet' => 0,222 'mobile' => 0,220 'desktop' => '', 221 'tablet' => '', 222 'mobile' => '', 223 223 ), 224 224 'letterSpacingUnit' => 'px', … … 379 379 380 380 // Get padding (with fallback) 381 $padding = isset( $attrs['padding'] ) ? $attrs['padding'] : array( 382 'desktop' => array( 383 'top' => 30, 384 'right' => 30, 385 'bottom' => 30, 386 'left' => 30, 387 'unit' => 'px', 388 ), 389 'tablet' => array( 390 'top' => 25, 391 'right' => 25, 392 'bottom' => 25, 393 'left' => 25, 394 'unit' => 'px', 395 ), 396 'mobile' => array( 397 'top' => 20, 398 'right' => 20, 399 'bottom' => 20, 400 'left' => 20, 401 'unit' => 'px', 402 ), 403 ); 381 $padding = isset( $attrs['padding'] ) ? $attrs['padding'] : digiblocks_get_default_dimensions('px'); 404 382 405 383 // Get margin (with fallback) 406 $margin = isset( $attrs['margin'] ) ? $attrs['margin'] : array( 407 'desktop' => array( 408 'top' => 0, 409 'right' => 0, 410 'bottom' => 30, 411 'left' => 0, 412 'unit' => 'px', 413 ), 414 'tablet' => array( 415 'top' => 0, 416 'right' => 0, 417 'bottom' => 25, 418 'left' => 0, 419 'unit' => 'px', 420 ), 421 'mobile' => array( 422 'top' => 0, 423 'right' => 0, 424 'bottom' => 20, 425 'left' => 0, 426 'unit' => 'px', 427 ), 428 ); 384 $margin = isset( $attrs['margin'] ) ? $attrs['margin'] : digiblocks_get_default_dimensions('px'); 429 385 430 386 // Get borderWidth (with responsive fallback) … … 454 410 455 411 // Get borderRadius (with responsive fallback) 456 $borderRadius = isset( $attrs['borderRadius'] ) ? $attrs['borderRadius'] : array( 457 'desktop' => array( 458 'top' => 8, 459 'right' => 8, 460 'bottom' => 8, 461 'left' => 8, 462 'unit' => 'px', 463 ), 464 'tablet' => array( 465 'top' => '', 466 'right' => '', 467 'bottom' => '', 468 'left' => '', 469 'unit' => 'px', 470 ), 471 'mobile' => array( 472 'top' => '', 473 'right' => '', 474 'bottom' => '', 475 'left' => '', 476 'unit' => 'px', 477 ), 478 ); 412 $borderRadius = isset( $attrs['borderRadius'] ) ? $attrs['borderRadius'] : digiblocks_get_default_dimensions('px'); 479 413 480 414 // Get typography settings with default values … … 482 416 'fontFamily' => '', 483 417 'fontSize' => array( 484 'desktop' => 22,485 'tablet' => 20,486 'mobile' => 18,418 'desktop' => '', 419 'tablet' => '', 420 'mobile' => '', 487 421 ), 488 422 'fontSizeUnit' => 'px', … … 492 426 'textDecoration' => '', 493 427 'lineHeight' => array( 494 'desktop' => 1.5,495 'tablet' => 1.4,496 'mobile' => 1.3,428 'desktop' => '', 429 'tablet' => '', 430 'mobile' => '', 497 431 ), 498 432 'lineHeightUnit' => 'em', 499 433 'letterSpacing' => array( 500 'desktop' => 0,501 'tablet' => 0,502 'mobile' => 0,434 'desktop' => '', 435 'tablet' => '', 436 'mobile' => '', 503 437 ), 504 438 'letterSpacingUnit' => 'px', … … 508 442 'fontFamily' => '', 509 443 'fontSize' => array( 510 'desktop' => 16,511 'tablet' => 15,512 'mobile' => 14,444 'desktop' => '', 445 'tablet' => '', 446 'mobile' => '', 513 447 ), 514 448 'fontSizeUnit' => 'px', … … 518 452 'textDecoration' => '', 519 453 'lineHeight' => array( 520 'desktop' => 1.5,521 'tablet' => 1.4,522 'mobile' => 1.3,454 'desktop' => '', 455 'tablet' => '', 456 'mobile' => '', 523 457 ), 524 458 'lineHeightUnit' => 'em', 525 459 'letterSpacing' => array( 526 'desktop' => 0,527 'tablet' => 0,528 'mobile' => 0,460 'desktop' => '', 461 'tablet' => '', 462 'mobile' => '', 529 463 ), 530 464 'letterSpacingUnit' => 'px', … … 680 614 /* Title styles */ 681 615 .<?php echo esc_attr( $id ); ?> .digiblocks-icon-box-title { 616 <?php if ( !empty($titleColor) ) : ?> 682 617 color: <?php echo esc_attr( $titleColor ); ?>; 618 <?php endif; ?> 683 619 margin-top: 0; 684 620 margin-bottom: 10px; -
digiblocks/trunk/blocks/icon-list/edit.js
r3317829 r3346454 80 80 useBlockId( id, clientId, setAttributes ); 81 81 82 // Initialize items with deep cloned objects when empty or ensure items are unique 83 useEffect(() => { 84 // If items array is empty, initialize with default items 85 if (!items || items.length === 0) { 86 const defaultItems = [ 87 { 88 id: 'item-1', 89 content: __('First list item with icon', 'digiblocks'), 90 iconSource: 'library', 91 icon: { 92 id: 'check', 93 name: 'Check', 94 svg: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" width="1em" height="1em"><path d="M470.6 105.4c12.5 12.5 12.5 32.8 0 45.3l-256 256c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L192 338.7 425.4 105.4c12.5-12.5 32.8-12.5 45.3 0z"/></svg>', 95 style: 'solid', 96 categories: ['design'] 97 }, 98 customSvg: '', 99 linkEnabled: false, 100 linkUrl: '', 101 linkOpenInNewTab: false, 102 linkRel: '' 103 }, 104 { 105 id: 'item-2', 106 content: __('Second list item with star icon', 'digiblocks'), 107 iconSource: 'library', 108 icon: { 109 id: 'star', 110 name: 'Star', 111 svg: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512" width="1em" height="1em"><path d="M381.2 150.3L524.9 171.5C536.8 173.2 546.8 181.6 550.6 193.1C554.4 204.7 551.3 217.3 542.7 225.9L438.5 328.1L463.1 474.7C465.1 486.7 460.2 498.9 450.2 506C440.3 513.1 427.2 514 416.5 508.3L288.1 439.8L159.8 508.3C149 514 135.9 513.1 126 506C116.1 498.9 111.1 486.7 113.2 474.7L137.8 328.1L33.58 225.9C24.97 217.3 21.91 204.7 25.69 193.1C29.46 181.6 39.43 173.2 51.42 171.5L195 150.3L259.4 17.97C264.7 6.954 275.9-.0391 288.1-.0391C300.4-.0391 311.6 6.954 316.9 17.97L381.2 150.3z"/></svg>', 112 style: 'solid', 113 categories: ['design'] 114 }, 115 customSvg: '', 116 linkUrl: '', 117 linkOpenInNewTab: false, 118 linkRel: '' 119 }, 120 { 121 id: 'item-3', 122 content: __('Third list item with heart icon', 'digiblocks'), 123 iconSource: 'library', 124 icon: { 125 id: 'heart', 126 name: 'Heart', 127 svg: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" width="1em" height="1em"><path d="M47.6 300.4L228.3 469.1c7.5 7 17.4 10.9 27.7 10.9s20.2-3.9 27.7-10.9L464.4 300.4c30.4-28.3 47.6-68 47.6-109.5v-5.8c0-69.9-50.5-129.5-119.4-141C347 36.5 300.6 51.4 268 84L256 96 244 84c-32.6-32.6-79-47.5-124.6-39.9C50.5 55.6 0 115.2 0 185.1v5.8c0 41.5 17.2 81.2 47.6 109.5z"/></svg>', 128 style: 'solid', 129 categories: ['design'] 130 }, 131 customSvg: '', 132 linkUrl: '', 133 linkOpenInNewTab: false, 134 linkRel: '' 135 } 136 ]; 137 setAttributes({ items: defaultItems }); 138 } else { 139 // Ensure each item has a unique ID (in case of duplication) 140 const hasNonUniqueIds = items.some((item, index) => 141 items.findIndex(i => i.id === item.id) !== index 142 ); 143 144 if (hasNonUniqueIds) { 145 const uniqueItems = items.map((item, index) => ({ 146 ...JSON.parse(JSON.stringify(item)), // Deep clone to break references 147 id: `item-${Date.now()}-${index}` 148 })); 149 setAttributes({ items: uniqueItems }); 150 } 151 } 152 }, [clientId]); 153 82 154 // Use global responsive state for local rendering instead of local state 83 155 const [localActiveDevice, setLocalActiveDevice] = useState( … … 243 315 244 316 // Update list item 245 const updateListItem = (index, field, value) => { 246 const newItems = [...items]; 247 newItems[index][field] = value; 248 setAttributes({ items: newItems }); 249 }; 317 const updateListItem = (index, field, value) => { 318 const newItems = items.map((item, i) => { 319 if (i === index) { 320 return { 321 ...item, 322 [field]: value 323 }; 324 } 325 return item; 326 }); 327 setAttributes({ items: newItems }); 328 }; 250 329 251 330 // Move item up … … 414 493 flex-direction: ${listLayout === 'horizontal' ? 'row' : 'column'}; 415 494 flex-wrap: wrap; 495 justify-content: ${listAlign === 'center' ? 'center' : (listAlign === 'right' ? 'flex-end' : 'flex-start')}; 416 496 gap: ${itemSpace[activeDevice] !== undefined ? itemSpace[activeDevice] : 16}px; 417 497 } … … 452 532 /* Text content */ 453 533 .${id} .digiblocks-icon-list-content { 454 color: ${textColor || "#333333"};534 color: ${textColor}; 455 535 ${contentTypographyCSS} 456 536 transition: color 0.3s ease; -
digiblocks/trunk/blocks/icon-list/index.js
r3317829 r3346454 7 7 import IconListEdit from './edit'; 8 8 import IconListSave from './save'; 9 const { getBlockActiveStatus } = wp.digiBlocks; 9 10 10 11 11 /** … … 30 30 // Disable all default controls and settings panels 31 31 supports: { 32 inserter: getBlockActiveStatus('icon-list') ? true : false,33 32 html: false, 34 33 className: false, … … 191 190 textColor: { 192 191 type: 'string', 193 default: ' #333333'192 default: '' 194 193 }, 195 194 textHoverColor: { -
digiblocks/trunk/blocks/icon-list/styles.php
r3317829 r3346454 39 39 $iconColor = isset( $attrs['iconColor'] ) ? $attrs['iconColor'] : '#1e73be'; 40 40 $iconHoverColor = isset( $attrs['iconHoverColor'] ) ? $attrs['iconHoverColor'] : ''; 41 $textColor = isset( $attrs['textColor'] ) ? $attrs['textColor'] : ' #333333';41 $textColor = isset( $attrs['textColor'] ) ? $attrs['textColor'] : ''; 42 42 $textHoverColor = isset( $attrs['textHoverColor'] ) ? $attrs['textHoverColor'] : ''; 43 43 $backgroundColor = isset( $attrs['backgroundColor'] ) ? $attrs['backgroundColor'] : ''; … … 229 229 flex-direction: <?php echo esc_attr( 'horizontal' === $listLayout ? 'row' : 'column' ); ?>; 230 230 flex-wrap: wrap; 231 justify-content: <?php echo esc_attr( 'center' === $listAlign ? 'center' : ( 'right' === $listAlign ? 'flex-end' : 'flex-start' ) ); ?>; 231 232 gap: <?php echo esc_attr( $itemSpace['desktop'] . 'px' ); ?>; 232 233 } … … 275 276 /* Text content */ 276 277 .<?php echo esc_attr( $id ); ?> .digiblocks-icon-list-content { 278 <?php if ( !empty($textColor) ) : ?> 277 279 color: <?php echo esc_attr( $textColor ); ?>; 280 <?php endif; ?> 278 281 <?php if ( ! empty( $contentTypography['fontFamily'] ) ) : ?> 279 282 font-family: <?php echo esc_attr( $contentTypography['fontFamily'] ); ?>; -
digiblocks/trunk/blocks/icon/edit.js
r3317829 r3346454 26 26 const { useBlockId, getDimensionCSS, animations, animationPreview } = digi.utils; 27 27 const { tabIcons } = digi.icons; 28 const { ResponsiveControl, ResponsiveButtonGroup, DimensionControl, BoxShadowControl, CustomTabPanel, TabPanelBody } = digi.components;28 const { ResponsiveControl, ResponsiveButtonGroup, ResponsiveRangeControl, DimensionControl, BoxShadowControl, CustomTabPanel, TabPanelBody } = digi.components; 29 29 30 30 /** … … 41 41 iconValue, 42 42 iconSize, 43 iconHeight, 43 44 iconColor, 44 45 iconBackgroundColor, … … 145 146 setAttributes({ iconValue: newIcon }); 146 147 }; 148 149 const getMaxValue = (unit) => { 150 switch (unit) { 151 case '%': 152 return 100; 153 case 'em': 154 case 'rem': 155 return 10; 156 case 'px': 157 default: 158 return 1000; 159 } 160 }; 161 162 const getStepValue = (unit) => { 163 switch (unit) { 164 case '%': 165 case 'em': 166 case 'rem': 167 return 0.1; 168 case 'px': 169 default: 170 return 1; 171 } 172 }; 147 173 148 174 // Use ref … … 390 416 391 417 .${id} .digiblocks-icon svg { 392 width: ${iconSize[activeDevice] }px;393 height: auto;418 width: ${iconSize[activeDevice]?.value ? `${iconSize[activeDevice].value}${iconSize[activeDevice].unit}` : '48px'}; 419 height: ${iconHeight[activeDevice]?.value ? `${iconHeight[activeDevice].value}${iconHeight[activeDevice].unit}` : 'auto'}; 394 420 fill: ${iconColor || 'inherit'}; 395 421 transition: all 0.3s ease; … … 1009 1035 initialOpen={true} 1010 1036 > 1011 {/* Icon Size */} 1012 <ResponsiveControl 1013 label={__( 1014 "Icon Size", 1015 "digiblocks" 1016 )} 1017 > 1018 <RangeControl 1019 value={iconSize[localActiveDevice]} 1020 onChange={(value) => 1021 setAttributes({ 1022 iconSize: { 1023 ...iconSize, 1024 [localActiveDevice]: value, 1025 }, 1026 }) 1027 } 1028 min={8} 1029 max={500} 1030 step={1} 1031 __next40pxDefaultSize={true} 1032 __nextHasNoMarginBottom={true} 1033 /> 1034 </ResponsiveControl> 1037 <ResponsiveRangeControl 1038 label={__("Icon Width", "digiblocks")} 1039 value={iconSize} 1040 onChange={(value) => setAttributes({ iconSize: value })} 1041 units={[ 1042 { label: 'px', value: 'px' }, 1043 { label: '%', value: '%' }, 1044 { label: 'em', value: 'em' }, 1045 { label: 'rem', value: 'rem' }, 1046 ]} 1047 defaultUnit="px" 1048 min={0} 1049 max={getMaxValue(iconSize?.[localActiveDevice]?.unit)} 1050 step={getStepValue(iconSize?.[localActiveDevice]?.unit)} 1051 /> 1052 1053 <ResponsiveRangeControl 1054 label={__("Icon Height", "digiblocks")} 1055 value={iconHeight} 1056 onChange={(value) => setAttributes({ iconHeight: value })} 1057 units={[ 1058 { label: 'px', value: 'px' }, 1059 { label: '%', value: '%' }, 1060 { label: 'em', value: 'em' }, 1061 { label: 'rem', value: 'rem' }, 1062 ]} 1063 defaultUnit="px" 1064 min={0} 1065 max={getMaxValue(iconHeight?.[localActiveDevice]?.unit)} 1066 step={getStepValue(iconHeight?.[localActiveDevice]?.unit)} 1067 /> 1035 1068 1036 1069 <TabPanel -
digiblocks/trunk/blocks/icon/index.js
r3317829 r3346454 7 7 import IconEdit from './edit'; 8 8 import IconSave from './save'; 9 const { getBlockActiveStatus } = wp.digiBlocks; 9 10 10 11 11 /** … … 30 30 // Disable all default controls and settings panels 31 31 supports: { 32 inserter: getBlockActiveStatus('icon') ? true : false,33 32 html: false, 34 33 className: false, … … 162 161 type: 'object', 163 162 default: { 164 desktop: 48, 165 tablet: 40, 166 mobile: 32 163 desktop: { value: 48, unit: 'px' }, 164 tablet: { value: '', unit: 'px' }, 165 mobile: { value: '', unit: 'px' } 166 } 167 }, 168 iconHeight: { 169 type: 'object', 170 default: { 171 desktop: { value: '', unit: 'px' }, 172 tablet: { value: '', unit: 'px' }, 173 mobile: { value: '', unit: 'px' } 167 174 } 168 175 }, -
digiblocks/trunk/blocks/icon/styles.php
r3317829 r3346454 87 87 ); 88 88 89 // Get icon size (with fallback)89 // Get icon size 90 90 $iconSize = isset( $attrs['iconSize'] ) ? $attrs['iconSize'] : array( 91 'desktop' => 48, 92 'tablet' => 40, 93 'mobile' => 32, 91 'desktop' => array( 'value' => 48, 'unit' => 'px' ), 92 'tablet' => array( 'value' => '', 'unit' => 'px' ), 93 'mobile' => array( 'value' => '', 'unit' => 'px' ), 94 ); 95 96 // Get icon height 97 $iconHeight = isset( $attrs['iconHeight'] ) ? $attrs['iconHeight'] : array( 98 'desktop' => array( 'value' => '', 'unit' => 'px' ), 99 'tablet' => array( 'value' => '', 'unit' => 'px' ), 100 'mobile' => array( 'value' => '', 'unit' => 'px' ), 94 101 ); 95 102 … … 273 280 274 281 .<?php echo esc_attr( $id ); ?> .digiblocks-icon svg { 275 width: <?php echo esc_attr( $iconSize['desktop'] ); ?>px; 276 height: 100%; 282 <?php if ( ! empty( $iconSize['desktop']['value'] ) ) : ?> 283 width: <?php echo esc_attr( $iconSize['desktop']['value'] . $iconSize['desktop']['unit'] ); ?>; 284 <?php else: ?> 285 width: 48px; 286 <?php endif; ?> 287 288 <?php if ( ! empty( $iconHeight['desktop']['value'] ) ) : ?> 289 height: <?php echo esc_attr( $iconHeight['desktop']['value'] . $iconHeight['desktop']['unit'] ); ?>; 290 <?php else: ?> 291 height: auto; 292 <?php endif; ?> 277 293 fill: <?php echo esc_attr( $iconColor ); ?>; 278 294 transition: all 0.3s ease; … … 311 327 } 312 328 313 <?php if ( isset( $iconSize['tablet'] ) ) : ?> 314 .<?php echo esc_attr( $id ); ?> .digiblocks-icon svg { 315 width: <?php echo esc_attr( $iconSize['tablet'] ); ?>px; 316 } 317 <?php endif; ?> 329 <?php if ( isset( $iconSize['tablet']['value'] ) || isset( $iconHeight['tablet']['value'] ) ) : ?> 330 .<?php echo esc_attr( $id ); ?> .digiblocks-icon svg { 331 <?php if ( ! empty( $iconSize['tablet']['value'] ) ) : ?> 332 width: <?php echo esc_attr( $iconSize['tablet']['value'] . $iconSize['tablet']['unit'] ); ?>; 333 <?php endif; ?> 334 335 <?php if ( ! empty( $iconHeight['tablet']['value'] ) ) : ?> 336 height: <?php echo esc_attr( $iconHeight['tablet']['value'] . $iconHeight['tablet']['unit'] ); ?>; 337 <?php endif; ?> 338 } 339 <?php endif; ?> 318 340 319 341 <?php if ( $iconPadding && isset( $iconPadding['tablet'] ) ) : ?> … … 345 367 } 346 368 347 <?php if ( isset( $iconSize['mobile'] ) ) : ?> 348 .<?php echo esc_attr( $id ); ?> .digiblocks-icon svg { 349 width: <?php echo esc_attr( $iconSize['mobile'] ); ?>px; 350 } 351 <?php endif; ?> 369 <?php if ( isset( $iconSize['mobile']['value'] ) || isset( $iconHeight['mobile']['value'] ) ) : ?> 370 .<?php echo esc_attr( $id ); ?> .digiblocks-icon svg { 371 <?php if ( ! empty( $iconSize['mobile']['value'] ) ) : ?> 372 width: <?php echo esc_attr( $iconSize['mobile']['value'] . $iconSize['mobile']['unit'] ); ?>; 373 <?php endif; ?> 374 375 <?php if ( ! empty( $iconHeight['mobile']['value'] ) ) : ?> 376 height: <?php echo esc_attr( $iconHeight['mobile']['value'] . $iconHeight['mobile']['unit'] ); ?>; 377 <?php endif; ?> 378 } 379 <?php endif; ?> 352 380 353 381 <?php if ( $iconPadding && isset( $iconPadding['mobile'] ) ) : ?> -
digiblocks/trunk/blocks/image/index.js
r3317829 r3346454 7 7 import ImageEdit from './edit'; 8 8 import ImageSave from './save'; 9 const { getBlockActiveStatus } = wp.digiBlocks; 9 10 10 11 11 /** … … 29 29 keywords: [__('image', 'digiblocks'), __('picture', 'digiblocks'), __('photo', 'digiblocks'), __('media', 'digiblocks')], 30 30 supports: { 31 inserter: getBlockActiveStatus('image') ? true : false,32 31 html: false, 33 32 className: false, -
digiblocks/trunk/blocks/lottie/index.js
r3317829 r3346454 7 7 import LottieEdit from './edit'; 8 8 import LottieSave from './save'; 9 const { getBlockActiveStatus } = wp.digiBlocks; 9 10 10 11 11 /** … … 29 29 keywords: [__('lottie', 'digiblocks'), __('animation', 'digiblocks'), __('dotlottie', 'digiblocks'), __('motion', 'digiblocks')], 30 30 supports: { 31 inserter: getBlockActiveStatus('lottie') ? true : false,32 31 html: false, 33 32 className: false, -
digiblocks/trunk/blocks/newsletter/index.js
r3317829 r3346454 7 7 import NewsletterEdit from './edit'; 8 8 import NewsletterSave from './save'; 9 const { getBlockActiveStatus } = wp.digiBlocks; 9 10 10 11 11 /** … … 29 29 keywords: [__('newsletter', 'digiblocks'), __('subscribe', 'digiblocks'), __('email', 'digiblocks'), __('mailchimp', 'digiblocks')], 30 30 supports: { 31 inserter: getBlockActiveStatus('newsletter') ? true : false,32 31 html: false, 33 32 className: false, … … 110 109 titleColor: { 111 110 type: 'string', 112 default: ' #333333'111 default: '' 113 112 }, 114 113 titleHoverColor: { … … 122 121 inputTextColor: { 123 122 type: 'string', 124 default: ' #333333'123 default: '' 125 124 }, 126 125 inputBackgroundColor: { -
digiblocks/trunk/blocks/newsletter/styles.php
r3317829 r3346454 24 24 'mobile' => 'left', 25 25 ]; 26 $titleColor = isset( $attrs['titleColor'] ) ? $attrs['titleColor'] : ' #333333';26 $titleColor = isset( $attrs['titleColor'] ) ? $attrs['titleColor'] : ''; 27 27 $titleHoverColor = isset( $attrs['titleHoverColor'] ) ? $attrs['titleHoverColor'] : ''; 28 28 $descriptionColor = isset( $attrs['descriptionColor'] ) ? $attrs['descriptionColor'] : '#666666'; 29 $inputTextColor = isset( $attrs['inputTextColor'] ) ? $attrs['inputTextColor'] : ' #333333';29 $inputTextColor = isset( $attrs['inputTextColor'] ) ? $attrs['inputTextColor'] : ''; 30 30 $inputBackgroundColor = isset( $attrs['inputBackgroundColor'] ) ? $attrs['inputBackgroundColor'] : '#ffffff'; 31 31 $inputBorderColor = isset( $attrs['inputBorderColor'] ) ? $attrs['inputBorderColor'] : '#e0e0e0'; … … 251 251 /* Newsletter Title */ 252 252 .<?php echo esc_attr( $id ); ?> .digiblocks-newsletter-title { 253 <?php if ( !empty($titleColor) ) : ?> 253 254 color: <?php echo esc_attr( $titleColor ); ?>; 255 <?php endif; ?> 254 256 margin-top: 0; 255 257 margin-bottom: <?php echo esc_attr($spacing['desktop']['value'] . ($spacing['desktop']['unit'] ?: 'px')); ?>; … … 362 364 height: 1em; 363 365 <?php endif; ?> 366 <?php if ( !empty($inputTextColor) ) : ?> 364 367 fill: <?php echo esc_attr( $inputTextColor ); ?>; 368 <?php endif; ?> 365 369 pointer-events: none; 366 370 z-index: 2; … … 373 377 width: 100%; 374 378 padding: 12px 16px 12px 50px; 379 <?php if ( !empty($inputTextColor) ) : ?> 375 380 color: <?php echo esc_attr( $inputTextColor ); ?>; 381 <?php endif; ?> 376 382 background-color: <?php echo esc_attr( $inputBackgroundColor ); ?>; 377 383 <?php if ( $inputBorderStyle !== 'none' && ! empty( $inputBorderColor ) ) : ?> -
digiblocks/trunk/blocks/pricing-table/edit.js
r3317829 r3346454 1402 1402 position: absolute; 1403 1403 top: 5px; 1404 right: 5px;1404 left: 5px; 1405 1405 display: flex; 1406 1406 gap: 5px; … … 1414 1414 display: flex; 1415 1415 gap: 5px; 1416 }1417 1418 .${id} .digiblocks-table-active {1419 outline: 2px solid #4a6cf7;1420 outline-offset: -2px;1421 1416 } 1422 1417 … … 1668 1663 1669 1664 {/* Footer */} 1670 <div className="digiblocks-pricing-table-footer"> 1671 <div 1672 className="digiblocks-pricing-table-button" 1673 style={table.buttonBackgroundColor ? { 1674 backgroundColor: table.buttonBackgroundColor, 1675 color: table.buttonTextColor || buttonTextColor || '#ffffff' 1676 } : null} 1677 > 1678 <RichText 1679 tagName="span" 1680 value={table.buttonText} 1681 onChange={(value) => updateTableAttribute(index, 'buttonText', value)} 1682 placeholder={__('Get Started', 'digiblocks')} 1683 /> 1684 </div> 1685 </div> 1665 {table.buttonUrl && table.buttonUrl.trim() !== '' && ( 1666 <div className="digiblocks-pricing-table-footer"> 1667 <div 1668 className="digiblocks-pricing-table-button" 1669 style={table.buttonBackgroundColor ? { 1670 backgroundColor: table.buttonBackgroundColor, 1671 color: table.buttonTextColor || buttonTextColor || '#ffffff' 1672 } : null} 1673 > 1674 <RichText 1675 tagName="span" 1676 value={table.buttonText} 1677 onChange={(value) => updateTableAttribute(index, 'buttonText', value)} 1678 placeholder={__('Get Started', 'digiblocks')} 1679 /> 1680 </div> 1681 </div> 1682 )} 1686 1683 </div> 1687 1684 ); -
digiblocks/trunk/blocks/pricing-table/index.js
r3317829 r3346454 7 7 import PricingTableEdit from './edit'; 8 8 import PricingTableSave from './save'; 9 const { getBlockActiveStatus } = wp.digiBlocks; 9 10 10 11 11 /** … … 30 30 // Disable all default controls and settings panels 31 31 supports: { 32 inserter: getBlockActiveStatus('pricing-table') ? true : false,33 32 html: false, 34 33 className: false, -
digiblocks/trunk/blocks/pricing-table/save.js
r3317829 r3346454 134 134 </div> 135 135 136 {/* Footer */} 137 <div className="digiblocks-pricing-table-footer"> 138 <a 139 href={table.buttonUrl || '#'} 140 className="digiblocks-pricing-table-button" 141 style={table.buttonBackgroundColor ? { 142 backgroundColor: table.buttonBackgroundColor, 143 color: table.buttonTextColor || '#ffffff' 144 } : null} 145 target={table.buttonOpenInNewTab ? '_blank' : undefined} 146 rel={table.buttonOpenInNewTab 147 ? `noopener noreferrer ${table.buttonRel || ''}`.trim() 148 : table.buttonRel || undefined} 149 > 150 <RichText.Content 151 tagName="span" 152 value={table.buttonText} 153 /> 154 </a> 155 </div> 136 {/* Footer */} 137 {table.buttonUrl && table.buttonUrl.trim() !== '' && ( 138 <div className="digiblocks-pricing-table-footer"> 139 <a 140 href={table.buttonUrl || '#'} 141 className="digiblocks-pricing-table-button" 142 style={table.buttonBackgroundColor ? { 143 backgroundColor: table.buttonBackgroundColor, 144 color: table.buttonTextColor || '#ffffff' 145 } : null} 146 target={table.buttonOpenInNewTab ? '_blank' : undefined} 147 rel={table.buttonOpenInNewTab 148 ? `noopener noreferrer ${table.buttonRel || ''}`.trim() 149 : table.buttonRel || undefined} 150 > 151 <RichText.Content 152 tagName="span" 153 value={table.buttonText} 154 /> 155 </a> 156 </div> 157 )} 156 158 </div> 157 159 ))} -
digiblocks/trunk/blocks/separator/index.js
r3317829 r3346454 7 7 import SeparatorEdit from './edit'; 8 8 import SeparatorSave from './save'; 9 const { getBlockActiveStatus } = wp.digiBlocks; 9 10 10 11 11 /** … … 30 30 // Disable all default controls and settings panels 31 31 supports: { 32 inserter: getBlockActiveStatus('separator') ? true : false,33 32 html: false, 34 33 className: false, -
digiblocks/trunk/blocks/social-icons/edit.js
r3317829 r3346454 26 26 const { useBlockId, getDimensionCSS, animations, animationPreview } = digi.utils; 27 27 const { tabIcons } = digi.icons; 28 const { ResponsiveControl, ResponsiveButtonGroup, DimensionControl, TypographyControl, CustomTabPanel, TabPanelBody } = digi.components;28 const { ResponsiveControl, ResponsiveButtonGroup, ResponsiveRangeControl, DimensionControl, TypographyControl, CustomTabPanel, TabPanelBody } = digi.components; 29 29 30 30 /** … … 61 61 align, 62 62 icons, 63 iconSize, 64 iconSpacing, 63 iconWidth, 64 iconHeight, 65 iconSpacing, 65 66 iconColor, 66 67 iconHoverColor, … … 155 156 }; 156 157 158 const getMaxValue = (unit) => { 159 switch(unit) { 160 case '%': return 100; 161 case 'em': 162 case 'rem': return 10; 163 case 'px': 164 default: return 100; 165 } 166 }; 167 168 const getStepValue = (unit) => { 169 switch(unit) { 170 case '%': return 1; 171 case 'em': 172 case 'rem': return 0.1; 173 case 'px': 174 default: return 1; 175 } 176 }; 177 157 178 // Border style options 158 179 const borderStyleOptions = [ … … 325 346 const activeDevice = localActiveDevice; 326 347 327 // Icon size 328 const currentIconSize = iconSize[activeDevice] || 24; 329 330 // Icon spacing 331 const currentIconSpacing = iconSpacing[activeDevice] || 10; 348 // Icon dimensions 349 const currentIconWidth = iconWidth[activeDevice]?.value ? `${iconWidth[activeDevice].value}${iconWidth[activeDevice].unit}` : '1rem'; 350 const currentIconHeight = iconHeight[activeDevice]?.value ? `${iconHeight[activeDevice].value}${iconHeight[activeDevice].unit}` : '1rem'; 351 352 // Icon spacing 353 const currentIconSpacing = iconSpacing[activeDevice]?.value ? `${iconSpacing[activeDevice].value}${iconSpacing[activeDevice].unit}` : '0.8rem'; 332 354 333 355 // Label spacing 334 const currentLabelSpacing = labelSpacing[activeDevice] || 5;356 const currentLabelSpacing = labelSpacing[activeDevice]?.value ? `${labelSpacing[activeDevice].value}${labelSpacing[activeDevice].unit}` : '0.8rem'; 335 357 336 358 // Border styles … … 433 455 align-items: center; 434 456 flex-wrap: wrap; 435 gap: ${currentIconSpacing} px;457 gap: ${currentIconSpacing}; 436 458 justify-content: ${align[activeDevice]}; 437 459 } … … 446 468 align-items: center; 447 469 text-decoration: none; 448 gap: ${currentLabelSpacing} px;470 gap: ${currentLabelSpacing}; 449 471 } 450 472 … … 468 490 469 491 .${id} .digiblocks-social-icon-icon svg { 470 width: ${currentIcon Size}px;471 height: ${currentIconSize}px;492 width: ${currentIconWidth}; 493 height: ${currentIconHeight}; 472 494 fill: currentColor; 473 495 transition: all 0.3s ease; … … 493 515 .${id} .digiblocks-social-icon-remove { 494 516 position: absolute; 495 top: -18px; 496 right: -10px; 497 background-color: #fff; 498 border-radius: 50%; 499 padding: 2px; 500 display: none; 501 box-shadow: 0 1px 3px rgba(0,0,0,0.2); 502 z-index: 10; 517 top: -18px; 518 right: -10px; 519 display: none; 520 align-items: center; 521 justify-content: center; 522 width: 20px; 523 height: 20px; 524 line-height: 1; 525 background-color: #fff; 526 border-radius: 50%; 527 padding: 2px; 528 box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2); 529 z-index: 10; 503 530 } 504 531 505 532 .${id} .digiblocks-social-wrapper:hover .digiblocks-social-icon-remove { 506 display: block;533 display: flex; 507 534 } 508 535 … … 531 558 @media (max-width: 991px) { 532 559 .${id} { 533 gap: ${iconSpacing.tablet || currentIconSpacing}px;534 }535 536 .${id} .digiblocks-social-icon {537 gap: ${labelSpacing.tablet || currentLabelSpacing}px;538 }539 540 .${id} .digiblocks-social-icon-icon svg {541 width: ${iconSize.tablet || currentIconSize}px;542 height: ${iconSize.tablet || currentIconSize}px;543 }560 gap: ${iconSpacing.tablet?.value ? `${iconSpacing.tablet.value}${iconSpacing.tablet.unit}` : currentIconSpacing}; 561 } 562 563 .${id} .digiblocks-social-icon { 564 gap: ${labelSpacing.tablet?.value ? `${labelSpacing.tablet.value}${labelSpacing.tablet.unit}` : currentLabelSpacing}; 565 } 566 567 .${id} .digiblocks-social-icon-icon svg { 568 width: ${iconWidth.tablet?.value ? `${iconWidth.tablet.value}${iconWidth.tablet.unit}` : currentIconWidth}; 569 height: ${iconHeight.tablet?.value ? `${iconHeight.tablet.value}${iconHeight.tablet.unit}` : currentIconHeight}; 570 } 544 571 545 572 ${textTypography && textTypography.fontSize && textTypography.fontSize.tablet ? ` … … 550 577 551 578 .${id} .digiblocks-social-icon.add-social { 552 width: ${iconSize.tablet || currentIconSize}px;553 height: ${iconSize.tablet || currentIconSize}px;579 width: ${iconWidth.tablet?.value ? `${iconWidth.tablet.value}${iconWidth.tablet.unit}` : currentIconWidth}; 580 height: ${iconHeight.tablet?.value ? `${iconHeight.tablet.value}${iconHeight.tablet.unit}` : currentIconHeight}; 554 581 } 555 582 } … … 557 584 @media (max-width: 767px) { 558 585 .${id} { 559 gap: ${iconSpacing.mobile || iconSpacing.tablet || currentIconSpacing}px;560 }561 562 .${id} .digiblocks-social-icon {563 gap: ${labelSpacing.mobile || labelSpacing.tablet || currentLabelSpacing}px;564 }565 566 .${id} .digiblocks-social-icon-icon svg {567 width: ${iconSize.mobile || iconSize.tablet || currentIconSize}px;568 height: ${iconSize.mobile || iconSize.tablet || currentIconSize}px;569 }586 gap: ${iconSpacing.mobile?.value ? `${iconSpacing.mobile.value}${iconSpacing.mobile.unit}` : (iconSpacing.tablet?.value ? `${iconSpacing.tablet.value}${iconSpacing.tablet.unit}` : currentIconSpacing)}; 587 } 588 589 .${id} .digiblocks-social-icon { 590 gap: ${labelSpacing.mobile?.value ? `${labelSpacing.mobile.value}${labelSpacing.mobile.unit}` : currentLabelSpacing}; 591 } 592 593 .${id} .digiblocks-social-icon-icon svg { 594 width: ${iconWidth.mobile?.value ? `${iconWidth.mobile.value}${iconWidth.mobile.unit}` : (iconWidth.tablet?.value ? `${iconWidth.tablet.value}${iconWidth.tablet.unit}` : currentIconWidth)}; 595 height: ${iconHeight.mobile?.value ? `${iconHeight.mobile.value}${iconHeight.mobile.unit}` : (iconHeight.tablet?.value ? `${iconHeight.tablet.value}${iconHeight.tablet.unit}` : currentIconHeight)}; 596 } 570 597 571 598 ${textTypography && textTypography.fontSize && textTypography.fontSize.mobile ? ` … … 576 603 577 604 .${id} .digiblocks-social-icon.add-social { 578 width: ${iconSize.mobile || iconSize.tablet || currentIconSize}px;579 height: ${iconSize.mobile || iconSize.tablet || currentIconSize}px;605 width: ${iconWidth.mobile?.value ? `${iconWidth.mobile.value}${iconWidth.mobile.unit}` : (iconWidth.tablet?.value ? `${iconWidth.tablet.value}${iconWidth.tablet.unit}` : currentIconWidth)}; 606 height: ${iconHeight.mobile?.value ? `${iconHeight.mobile.value}${iconHeight.mobile.unit}` : (iconHeight.tablet?.value ? `${iconHeight.tablet.value}${iconHeight.tablet.unit}` : currentIconHeight)}; 580 607 } 581 608 } … … 909 936 initialOpen={false} 910 937 > 911 <ResponsiveControl 912 label={__( 913 "Icon Size", 914 "digiblocks" 915 )} 916 > 917 <RangeControl 918 value={iconSize[localActiveDevice]} 919 onChange={(value) => 920 setAttributes({ 921 iconSize: { 922 ...iconSize, 923 [localActiveDevice]: value, 924 }, 925 }) 926 } 927 min={0} 928 max={100} 929 step={1} 930 __next40pxDefaultSize={true} 931 __nextHasNoMarginBottom={true} 932 /> 933 </ResponsiveControl> 934 935 <ResponsiveControl 936 label={__( 937 "Icon Spacing", 938 "digiblocks" 939 )} 940 > 941 <RangeControl 942 value={iconSpacing[localActiveDevice]} 943 onChange={(value) => 944 setAttributes({ 945 iconSpacing: { 946 ...iconSpacing, 947 [localActiveDevice]: value, 948 }, 949 }) 950 } 951 min={0} 952 max={100} 953 step={1} 954 __next40pxDefaultSize={true} 955 __nextHasNoMarginBottom={true} 956 /> 957 </ResponsiveControl> 938 <ResponsiveRangeControl 939 label={__("Icon Width", "digiblocks")} 940 value={iconWidth} 941 onChange={(value) => setAttributes({ iconWidth: value })} 942 units={[ 943 { label: 'px', value: 'px' }, 944 { label: 'rem', value: 'rem' }, 945 { label: 'em', value: 'em' }, 946 { label: '%', value: '%' } 947 ]} 948 defaultUnit="rem" 949 min={0} 950 max={getMaxValue(iconWidth?.[localActiveDevice]?.unit)} 951 step={getStepValue(iconWidth?.[localActiveDevice]?.unit)} 952 defaultValues={{ 953 desktop: 1, 954 tablet: '', 955 mobile: '' 956 }} 957 /> 958 959 <ResponsiveRangeControl 960 label={__("Icon Height", "digiblocks")} 961 value={iconHeight} 962 onChange={(value) => setAttributes({ iconHeight: value })} 963 units={[ 964 { label: 'px', value: 'px' }, 965 { label: 'rem', value: 'rem' }, 966 { label: 'em', value: 'em' }, 967 { label: '%', value: '%' } 968 ]} 969 defaultUnit="rem" 970 min={0} 971 max={getMaxValue(iconHeight?.[localActiveDevice]?.unit)} 972 step={getStepValue(iconHeight?.[localActiveDevice]?.unit)} 973 defaultValues={{ 974 desktop: '', 975 tablet: '', 976 mobile: '' 977 }} 978 /> 979 980 <ResponsiveRangeControl 981 label={__("Icon Spacing", "digiblocks")} 982 value={iconSpacing} 983 onChange={(value) => setAttributes({ iconSpacing: value })} 984 units={[ 985 { label: 'px', value: 'px' }, 986 { label: 'rem', value: 'rem' }, 987 { label: 'em', value: 'em' }, 988 { label: '%', value: '%' } 989 ]} 990 defaultUnit="rem" 991 min={0} 992 max={getMaxValue(iconSpacing?.[localActiveDevice]?.unit)} 993 step={getStepValue(iconSpacing?.[localActiveDevice]?.unit)} 994 defaultValues={{ 995 desktop: 0.8, 996 tablet: '', 997 mobile: '' 998 }} 999 /> 958 1000 959 1001 {showLabels && ( 960 <ResponsiveControl 961 label={__( 962 "Label Spacing", 963 "digiblocks" 964 )} 965 > 966 <RangeControl 967 value={labelSpacing[localActiveDevice]} 968 onChange={(value) => 969 setAttributes({ 970 labelSpacing: { 971 ...labelSpacing, 972 [localActiveDevice]: value, 973 }, 974 }) 975 } 976 min={0} 977 max={100} 978 step={1} 979 __next40pxDefaultSize={true} 980 __nextHasNoMarginBottom={true} 981 /> 982 </ResponsiveControl> 1002 <ResponsiveRangeControl 1003 label={__("Label Spacing", "digiblocks")} 1004 value={labelSpacing} 1005 onChange={(value) => setAttributes({ labelSpacing: value })} 1006 units={[ 1007 { label: 'px', value: 'px' }, 1008 { label: 'rem', value: 'rem' }, 1009 { label: 'em', value: 'em' }, 1010 { label: '%', value: '%' } 1011 ]} 1012 defaultUnit="rem" 1013 min={0} 1014 max={getMaxValue(labelSpacing?.[localActiveDevice]?.unit)} 1015 step={getStepValue(labelSpacing?.[localActiveDevice]?.unit)} 1016 defaultValues={{ 1017 desktop: 0.8, 1018 tablet: '', 1019 mobile: '' 1020 }} 1021 /> 983 1022 )} 984 1023 … … 1328 1367 className="digiblocks-social-icon-remove" 1329 1368 onClick={() => removeSocialIcon(index)} 1330 icon="no-alt"1331 1369 isSmall 1332 1370 label={__('Remove', 'digiblocks')} 1333 /> 1371 > 1372 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640" width="13" height="13" fill="currentColor"><path d="M135.5 169C126.1 159.6 126.1 144.4 135.5 135.1C144.9 125.8 160.1 125.7 169.4 135.1L320.4 286.1L471.4 135.1C480.8 125.7 496 125.7 505.3 135.1C514.6 144.5 514.7 159.7 505.3 169L354.3 320L505.3 471C514.7 480.4 514.7 495.6 505.3 504.9C495.9 514.2 480.7 514.3 471.4 504.9L320.4 353.9L169.4 504.9C160 514.3 144.8 514.3 135.5 504.9C126.2 495.5 126.1 480.3 135.5 471L286.5 320L135.5 169z"/></svg> 1373 </Button> 1334 1374 )} 1335 1375 </div> -
digiblocks/trunk/blocks/social-icons/index.js
r3317829 r3346454 7 7 import SocialIconsEdit from './edit'; 8 8 import SocialIconsSave from './save'; 9 const { getBlockActiveStatus } = wp.digiBlocks; 9 10 10 11 11 /** … … 30 30 // Disable all default controls and settings panels 31 31 supports: { 32 inserter: getBlockActiveStatus('social-icons') ? true : false,33 32 html: false, 34 33 className: false, … … 106 105 ] 107 106 }, 108 iconSize: { 109 type: 'object', 110 default: { 111 desktop: 24, 112 tablet: 22, 113 mobile: 20 114 } 115 }, 116 iconSpacing: { 117 type: 'object', 118 default: { 119 desktop: 10, 120 tablet: 8, 121 mobile: 6 122 } 123 }, 124 labelSpacing: { 125 type: 'object', 126 default: { 127 desktop: 5, 128 tablet: 5, 129 mobile: 5 130 } 131 }, 107 iconWidth: { 108 type: 'object', 109 default: { 110 desktop: { value: 1, unit: 'rem' }, 111 tablet: { value: '', unit: 'rem' }, 112 mobile: { value: '', unit: 'rem' } 113 } 114 }, 115 iconHeight: { 116 type: 'object', 117 default: { 118 desktop: { value: 1, unit: 'rem' }, 119 tablet: { value: '', unit: 'rem' }, 120 mobile: { value: '', unit: 'rem' } 121 } 122 }, 123 iconSpacing: { 124 type: 'object', 125 default: { 126 desktop: { value: 0.8, unit: 'rem' }, 127 tablet: { value: '', unit: 'rem' }, 128 mobile: { value: '', unit: 'rem' } 129 } 130 }, 131 labelSpacing: { 132 type: 'object', 133 default: { 134 desktop: { value: 0.8, unit: 'rem' }, 135 tablet: { value: '', unit: 'rem' }, 136 mobile: { value: '', unit: 'rem' } 137 } 138 }, 132 139 iconColor: { 133 140 type: 'string', … … 206 213 default: { 207 214 fontFamily: '', 208 fontSize: { desktop: 1 4, tablet: 13, mobile: 12},209 fontSizeUnit: ' px',215 fontSize: { desktop: 1, tablet: '', mobile: '' }, 216 fontSizeUnit: 'rem', 210 217 fontWeight: '', 211 218 fontStyle: 'normal', 212 219 textTransform: '', 213 220 textDecoration: '', 214 lineHeight: { desktop: 1.5, tablet: 1.4, mobile: 1.3},221 lineHeight: { desktop: '', tablet: '', mobile: '' }, 215 222 lineHeightUnit: 'em', 216 letterSpacing: { desktop: 0, tablet: 0, mobile: 0},223 letterSpacing: { desktop: '', tablet: '', mobile: '' }, 217 224 letterSpacingUnit: 'px' 218 225 } … … 259 266 } 260 267 ], 261 iconSpacing: { desktop: 20},268 iconSpacing: { desktop: { value: 1.25, unit: 'rem' } }, 262 269 align: 'center', 263 270 iconColor: '#1e73be', -
digiblocks/trunk/blocks/social-icons/styles.php
r3317829 r3346454 19 19 ]; 20 20 $icons = isset( $attrs['icons'] ) ? $attrs['icons'] : array(); 21 $iconSize = isset( $attrs['iconSize'] ) ? $attrs['iconSize'] : array( 22 'desktop' => 24, 23 'tablet' => 22, 24 'mobile' => 20 25 ); 26 $iconSpacing = isset( $attrs['iconSpacing'] ) ? $attrs['iconSpacing'] : array( 27 'desktop' => 10, 28 'tablet' => 8, 29 'mobile' => 6 21 $iconWidth = isset( $attrs['iconWidth'] ) ? $attrs['iconWidth'] : array( 22 'desktop' => array( 'value' => 1, 'unit' => 'rem' ), 23 'tablet' => array( 'value' => '', 'unit' => 'rem' ), 24 'mobile' => array( 'value' => '', 'unit' => 'rem' ), 25 ); 26 $iconHeight = isset( $attrs['iconHeight'] ) ? $attrs['iconHeight'] : array( 27 'desktop' => array( 'value' => 1, 'unit' => 'rem' ), 28 'tablet' => array( 'value' => '', 'unit' => 'rem' ), 29 'mobile' => array( 'value' => '', 'unit' => 'rem' ), 30 ); 31 $iconSpacing = isset( $attrs['iconSpacing'] ) ? $attrs['iconSpacing'] : array( 32 'desktop' => array( 'value' => 0.8, 'unit' => 'rem' ), 33 'tablet' => array( 'value' => '', 'unit' => 'rem' ), 34 'mobile' => array( 'value' => '', 'unit' => 'rem' ), 30 35 ); 31 36 $iconColor = isset( $attrs['iconColor'] ) ? $attrs['iconColor'] : '#333333'; … … 62 67 $labelColor = isset( $attrs['labelColor'] ) ? $attrs['labelColor'] : ''; 63 68 $labelHoverColor = isset( $attrs['labelHoverColor'] ) ? $attrs['labelHoverColor'] : ''; 64 $labelSpacing = isset( $attrs['labelSpacing'] ) ? $attrs['labelSpacing'] : array(65 'desktop' => 5,66 'tablet' => 5,67 'mobile' => 569 $labelSpacing = isset( $attrs['labelSpacing'] ) ? $attrs['labelSpacing'] : array( 70 'desktop' => array( 'value' => 0.8, 'unit' => 'rem' ), 71 'tablet' => array( 'value' => '', 'unit' => 'rem' ), 72 'mobile' => array( 'value' => '', 'unit' => 'rem' ), 68 73 ); 69 74 $align = isset( $attrs['align'] ) ? $attrs['align'] : [ … … 109 114 display: flex; 110 115 flex-wrap: wrap; 111 gap: <?php echo esc_attr( $iconSpacing['desktop'] ); ?>px;116 gap: <?php echo esc_attr( $iconSpacing['desktop']['value'] ? $iconSpacing['desktop']['value'] . $iconSpacing['desktop']['unit'] : '0.8rem' ); ?>; 112 117 justify-content: <?php echo esc_attr( $align['desktop'] ); ?>; 113 118 } … … 118 123 text-decoration: none; 119 124 <?php if ( $labelSpacing && isset( $labelSpacing['desktop'] ) ) : ?> 120 gap: <?php echo esc_attr( $labelSpacing['desktop'] ); ?>px;125 gap: <?php echo esc_attr( $labelSpacing['desktop']['value'] ? $labelSpacing['desktop']['value'] . $labelSpacing['desktop']['unit'] : '0.8rem' ); ?>; 121 126 <?php endif; ?> 122 127 } … … 147 152 148 153 .<?php echo esc_attr( $id ); ?> .digiblocks-social-icon-icon svg { 149 width: <?php echo esc_attr( $icon Size['desktop'] ); ?>px;150 height: <?php echo esc_attr( $icon Size['desktop'] ); ?>px;154 width: <?php echo esc_attr( $iconWidth['desktop']['value'] ? $iconWidth['desktop']['value'] . $iconWidth['desktop']['unit'] : '1rem' ); ?>; 155 height: <?php echo esc_attr( $iconHeight['desktop']['value'] ? $iconHeight['desktop']['value'] . $iconHeight['desktop']['unit'] : '1rem' ); ?>; 151 156 fill: <?php echo esc_attr( $iconColor ); ?>; 152 157 transition: all 0.3s ease; … … 234 239 @media (max-width: 991px) { 235 240 .<?php echo esc_attr( $id ); ?> { 236 gap: <?php echo esc_attr( isset( $iconSpacing['tablet'] ) ? $iconSpacing['tablet'] : $iconSpacing['desktop'] ); ?>px;241 gap: <?php echo esc_attr( $iconSpacing['tablet']['value'] ? $iconSpacing['tablet']['value'] . $iconSpacing['tablet']['unit'] : ($iconSpacing['desktop']['value'] . $iconSpacing['desktop']['unit']) ); ?>; 237 242 <?php if ( ! empty( $align['tablet'] ) ) : ?> 238 243 justify-content: <?php echo esc_attr( $align['tablet'] ); ?>; … … 242 247 <?php if ( $labelSpacing && isset( $labelSpacing['tablet'] ) ) : ?> 243 248 .<?php echo esc_attr( $id ); ?> .digiblocks-social-icon { 244 gap: <?php echo esc_attr( isset( $labelSpacing['tablet'] ) ? $labelSpacing['tablet'] : $labelSpacing['desktop'] ); ?>px;249 gap: <?php echo esc_attr( $labelSpacing['tablet']['value'] ? $labelSpacing['tablet']['value'] . $labelSpacing['tablet']['unit'] : ($labelSpacing['desktop']['value'] . $labelSpacing['desktop']['unit']) ); ?>; 245 250 } 246 251 <?php endif; ?> … … 259 264 260 265 .<?php echo esc_attr( $id ); ?> .digiblocks-social-icon-icon svg { 261 width: <?php echo esc_attr( isset( $iconSize['tablet'] ) ? $iconSize['tablet'] : $iconSize['desktop'] ); ?>px;262 height: <?php echo esc_attr( isset( $iconSize['tablet'] ) ? $iconSize['tablet'] : $iconSize['desktop'] ); ?>px;266 width: <?php echo esc_attr( $iconWidth['tablet']['value'] ? $iconWidth['tablet']['value'] . $iconWidth['tablet']['unit'] : ($iconWidth['desktop']['value'] . $iconWidth['desktop']['unit']) ); ?>; 267 height: <?php echo esc_attr( $iconHeight['tablet']['value'] ? $iconHeight['tablet']['value'] . $iconHeight['tablet']['unit'] : ($iconHeight['desktop']['value'] . $iconHeight['desktop']['unit']) ); ?>; 263 268 } 264 269 … … 281 286 @media (max-width: 767px) { 282 287 .<?php echo esc_attr( $id ); ?> { 283 gap: <?php echo esc_attr( isset( $iconSpacing['mobile'] ) ? $iconSpacing['mobile'] : (isset( $iconSpacing['tablet'] ) ? $iconSpacing['tablet'] : $iconSpacing['desktop']) ); ?>px;288 gap: <?php echo esc_attr( $iconSpacing['mobile']['value'] ? $iconSpacing['mobile']['value'] . $iconSpacing['mobile']['unit'] : ($iconSpacing['tablet']['value'] ? $iconSpacing['tablet']['value'] . $iconSpacing['tablet']['unit'] : ($iconSpacing['desktop']['value'] . $iconSpacing['desktop']['unit'])) ); ?>; 284 289 <?php if ( ! empty( $align['mobile'] ) ) : ?> 285 290 justify-content: <?php echo esc_attr( $align['mobile'] ); ?>; … … 289 294 <?php if ( $labelSpacing && isset( $labelSpacing['mobile'] ) ) : ?> 290 295 .<?php echo esc_attr( $id ); ?> .digiblocks-social-icon { 291 gap: <?php echo esc_attr( isset( $labelSpacing['mobile'] ) ? $labelSpacing['mobile'] : (isset( $labelSpacing['tablet'] ) ? $labelSpacing['tablet'] : $labelSpacing['desktop']) ); ?>px;296 gap: <?php echo esc_attr( $labelSpacing['mobile']['value'] ? $labelSpacing['mobile']['value'] . $labelSpacing['mobile']['unit'] : ($labelSpacing['tablet']['value'] ? $labelSpacing['tablet']['value'] . $labelSpacing['tablet']['unit'] : ($labelSpacing['desktop']['value'] . $labelSpacing['desktop']['unit'])) ); ?>; 292 297 } 293 298 <?php endif; ?> … … 306 311 307 312 .<?php echo esc_attr( $id ); ?> .digiblocks-social-icon-icon svg { 308 width: <?php echo esc_attr( isset( $iconSize['mobile'] ) ? $iconSize['mobile'] : (isset( $iconSize['tablet'] ) ? $iconSize['tablet'] : $iconSize['desktop']) ); ?>px;309 height: <?php echo esc_attr( isset( $iconSize['mobile'] ) ? $iconSize['mobile'] : (isset( $iconSize['tablet'] ) ? $iconSize['tablet'] : $iconSize['desktop']) ); ?>px;313 width: <?php echo esc_attr( $iconWidth['mobile']['value'] ? $iconWidth['mobile']['value'] . $iconWidth['mobile']['unit'] : ($iconWidth['tablet']['value'] ? $iconWidth['tablet']['value'] . $iconWidth['tablet']['unit'] : ($iconWidth['desktop']['value'] . $iconWidth['desktop']['unit'])) ); ?>; 314 height: <?php echo esc_attr( $iconHeight['mobile']['value'] ? $iconHeight['mobile']['value'] . $iconHeight['mobile']['unit'] : ($iconHeight['tablet']['value'] ? $iconHeight['tablet']['value'] . $iconHeight['tablet']['unit'] : ($iconHeight['desktop']['value'] . $iconHeight['desktop']['unit'])) ); ?>; 310 315 } 311 316 -
digiblocks/trunk/blocks/spacer/index.js
r3317829 r3346454 7 7 import SpacerEdit from './edit'; 8 8 import SpacerSave from './save'; 9 const { getBlockActiveStatus } = wp.digiBlocks; 9 10 10 11 11 /** … … 29 29 keywords: [__('spacer', 'digiblocks'), __('gap', 'digiblocks'), __('spacing', 'digiblocks')], 30 30 supports: { 31 inserter: getBlockActiveStatus('spacer') ? true : false,32 31 html: false, 33 32 className: false, -
digiblocks/trunk/blocks/table/edit.js
r3317829 r3346454 808 808 } 809 809 810 .${id} .digiblocks-table .digiblocks-cell-warning { 811 color: #dca236; 812 } 813 810 814 .${id} .digiblocks-table .digiblocks-cell-cross { 811 815 color: #dc3545; … … 850 854 .${id} .digiblocks-cell-controls-buttons .digiblocks-cell-control-check-button { 851 855 color: #28a745; 856 } 857 858 .${id} .digiblocks-cell-controls-buttons .digiblocks-cell-control-warning-button { 859 color: #dca236; 852 860 } 853 861 … … 990 998 clearCellControl(selectedCell.row, selectedCell.col, 'stars'); 991 999 setCellControl(selectedCell.row, selectedCell.col, 'icon', 'check'); 1000 }} 1001 /> 1002 <Button 1003 className="digiblocks-cell-control-warning-button" 1004 icon={() => ( 1005 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" width="20" height="20" fill="currentColor"><path d="M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zm0-384c13.3 0 24 10.7 24 24l0 112c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-112c0-13.3 10.7-24 24-24zM224 352a32 32 0 1 1 64 0 32 32 0 1 1 -64 0z"></path></svg> 1006 )} 1007 label={__("Add Warning", "digiblocks")} 1008 onClick={() => { 1009 // Clear existing stars control first 1010 clearCellControl(selectedCell.row, selectedCell.col, 'stars'); 1011 setCellControl(selectedCell.row, selectedCell.col, 'icon', 'warning'); 992 1012 }} 993 1013 /> … … 1085 1105 </span> 1086 1106 ); 1107 case 'warning': 1108 return ( 1109 <span className="digiblocks-cell-icon digiblocks-cell-warning"> 1110 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" width="20" height="20" fill="currentColor"><path d="M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zm0-384c13.3 0 24 10.7 24 24l0 112c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-112c0-13.3 10.7-24 24-24zM224 352a32 32 0 1 1 64 0 32 32 0 1 1 -64 0z"></path></svg> 1111 </span> 1112 ); 1087 1113 case 'cross': 1088 1114 return ( … … 1986 2012 <div {...blockProps}> 1987 2013 <div className="digiblocks-table-instructions"> 1988 <p>{__("Click on any cell to select it and add icons, checks, crosses, or star ratings.", "digiblocks")}</p>2014 <p>{__("Click on any cell to select it and add icons, checks, warnings, crosses, or star ratings.", "digiblocks")}</p> 1989 2015 </div> 1990 2016 -
digiblocks/trunk/blocks/table/index.js
r3317829 r3346454 7 7 import TableEdit from './edit'; 8 8 import TableSave from './save'; 9 const { getBlockActiveStatus } = wp.digiBlocks; 9 10 10 11 11 /** … … 29 29 keywords: [__('table', 'digiblocks'), __('comparison', 'digiblocks'), __('grid', 'digiblocks'), __('cells', 'digiblocks')], 30 30 supports: { 31 inserter: getBlockActiveStatus('table') ? true : false,32 31 html: false, 33 32 className: false, -
digiblocks/trunk/blocks/table/save.js
r3317829 r3346454 59 59 </span> 60 60 ); 61 case 'warning': 62 return ( 63 <span className="digiblocks-cell-icon digiblocks-cell-warning"> 64 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" width="20" height="20" fill="currentColor"><path d="M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zm0-384c13.3 0 24 10.7 24 24l0 112c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-112c0-13.3 10.7-24 24-24zM224 352a32 32 0 1 1 64 0 32 32 0 1 1 -64 0z"></path></svg> 65 </span> 66 ); 61 67 case 'cross': 62 68 return ( -
digiblocks/trunk/blocks/table/styles.php
r3317829 r3346454 470 470 } 471 471 472 .<?php echo esc_attr( $id ); ?> .digiblocks-table .digiblocks-cell-warning { 473 color: #dca236; 474 } 475 472 476 .<?php echo esc_attr( $id ); ?> .digiblocks-table .digiblocks-cell-cross { 473 477 color: #dc3545; -
digiblocks/trunk/blocks/team/index.js
r3317829 r3346454 7 7 import TeamEdit from './edit'; 8 8 import TeamSave from './save'; 9 const { getBlockActiveStatus } = wp.digiBlocks; 9 10 10 11 11 /** … … 29 29 keywords: [__('team', 'digiblocks'), __('members', 'digiblocks'), __('staff', 'digiblocks'), __('people', 'digiblocks')], 30 30 supports: { 31 inserter: getBlockActiveStatus('team') ? true : false,32 31 html: false, 33 32 className: false, -
digiblocks/trunk/blocks/testimonials/index.js
r3317829 r3346454 7 7 import TestimonialsEdit from './edit'; 8 8 import TestimonialsSave from './save'; 9 const { getBlockActiveStatus } = wp.digiBlocks; 9 10 10 11 11 /** … … 30 30 // Disable all default controls and settings panels 31 31 supports: { 32 inserter: getBlockActiveStatus('testimonials') ? true : false,33 32 html: false, 34 33 className: false, -
digiblocks/trunk/blocks/text/edit.js
r3317829 r3346454 557 557 } 558 558 defaults={{ 559 fontSize: { desktop: 16, tablet: 15, mobile: 14},559 fontSize: { desktop: '', tablet: '', mobile: '' }, 560 560 fontSizeUnit: 'px', 561 lineHeight: { desktop: 1.5, tablet: 1.4, mobile: 1.3},561 lineHeight: { desktop: '', tablet: '', mobile: '' }, 562 562 lineHeightUnit: 'em', 563 563 }} … … 936 936 value={content} 937 937 onChange={(value) => setAttributes({ content: value })} 938 placeholder={__("Start writing or type / to add blocks", "digiblocks")}938 placeholder={__("Start writing your content", "digiblocks")} 939 939 allowedFormats={['core/bold', 'core/italic', 'core/link', 'core/strikethrough', 'core/underline', 'core/text-color', 'core/code', 'core/superscript', 'core/subscript']} 940 940 /> -
digiblocks/trunk/blocks/text/index.js
r3317829 r3346454 7 7 import TextEdit from './edit'; 8 8 import TextSave from './save'; 9 const { getBlockActiveStatus } = wp.digiBlocks; 9 10 10 11 11 /** … … 30 30 // Disable default controls and settings panels 31 31 supports: { 32 inserter: getBlockActiveStatus('text') ? true : false,33 32 html: false, 34 33 className: false, … … 83 82 textColor: { 84 83 type: 'string', 85 default: ' #333333'84 default: '' 86 85 }, 87 86 textHoverColor: { … … 105 104 default: { 106 105 fontFamily: '', 107 fontSize: { desktop: 16, tablet: 15, mobile: 14},106 fontSize: { desktop: '', tablet: '', mobile: '' }, 108 107 fontSizeUnit: 'px', 109 108 fontWeight: '', … … 111 110 textTransform: '', 112 111 textDecoration: '', 113 lineHeight: { desktop: 1.5, tablet: 1.4, mobile: 1.3},112 lineHeight: { desktop: '', tablet: '', mobile: '' }, 114 113 lineHeightUnit: 'em', 115 letterSpacing: { desktop: 0, tablet: 0, mobile: 0},114 letterSpacing: { desktop: '', tablet: '', mobile: '' }, 116 115 letterSpacingUnit: 'px' 117 116 } -
digiblocks/trunk/blocks/text/styles.php
r3317829 r3346454 18 18 'mobile' => false, 19 19 ]; 20 $textColor = isset( $attrs['textColor'] ) ? $attrs['textColor'] : ' #333333';20 $textColor = isset( $attrs['textColor'] ) ? $attrs['textColor'] : ''; 21 21 $textHoverColor = isset( $attrs['textHoverColor'] ) ? $attrs['textHoverColor'] : ''; 22 22 $backgroundColor = isset( $attrs['backgroundColor'] ) ? $attrs['backgroundColor'] : ''; … … 173 173 'fontFamily' => '', 174 174 'fontSize' => array( 175 'desktop' => 16,176 'tablet' => 15,177 'mobile' => 14,175 'desktop' => '', 176 'tablet' => '', 177 'mobile' => '', 178 178 ), 179 179 'fontSizeUnit' => 'px', … … 183 183 'textDecoration' => '', 184 184 'lineHeight' => array( 185 'desktop' => 1.5,186 'tablet' => 1.4,187 'mobile' => 1.3,185 'desktop' => '', 186 'tablet' => '', 187 'mobile' => '', 188 188 ), 189 189 'lineHeightUnit' => 'em', 190 190 'letterSpacing' => array( 191 'desktop' => 0,192 'tablet' => 0,193 'mobile' => 0,191 'desktop' => '', 192 'tablet' => '', 193 'mobile' => '', 194 194 ), 195 195 'letterSpacingUnit' => 'px', … … 202 202 .<?php echo esc_attr( $id ); ?> { 203 203 text-align: <?php echo esc_attr( $align['desktop'] ); ?>; 204 <?php if ( ! empty( $textColor ) ) : ?> 204 205 color: <?php echo esc_attr( $textColor ); ?>; 206 <?php endif; ?> 205 207 206 208 <?php if ( $backgroundGradient && 'none' !== $backgroundGradient ) : ?> … … 326 328 <?php endif; ?> 327 329 328 <?php if ( isset( $typography['fontSize']['tablet']) || isset( $typography['lineHeight']['tablet']) || isset( $typography['letterSpacing']['tablet'] ) ) : ?>329 <?php if ( isset( $typography['fontSize']['tablet'] ) ) : ?>330 <?php if ( ! empty( $typography['fontSize']['tablet']) || ! empty( $typography['lineHeight']['tablet']) || ! empty( $typography['letterSpacing']['tablet'] ) ) : ?> 331 <?php if ( ! empty( $typography['fontSize']['tablet'] ) ) : ?> 330 332 font-size: <?php echo esc_attr( $typography['fontSize']['tablet'] . ( $typography['fontSizeUnit'] ?: 'px' ) ); ?>; 331 333 <?php endif; ?> 332 <?php if ( isset( $typography['lineHeight']['tablet'] ) ) : ?>334 <?php if ( ! empty( $typography['lineHeight']['tablet'] ) ) : ?> 333 335 line-height: <?php echo esc_attr( $typography['lineHeight']['tablet'] . ( $typography['lineHeightUnit'] ?: 'em' ) ); ?>; 334 336 <?php endif; ?> 335 <?php if ( isset( $typography['letterSpacing']['tablet'] ) ) : ?>337 <?php if ( ! empty( $typography['letterSpacing']['tablet'] ) ) : ?> 336 338 letter-spacing: <?php echo esc_attr( $typography['letterSpacing']['tablet'] . ( $typography['letterSpacingUnit'] ?: 'px' ) ); ?>; 337 339 <?php endif; ?> … … 369 371 <?php endif; ?> 370 372 371 <?php if ( isset( $typography['fontSize']['mobile']) || isset( $typography['lineHeight']['mobile']) || isset( $typography['letterSpacing']['mobile'] ) ) : ?>372 <?php if ( isset( $typography['fontSize']['mobile'] ) ) : ?>373 <?php if ( ! empty( $typography['fontSize']['mobile']) || ! empty( $typography['lineHeight']['mobile']) || ! empty( $typography['letterSpacing']['mobile'] ) ) : ?> 374 <?php if ( ! empty( $typography['fontSize']['mobile'] ) ) : ?> 373 375 font-size: <?php echo esc_attr( $typography['fontSize']['mobile'] . ( $typography['fontSizeUnit'] ?: 'px' ) ); ?>; 374 376 <?php endif; ?> 375 <?php if ( isset( $typography['lineHeight']['mobile'] ) ) : ?>377 <?php if ( ! empty( $typography['lineHeight']['mobile'] ) ) : ?> 376 378 line-height: <?php echo esc_attr( $typography['lineHeight']['mobile'] . ( $typography['lineHeightUnit'] ?: 'em' ) ); ?>; 377 379 <?php endif; ?> 378 <?php if ( isset( $typography['letterSpacing']['mobile'] ) ) : ?>380 <?php if ( ! empty( $typography['letterSpacing']['mobile'] ) ) : ?> 379 381 letter-spacing: <?php echo esc_attr( $typography['letterSpacing']['mobile'] . ( $typography['letterSpacingUnit'] ?: 'px' ) ); ?>; 380 382 <?php endif; ?> -
digiblocks/trunk/digiblocks.php
r3317829 r3346454 4 4 * Plugin URI: https://digiblocks.me/ 5 5 * Description: A collection of beautiful custom Gutenberg blocks for WordPress. 6 * Version: 1.0. 06 * Version: 1.0.1 7 7 * Author: DigiHold 8 8 * Author URI: https://digihold.me?utm_source=wordpress.org&utm_medium=referral&utm_campaign=plugin_directory&utm_content=digiblocks … … 26 26 // Define constants. 27 27 if ( ! defined( 'DIGIBLOCKS_VERSION' ) ) { 28 define( 'DIGIBLOCKS_VERSION', '1.0. 0' );28 define( 'DIGIBLOCKS_VERSION', '1.0.1' ); 29 29 } 30 30 if ( ! defined( 'DIGIBLOCKS_PLUGIN_DIR' ) ) { -
digiblocks/trunk/includes/class-digiblocks-blocks-data.php
r3317829 r3346454 167 167 'description' => __( 'Create beautiful pricing tables with multiple plans and features.', 'digiblocks' ), 168 168 ), 169 'row' => array( 170 'title' => __( 'Row', 'digiblocks' ), 171 'icon' => array( 172 'viewbox' => '580 512', 173 'path' => 'M264.53,48v416c0,4.4-1.8,8.4-4.7,11.3-2.9,2.9-6.9,4.7-11.3,4.7H50c-8.8,0-16-7.2-16-16,0-4.4,1.8-8.4,4.7-11.3,2.9-2.9,6.9-4.7,11.3-4.7h182.53V64H50c-8.8,0-16-7.2-16-16,0-4.4,1.8-8.4,4.7-11.3,2.9-2.9,6.9-4.7,11.3-4.7h198.53c4.4,0,8.4,1.8,11.3,4.7s4.7,6.9,4.7,11.3ZM530,448h-182.53V64h182.53c8.8,0,16-7.2,16-16,0-4.4-1.8-8.4-4.7-11.3-2.9-2.9-6.9-4.7-11.3-4.7h-198.53c-4.4,0-8.4,1.8-11.3,4.7-2.9,2.9-4.7,6.9-4.7,11.3v416c0,4.4,1.8,8.4,4.7,11.3s6.9,4.7,11.3,4.7h198.53c8.8,0,16-7.2,16-16,0-4.4-1.8-8.4-4.7-11.3s-6.9-4.7-11.3-4.7Z', 174 ), 175 'description' => __( 'Create horizontal layouts with flexible alignment and spacing controls.', 'digiblocks' ), 176 ), 169 177 'separator' => array( 170 178 'title' => __( 'Separator', 'digiblocks' ), -
digiblocks/trunk/includes/class-digiblocks.php
r3317829 r3346454 87 87 // Enqueue assets. 88 88 add_action( 'enqueue_block_editor_assets', array( $this, 'enqueue_editor_assets' ) ); 89 89 90 90 // Enqueue admin scripts. 91 91 add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_admin_scripts' ) ); … … 106 106 add_action( 'wp_trash_post', array( $this, 'clear_reusable_cache_on_delete' ), 10, 1 ); 107 107 add_action( 'untrash_post', array( $this, 'clear_reusable_cache_on_save' ), 10, 1 ); 108 109 // Allow DigiBlocks text block in excerpts 110 add_filter( 'excerpt_allowed_blocks', array( $this, 'allow_digiblocks_in_excerpts' ) ); 108 111 109 112 // Enqueue block assets on frontend … … 118 121 // Initialize conditional handlers 119 122 add_action( 'init', array( $this, 'init_conditional_handlers' ) ); 123 124 if ( wp_is_block_theme() ) { 125 // Watch for template modifications 126 add_action( 'wp_after_insert_post', array( $this, 'handle_template_modification' ), 10, 4 ); 127 add_action( 'delete_post', array( $this, 'handle_template_deletion' ), 10, 2 ); 128 } 120 129 121 130 // Custom footer … … 295 304 296 305 self::$reusable_processing_cache[ $cache_key ] = $result; 306 } 307 308 /** 309 * Allow DigiBlocks text block in excerpts 310 * 311 * @param array $allowed_blocks Array of allowed block types for excerpts 312 * @return array Modified array with DigiBlocks text block added 313 */ 314 public function allow_digiblocks_in_excerpts( $allowed_blocks ) { 315 // Add our text block to the allowed blocks list 316 $allowed_blocks[] = 'digiblocks/text'; 317 318 return $allowed_blocks; 297 319 } 298 320 … … 500 522 <div class="digiblocks-promo-product"> 501 523 <div class="digiblocks-promo-logo"> 502 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 169 3 350" width="150" height="33"><g><path d="M426.4603,249.9932V108.5933h69.6904c15.7559,0,29.624,2.8628,41.6123,8.585,11.9844,5.7256,21.3418,13.8369,28.0771,24.3408,6.7324,10.5039,10.1006,23.0283,10.1006,37.5728,0,14.6797-3.3682,27.3047-10.1006,37.875-6.7354,10.5732-16.0928,18.7197-28.0771,24.4414-11.9883,5.7256-25.8564,8.585-41.6123,8.585h-69.6904ZM474.1322,212.8252h19.998c6.7324,0,12.625-1.2783,17.6758-3.8379,5.0498-2.5566,8.9883-6.3633,11.8164-11.4131s4.2422-11.2109,4.2422-18.4824c0-7.1367-1.4141-13.1968-4.2422-18.1807-2.8281-4.9805-6.7666-8.7524-11.8164-11.312-5.0508-2.5566-10.9434-3.8379-17.6758-3.8379h-19.998v67.064Z" fill="#2c3e50"/><path d="M593.3099,249.9932V108.5933h47.6719v141.3999h-47.6719Z" fill="#2c3e50"/><path d="M737.3344,253.2256c-11.4473,0-21.9863-1.7861-31.6133-5.3535-9.6289-3.5664-17.9775-8.6514-25.0479-15.251-7.0693-6.5967-12.5586-14.4082-16.4629-23.4316-3.9072-9.0205-5.8574-18.9883-5.8574-29.8965s1.9502-20.8721,5.8574-29.896c3.9043-9.0205,9.4248-16.832,16.5645-23.4316,7.1357-6.5967,15.585-11.6816,25.3506-15.251,9.7627-3.5669,20.5029-5.353,32.2188-5.353,14.0049,0,26.4941,2.3574,37.4717,7.0698,10.9736,4.7153,20.0293,11.4478,27.1689,20.2002l-30.502,26.8657c-4.4443-5.1162-9.2607-8.9888-14.4434-11.6147-5.1855-2.626-10.9424-3.939-17.2705-3.939-5.252,0-9.999.8076-14.2412,2.4238s-7.8467,3.9736-10.8076,7.0698c-2.9629,3.0996-5.252,6.8018-6.8672,11.1104-1.6162,4.311-2.4248,9.2256-2.4248,14.7456,0,5.252.8086,10.0693,2.4248,14.4434,1.6152,4.3779,3.9043,8.1152,6.8672,11.2109,2.9609,3.0996,6.4961,5.4893,10.6055,7.1709,4.1064,1.6855,8.7178,2.5254,13.8369,2.5254,5.3848,0,10.6367-.9092,15.7559-2.7275,5.1162-1.8174,10.5703-4.9482,16.3623-9.3926l26.6641,32.7236c-8.6201,5.792-18.4512,10.2363-29.4922,13.332-11.0439,3.0967-21.75,4.6465-32.1182,4.6465ZM757.5346,229.1875v-53.7324h41.4102v59.792l-41.4102-6.0596Z" fill="#2c3e50"/><path d="M819.3461,249.9932V108.5933h47.6719v141.3999h-47.6719Z" fill="#2c3e50"/><path d="M937.7152,249.9932h-47.6719V108.5933h114.9385v35.9561h-67.2666v105.4438ZM934.4838,168.7891h62.2158v35.9561h-62.2158v-35.9561Z" fill="#2c3e50"/><path d="M1087.8012,253.2256c-21.6826,0-38.582-5.8584-50.7012-17.5742-12.1201-11.7158-18.1807-28.1445-18.1807-49.2881v-77.77h47.6719v76.356c0,10.7754,1.9512,18.417,5.8584,22.9268,3.9043,4.5137,9.1562,6.7676,15.7559,6.7676,6.7324,0,12.0195-2.2539,15.8574-6.7676,3.8379-4.5098,5.7568-12.1514,5.7568-22.9268v-76.356h46.8643v77.77c0,21.1436-6.0605,37.5723-18.1807,49.2881s-29.0215,17.5742-50.7021,17.5742Z" fill="#2c3e50"/><path d="M1231.2211,253.2256c-11.8516,0-23.2998-1.3477-34.3398-4.04-11.0439-2.6924-20.1338-6.1924-27.2705-10.5039l15.3516-34.7441c6.7324,3.9072,14.2412,7.0381,22.5234,9.3926,8.2822,2.3584,16.3271,3.5352,24.1387,3.5352,4.5771,0,8.1816-.3027,10.8076-.9092,2.626-.6055,4.5449-1.4795,5.7568-2.626,1.2119-1.1426,1.8184-2.5244,1.8184-4.1406,0-2.5566-1.4141-4.5762-4.2422-6.0596-2.8281-1.4805-6.5654-2.7275-11.2109-3.7373-4.6465-1.0098-9.7314-2.0869-15.251-3.2324-5.5234-1.1426-11.0791-2.6572-16.665-4.5449-5.5898-1.8838-10.7061-4.374-15.3525-7.4736-4.6455-3.0967-8.3828-7.1709-11.2109-12.2217-2.8281-5.0498-4.2422-11.3433-4.2422-18.8867,0-8.7524,2.4561-16.7314,7.373-23.937,4.915-7.2026,12.2529-12.9595,22.0186-17.271,9.7617-4.3081,21.917-6.4639,36.4609-6.4639,9.5605,0,18.9883,1.0098,28.2803,3.0298s17.6396,5.1196,25.0479,9.292l-14.3428,34.542c-7.0029-3.5-13.7705-6.1265-20.3008-7.8779-6.5332-1.7485-12.8965-2.626-19.0889-2.626-4.5801,0-8.2158.4038-10.9082,1.2119-2.6953.8081-4.6143,1.8877-5.7568,3.2319-1.1455,1.3477-1.7168,2.8281-1.7168,4.4443,0,2.4238,1.4141,4.3428,4.2422,5.7568s6.5645,2.5942,11.2109,3.5352c4.6455.9434,9.7617,1.9536,15.3516,3.0298,5.5869,1.0796,11.1416,2.5596,16.665,4.4438,5.5205,1.8877,10.6055,4.3779,15.251,7.4741,4.6465,3.1001,8.3828,7.1401,11.2109,12.1206,2.8281,4.9834,4.2422,11.1787,4.2422,18.584,0,8.6191-2.459,16.5322-7.373,23.7344-4.917,7.2061-12.2207,12.998-21.917,17.3721-9.6963,4.375-21.8857,6.5654-36.5615,6.5654Z" fill="#2c3e50"/><path d="M1311.2123,249.9932V108.5933h47.6719v141.3999h-47.6719Z" fill="#2c3e50"/><path d="M1456.2465,253.2256c-11.583,0-22.2539-1.8184-32.0166-5.4541-9.7656-3.6357-18.2148-8.7871-25.3506-15.4531-7.1396-6.666-12.6953-14.5088-16.665-23.5332-3.9736-9.0205-5.959-18.8516-5.959-29.4922,0-10.772,1.9854-20.6353,5.959-29.5928,3.9697-8.9541,9.5254-16.7661,16.665-23.4321,7.1357-6.666,15.585-11.8169,25.3506-15.4531,9.7627-3.6357,20.3672-5.4536,31.8154-5.4536,11.5801,0,22.2197,1.8179,31.916,5.4536,9.6953,3.6362,18.1104,8.7871,25.25,15.4531,7.1357,6.666,12.6904,14.478,16.6641,23.4321,3.9707,8.9575,5.96,18.8208,5.96,29.5928,0,10.6406-1.9893,20.4717-5.96,29.4922-3.9736,9.0244-9.5283,16.8672-16.6641,23.5332-7.1396,6.666-15.5547,11.8174-25.25,15.4531-9.6963,3.6357-20.2695,5.4541-31.7148,5.4541ZM1456.0453,214.6436c4.4434,0,8.585-.8086,12.4229-2.4238,3.8379-1.6162,7.2021-3.9395,10.0996-6.9697,2.8945-3.0293,5.1514-6.7314,6.7676-11.1094,1.6152-4.375,2.4238-9.3242,2.4238-14.8477,0-5.52-.8086-10.4692-2.4238-14.8467-1.6162-4.3745-3.873-8.0801-6.7676-11.1104-2.8975-3.0298-6.2617-5.3525-10.0996-6.9688s-7.9795-2.4238-12.4229-2.4238-8.585.8076-12.4238,2.4238c-3.8379,1.6162-7.2051,3.939-10.0996,6.9688-2.8975,3.0303-5.1514,6.7358-6.7666,11.1104-1.6162,4.3774-2.4248,9.3267-2.4248,14.8467,0,5.5234.8086,10.4727,2.4248,14.8477,1.6152,4.3779,3.8691,8.0801,6.7666,11.1094,2.8945,3.0303,6.2617,5.3535,10.0996,6.9697,3.8389,1.6152,7.9795,2.4238,12.4238,2.4238Z" fill="#2c3e50"/><path d="M1553.2045,249.9932V108.5933h39.1885l71.9121,86.0522h-18.1807v-86.0522h46.46v141.3999h-39.1875l-71.9121-86.0518h18.1797v86.0518h-46.46Z" fill="#2c3e50"/></g><g><circle cx="175.4613" cy="175" r="175" fill="#e74c3c"/><polygon points="246.7033 149.4986 176.332 149.4986 211.4184 53.5342 104.2193 200.5014 174.5906 200.5014 139.5043 296.4658 246.7033 149.4986" fill="#ffd83b"/></g></svg>524 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1694 350" width="150" height="33"><path d="M426.999,249.9932V108.5933h69.6904c15.7559,0,29.624,2.8628,41.6123,8.585,11.9844,5.7256,21.3418,13.8369,28.0771,24.3408,6.7324,10.5039,10.1006,23.0283,10.1006,37.5728,0,14.6797-3.3682,27.3047-10.1006,37.875-6.7354,10.5732-16.0928,18.7197-28.0771,24.4414-11.9883,5.7256-25.8564,8.585-41.6123,8.585h-69.6904ZM474.6709,212.8252h19.998c6.7324,0,12.625-1.2783,17.6758-3.8379,5.0498-2.5566,8.9883-6.3633,11.8164-11.4131s4.2422-11.2109,4.2422-18.4824c0-7.1367-1.4141-13.1968-4.2422-18.1807-2.8281-4.9805-6.7666-8.7524-11.8164-11.312-5.0508-2.5566-10.9434-3.8379-17.6758-3.8379h-19.998v67.064Z" fill="#27293b"></path><path d="M593.8486,249.9932V108.5933h47.6719v141.3999h-47.6719Z" fill="#27293b"></path><path d="M737.873,253.2256c-11.4473,0-21.9863-1.7861-31.6133-5.3535-9.6289-3.5664-17.9775-8.6514-25.0479-15.251-7.0693-6.5967-12.5586-14.4082-16.4629-23.4316-3.9072-9.0205-5.8574-18.9883-5.8574-29.8965s1.9502-20.8721,5.8574-29.896c3.9043-9.0205,9.4248-16.832,16.5645-23.4316,7.1357-6.5967,15.585-11.6816,25.3506-15.251,9.7627-3.5669,20.5029-5.353,32.2188-5.353,14.0049,0,26.4941,2.3574,37.4717,7.0698,10.9736,4.7153,20.0293,11.4478,27.1689,20.2002l-30.502,26.8657c-4.4443-5.1162-9.2607-8.9888-14.4434-11.6147-5.1855-2.626-10.9424-3.939-17.2705-3.939-5.252,0-9.999.8076-14.2412,2.4238s-7.8467,3.9736-10.8076,7.0698c-2.9629,3.0996-5.252,6.8018-6.8672,11.1104-1.6162,4.311-2.4248,9.2256-2.4248,14.7456,0,5.252.8086,10.0693,2.4248,14.4434,1.6152,4.3779,3.9043,8.1152,6.8672,11.2109,2.9609,3.0996,6.4961,5.4893,10.6055,7.1709,4.1064,1.6855,8.7178,2.5254,13.8369,2.5254,5.3848,0,10.6367-.9092,15.7559-2.7275,5.1162-1.8174,10.5703-4.9482,16.3623-9.3926l26.6641,32.7236c-8.6201,5.792-18.4512,10.2363-29.4922,13.332-11.0439,3.0967-21.75,4.6465-32.1182,4.6465ZM758.0732,229.1875v-53.7324h41.4102v59.792l-41.4102-6.0596Z" fill="#27293b"></path><path d="M819.8848,249.9932V108.5933h47.6719v141.3999h-47.6719Z" fill="#27293b"></path><path d="M938.2539,249.9932h-47.6719V108.5933h114.9385v35.9561h-67.2666v105.4438ZM935.0225,168.7891h62.2158v35.9561h-62.2158v-35.9561Z" fill="#27293b"></path><path d="M1088.3398,253.2256c-21.6826,0-38.582-5.8584-50.7012-17.5742-12.1201-11.7158-18.1807-28.1445-18.1807-49.2881v-77.77h47.6719v76.356c0,10.7754,1.9512,18.417,5.8584,22.9268,3.9043,4.5137,9.1562,6.7676,15.7559,6.7676,6.7324,0,12.0195-2.2539,15.8574-6.7676,3.8379-4.5098,5.7568-12.1514,5.7568-22.9268v-76.356h46.8643v77.77c0,21.1436-6.0605,37.5723-18.1807,49.2881s-29.0215,17.5742-50.7021,17.5742Z" fill="#27293b"></path><path d="M1231.7598,253.2256c-11.8516,0-23.2998-1.3477-34.3398-4.04-11.0439-2.6924-20.1338-6.1924-27.2705-10.5039l15.3516-34.7441c6.7324,3.9072,14.2412,7.0381,22.5234,9.3926,8.2822,2.3584,16.3271,3.5352,24.1387,3.5352,4.5771,0,8.1816-.3027,10.8076-.9092,2.626-.6055,4.5449-1.4795,5.7568-2.626,1.2119-1.1426,1.8184-2.5244,1.8184-4.1406,0-2.5566-1.4141-4.5762-4.2422-6.0596-2.8281-1.4805-6.5654-2.7275-11.2109-3.7373-4.6465-1.0098-9.7314-2.0869-15.251-3.2324-5.5234-1.1426-11.0791-2.6572-16.665-4.5449-5.5898-1.8838-10.7061-4.374-15.3525-7.4736-4.6455-3.0967-8.3828-7.1709-11.2109-12.2217-2.8281-5.0498-4.2422-11.3433-4.2422-18.8867,0-8.7524,2.4561-16.7314,7.373-23.937,4.915-7.2026,12.2529-12.9595,22.0186-17.271,9.7617-4.3081,21.917-6.4639,36.4609-6.4639,9.5605,0,18.9883,1.0098,28.2803,3.0298s17.6396,5.1196,25.0479,9.292l-14.3428,34.542c-7.0029-3.5-13.7705-6.1265-20.3008-7.8779-6.5332-1.7485-12.8965-2.626-19.0889-2.626-4.5801,0-8.2158.4038-10.9082,1.2119-2.6953.8081-4.6143,1.8877-5.7568,3.2319-1.1455,1.3477-1.7168,2.8281-1.7168,4.4443,0,2.4238,1.4141,4.3428,4.2422,5.7568s6.5645,2.5942,11.2109,3.5352c4.6455.9434,9.7617,1.9536,15.3516,3.0298,5.5869,1.0796,11.1416,2.5596,16.665,4.4438,5.5205,1.8877,10.6055,4.3779,15.251,7.4741,4.6465,3.1001,8.3828,7.1401,11.2109,12.1206,2.8281,4.9834,4.2422,11.1787,4.2422,18.584,0,8.6191-2.459,16.5322-7.373,23.7344-4.917,7.2061-12.2207,12.998-21.917,17.3721-9.6963,4.375-21.8857,6.5654-36.5615,6.5654Z" fill="#27293b"></path><path d="M1311.751,249.9932V108.5933h47.6719v141.3999h-47.6719Z" fill="#27293b"></path><path d="M1456.7852,253.2256c-11.583,0-22.2539-1.8184-32.0166-5.4541-9.7656-3.6357-18.2148-8.7871-25.3506-15.4531-7.1396-6.666-12.6953-14.5088-16.665-23.5332-3.9736-9.0205-5.959-18.8516-5.959-29.4922,0-10.772,1.9854-20.6353,5.959-29.5928,3.9697-8.9541,9.5254-16.7661,16.665-23.4321,7.1357-6.666,15.585-11.8169,25.3506-15.4531,9.7627-3.6357,20.3672-5.4536,31.8154-5.4536,11.5801,0,22.2197,1.8179,31.916,5.4536,9.6953,3.6362,18.1104,8.7871,25.25,15.4531,7.1357,6.666,12.6904,14.478,16.6641,23.4321,3.9707,8.9575,5.96,18.8208,5.96,29.5928,0,10.6406-1.9893,20.4717-5.96,29.4922-3.9736,9.0244-9.5283,16.8672-16.6641,23.5332-7.1396,6.666-15.5547,11.8174-25.25,15.4531-9.6963,3.6357-20.2695,5.4541-31.7148,5.4541ZM1456.584,214.6436c4.4434,0,8.585-.8086,12.4229-2.4238,3.8379-1.6162,7.2021-3.9395,10.0996-6.9697,2.8945-3.0293,5.1514-6.7314,6.7676-11.1094,1.6152-4.375,2.4238-9.3242,2.4238-14.8477,0-5.52-.8086-10.4692-2.4238-14.8467-1.6162-4.3745-3.873-8.0801-6.7676-11.1104-2.8975-3.0298-6.2617-5.3525-10.0996-6.9688s-7.9795-2.4238-12.4229-2.4238-8.585.8076-12.4238,2.4238c-3.8379,1.6162-7.2051,3.939-10.0996,6.9688-2.8975,3.0303-5.1514,6.7358-6.7666,11.1104-1.6162,4.3774-2.4248,9.3267-2.4248,14.8467,0,5.5234.8086,10.4727,2.4248,14.8477,1.6152,4.3779,3.8691,8.0801,6.7666,11.1094,2.8945,3.0303,6.2617,5.3535,10.0996,6.9697,3.8389,1.6152,7.9795,2.4238,12.4238,2.4238Z" fill="#27293b"></path><path d="M1553.7432,249.9932V108.5933h39.1885l71.9121,86.0522h-18.1807v-86.0522h46.46v141.3999h-39.1875l-71.9121-86.0518h18.1797v86.0518h-46.46Z" fill="#27293b"></path><path d="M51.8626,51.2563c68.4318-68.3418,179.3817-68.3418,247.8136,0,68.4318,68.3418,68.4318,179.1456,0,247.4874-68.4318,68.3418-179.3817,68.3418-247.8136,0-68.4318-68.3418-68.4318-179.1456,0-247.4874Z" fill="#7091e6" fill-rule="evenodd"></path><path d="M195.6852,296.4658c11.0519-18.2927,12.0703-38.0499,3.0552-59.2724-2.507,11.3857-7.0929,18.2957-13.7581,20.7313,6.1895-19.7839,1.0175-41.1579-15.5162-64.1223-.3568,23.7179-5.4493,40.9952-15.2779,51.8324-13.5398,14.9145-13.3804,31.7468.4775,50.4962-57.5269-34.264-65.6429-80.2189-24.349-137.8632,2.5612,13.9258,8.7676,22.4755,18.6201,25.6492-10.7393-51.0064.56-94.4673,33.8976-130.3828.2049,79.7044,22.0426,86.7888,49.653,122.3671,29.8109,42.6957,12.2922,91.9676-36.8022,120.5645h0Z" fill="#f8faff" fill-rule="evenodd"></path></svg> 503 525 </div> 504 526 <div class="digiblocks-promo-content"> … … 1015 1037 1016 1038 $post_ids_to_check = array(); 1039 $template_content_to_check = array(); 1017 1040 1018 1041 // Get post IDs to check based on current page type … … 1031 1054 } 1032 1055 1056 // Check for block theme templates and template parts 1057 $current_template_content = $this->get_current_template_content(); 1058 if ( ! empty( $current_template_content ) ) { 1059 $template_content_to_check[] = $current_template_content; 1060 } 1061 1033 1062 // Add active builder posts if DigiStore Builder is active 1034 1063 if ( class_exists( 'DigiStore_Builder' ) ) { … … 1042 1071 $post_ids_to_check = array_unique( array_filter( $post_ids_to_check ) ); 1043 1072 1044 if ( empty( $post_ids_to_check ) ) {1045 return;1046 }1047 1048 1073 // Track what we've enqueued to avoid duplicates 1049 1074 static $enqueued_posts = array(); 1075 static $enqueued_templates = array(); 1050 1076 static $global_assets_enqueued = false; 1051 1077 … … 1122 1148 } 1123 1149 1150 // Process template content 1151 foreach ( $template_content_to_check as $index => $template_content ) { 1152 $template_key = 'template_' . $index; 1153 1154 // Skip if already processed 1155 if ( isset( $enqueued_templates[ $template_key ] ) ) { 1156 continue; 1157 } 1158 1159 // Check if template contains DigiBlocks 1160 if ( false === strpos( $template_content, '<!-- wp:digiblocks/' ) && false === strpos( $template_content, '<!-- wp:block ' ) ) { 1161 $enqueued_templates[ $template_key ] = false; 1162 continue; 1163 } 1164 1165 // Generate a unique identifier for this template content 1166 $template_hash = substr( md5( $template_content ), 0, 6 ); 1167 $css_file = DIGIBLOCKS_ASSETS_DIR . '/digiblocks-template-' . $template_hash . '.css'; 1168 $js_file = DIGIBLOCKS_ASSETS_DIR . '/digiblocks-template-' . $template_hash . '.js'; 1169 1170 // Generate assets if they don't exist 1171 if ( ! file_exists( $css_file ) || ! file_exists( $js_file ) ) { 1172 $this->generate_template_assets( $template_content, $template_hash ); 1173 } 1174 1175 // Final check after potential generation 1176 $has_css = file_exists( $css_file ); 1177 $has_js = file_exists( $js_file ); 1178 1179 // Skip if still no assets 1180 if ( ! $has_css && ! $has_js ) { 1181 $enqueued_templates[ $template_key ] = false; 1182 continue; 1183 } 1184 1185 $has_any_digiblocks = true; 1186 1187 // Enqueue CSS 1188 if ( $has_css ) { 1189 wp_enqueue_style( 1190 'digiblocks-template-' . $template_hash, 1191 DIGIBLOCKS_ASSETS_URL . '/digiblocks-template-' . $template_hash . '.css', 1192 array(), 1193 filemtime( $css_file ) 1194 ); 1195 } 1196 1197 // Enqueue JS and add script data 1198 if ( $has_js ) { 1199 wp_enqueue_script( 1200 'digiblocks-template-' . $template_hash, 1201 DIGIBLOCKS_ASSETS_URL . '/digiblocks-template-' . $template_hash . '.js', 1202 array(), 1203 filemtime( $js_file ), 1204 true 1205 ); 1206 1207 $blocks = parse_blocks( $template_content ); 1208 $this->enqueue_consolidated_script_data( 'digiblocks-template-' . $template_hash, $blocks ); 1209 $all_blocks_for_global_assets = array_merge( $all_blocks_for_global_assets, $blocks ); 1210 } 1211 1212 // Mark as processed 1213 $enqueued_templates[ $template_key ] = true; 1214 } 1215 1124 1216 // Enqueue global assets only once per page if any DigiBlocks were found 1125 1217 if ( $has_any_digiblocks && ! $global_assets_enqueued && ! empty( $all_blocks_for_global_assets ) ) { … … 1310 1402 $consolidated_data = apply_filters( 'digiblocks_consolidated_script_data', $consolidated_data, $blocks, $script_handle ); 1311 1403 1312 // NEW:Check if DigiFusion Builder is active and needs to add data1404 // Check if DigiFusion Builder is active and needs to add data 1313 1405 $builder_data = $this->get_digifusion_builder_data(); 1314 1406 if ( ! empty( $builder_data ) ) { … … 1506 1598 */ 1507 1599 public function enqueue_editor_assets() { 1508 // Style for editor.1509 wp_enqueue_style(1510 'digiblocks-editor',1511 DIGIBLOCKS_PLUGIN_URL . 'assets/css/blocks/editor.css',1512 array( 'wp-edit-blocks' ),1513 DIGIBLOCKS_VERSION1514 );1515 1516 1600 // First enqueue the globals script 1517 1601 wp_enqueue_script( … … 1531 1615 ); 1532 1616 1533 // Enqueue editor scripts. 1534 wp_enqueue_script( 1535 'digiblocks-blocks-editor', 1536 DIGIBLOCKS_PLUGIN_URL . 'assets/js/blocks/index.js', 1537 array( 1538 'wp-blocks', 1539 'wp-i18n', 1540 'wp-element', 1541 'wp-editor', 1542 'wp-components', 1543 'wp-data', 1544 'wp-block-editor', 1545 'digiblocks-globals', 1546 ), 1547 DIGIBLOCKS_VERSION, 1548 true 1617 // Enqueue individual block scripts with dependencies 1618 $this->enqueue_block_scripts(); 1619 1620 // Style for editor. 1621 wp_enqueue_style( 1622 'digiblocks-editor', 1623 DIGIBLOCKS_PLUGIN_URL . 'assets/css/blocks/editor.css', 1624 array( 'wp-edit-blocks' ), 1625 DIGIBLOCKS_VERSION 1549 1626 ); 1550 1627 … … 1588 1665 ) 1589 1666 ); 1667 } 1668 1669 /** 1670 * Enqueue block scripts with proper dependencies 1671 */ 1672 private function enqueue_block_scripts() { 1673 $build_dir = DIGIBLOCKS_PLUGIN_DIR . 'assets/js/blocks/'; 1674 1675 if ( is_dir( $build_dir ) ) { 1676 $block_folders = array_filter( glob( $build_dir . '*' ), 'is_dir' ); 1677 1678 foreach ( $block_folders as $block_folder ) { 1679 $block_name = basename( $block_folder ); 1680 $inactive_blocks = get_option( 'digiblocks_inactive_blocks', array() ); 1681 1682 if ( ! isset( $inactive_blocks[ $block_name ] ) || ! $inactive_blocks[ $block_name ] ) { 1683 $script_path = $block_folder . '/index.js'; 1684 $script_handle = 'digiblocks-' . $block_name; 1685 1686 if ( file_exists( $script_path ) && ! wp_script_is( $script_handle, 'enqueued' ) ) { 1687 wp_enqueue_script( 1688 $script_handle, 1689 DIGIBLOCKS_PLUGIN_URL . 'assets/js/blocks/' . $block_name . '/index.js', 1690 array( 'digiblocks-globals' ), 1691 DIGIBLOCKS_VERSION, 1692 true 1693 ); 1694 } 1695 } 1696 } 1697 } 1590 1698 } 1591 1699 … … 1997 2105 // Increase execution time for large sites 1998 2106 set_time_limit( 300 ); 1999 2107 2000 2108 // Clear reusable block cache before regeneration 2001 2109 $this->clear_reusable_block_cache(); 2002 2110 2003 2111 $regenerated = array( 2004 2112 'posts' => 0, 2005 2113 'builders' => 0, 2114 'templates' => 0, 2006 2115 'css_files' => 0, 2007 2116 'js_files' => 0, … … 2009 2118 'errors' => array(), 2010 2119 ); 2011 2120 2012 2121 try { 2013 2122 // Get all public post types … … 2026 2135 'suppress_filters' => false, 2027 2136 ) ); 2028 2137 2029 2138 // Process each post 2030 2139 foreach ( $posts as $post ) { … … 2034 2143 continue; 2035 2144 } 2036 2145 2037 2146 $content = $post->post_content; 2038 2147 2039 2148 // Check if content has any DigiBlocks blocks (including Pro blocks) 2040 2149 if ( false === strpos( $content, '<!-- wp:digiblocks/' ) && false === strpos( $content, '<!-- wp:block ' ) ) { … … 2043 2152 continue; 2044 2153 } 2045 2154 2046 2155 // Use the existing generate_block_assets method which now works with Pro blocks 2047 2156 $this->generate_block_assets( $post->ID, $post ); 2048 2157 2049 2158 // Check if files were actually created 2050 2159 $css_file = DIGIBLOCKS_ASSETS_DIR . '/digiblocks-' . $post->ID . '.css'; 2051 2160 $js_file = DIGIBLOCKS_ASSETS_DIR . '/digiblocks-' . $post->ID . '.js'; 2052 2161 2053 2162 if ( file_exists( $css_file ) ) { 2054 2163 $regenerated['css_files']++; 2055 2164 } 2056 2165 2057 2166 if ( file_exists( $js_file ) ) { 2058 2167 $regenerated['js_files']++; 2059 2168 } 2060 2169 2061 2170 // Process fonts if the fonts manager exists 2062 2171 if ( class_exists( 'DigiBlocks_Fonts' ) ) { … … 2065 2174 $regenerated['font_files']++; 2066 2175 } 2067 2176 2068 2177 // Track if this was a builder or regular post 2069 2178 if ( $post->post_type === 'digi_builder' ) { … … 2072 2181 $regenerated['posts']++; 2073 2182 } 2074 2183 2075 2184 } catch ( Exception $e ) { 2076 2185 $regenerated['errors'][] = sprintf( … … 2091 2200 } 2092 2201 } 2093 2202 2203 // Process block theme templates 2204 if ( wp_is_block_theme() ) { 2205 try { 2206 $template_content = $this->get_current_template_content(); 2207 2208 if ( ! empty( $template_content ) && 2209 ( false !== strpos( $template_content, '<!-- wp:digiblocks/' ) || false !== strpos( $template_content, '<!-- wp:block ' ) ) ) { 2210 2211 $template_hash = substr( md5( $template_content ), 0, 6 ); 2212 $this->generate_template_assets( $template_content, $template_hash ); 2213 2214 // Check if template files were created 2215 $template_css_file = DIGIBLOCKS_ASSETS_DIR . '/digiblocks-template-' . $template_hash . '.css'; 2216 $template_js_file = DIGIBLOCKS_ASSETS_DIR . '/digiblocks-template-' . $template_hash . '.js'; 2217 2218 if ( file_exists( $template_css_file ) ) { 2219 $regenerated['css_files']++; 2220 } 2221 2222 if ( file_exists( $template_js_file ) ) { 2223 $regenerated['js_files']++; 2224 } 2225 2226 $regenerated['templates']++; 2227 } 2228 } catch ( Exception $e ) { 2229 $regenerated['errors'][] = 'Error processing template: ' . $e->getMessage(); 2230 } catch ( Error $e ) { 2231 $regenerated['errors'][] = 'Fatal error processing template: ' . $e->getMessage(); 2232 } 2233 } 2234 2094 2235 // Clean up orphaned files 2095 2236 $this->cleanup_orphaned_assets(); 2096 2237 2097 2238 // Clear builder cache if DigiFusion Builder exists 2098 2239 if ( class_exists( 'DigiFusion_Builder' ) ) { 2099 2240 $this->clear_digifusion_builder_cache(); 2100 2241 } 2101 2242 2102 2243 // Regenerate all fonts if local fonts are enabled 2103 2244 $settings = get_option( 'digiblocks_settings', array() ); … … 2112 2253 } 2113 2254 } 2114 2255 2115 2256 // Create success message 2116 2257 $message_parts = array(); … … 2121 2262 $message_parts[] = sprintf( '%d builders', $regenerated['builders'] ); 2122 2263 } 2123 2124 $processed_items = ! empty( $message_parts ) ? implode( ' and ', $message_parts ) : '0 items'; 2125 2264 if ( $regenerated['templates'] > 0 ) { 2265 $message_parts[] = sprintf( '%d templates', $regenerated['templates'] ); 2266 } 2267 2268 $processed_items = ! empty( $message_parts ) ? implode( ', ', $message_parts ) : '0 items'; 2269 2126 2270 return rest_ensure_response( array( 2127 2271 'success' => true, … … 2135 2279 'details' => $regenerated, 2136 2280 ) ); 2137 2281 2138 2282 } catch ( Exception $e ) { 2139 2283 return rest_ensure_response( array( … … 2186 2330 return; 2187 2331 } 2188 2332 2189 2333 // Get all existing posts including builders 2190 2334 $post_types = get_post_types( array( 'public' => true ) ); … … 2194 2338 $post_types[] = 'digi_builder'; 2195 2339 } 2196 2340 2197 2341 $existing_posts = get_posts( array( 2198 2342 'post_type' => $post_types, … … 2201 2345 'fields' => 'ids', 2202 2346 ) ); 2203 2347 2204 2348 $existing_post_ids = array_flip( $existing_posts ); 2205 2349 2206 2350 // Get all files in the assets directory 2207 2351 $files = glob( DIGIBLOCKS_ASSETS_DIR . '/digiblocks-*.{css,js}', GLOB_BRACE ); … … 2210 2354 return; 2211 2355 } 2212 2356 2357 // Get current template content hash for comparison 2358 $current_template_content = ''; 2359 if ( wp_is_block_theme() ) { 2360 $current_template_content = $this->get_current_template_content(); 2361 } 2362 $current_template_hash = ! empty( $current_template_content ) ? md5( $current_template_content ) : ''; 2363 2213 2364 foreach ( $files as $file ) { 2214 2365 $filename = basename( $file ); 2366 $should_delete = false; 2215 2367 2216 2368 // Extract post ID from filename (digiblocks-{post_id}.css or digiblocks-{post_id}.js) 2217 if ( preg_match( '/ digiblocks-(\d+)\.(css|js)$/', $filename, $matches ) ) {2369 if ( preg_match( '/^digiblocks-(\d+)\.(css|js)$/', $filename, $matches ) ) { 2218 2370 $post_id = (int) $matches[1]; 2219 2371 2220 2372 // Delete file if post doesn't exist 2221 2373 if ( ! isset( $existing_post_ids[ $post_id ] ) ) { 2222 wp_delete_file( $file );2374 $should_delete = true; 2223 2375 } 2224 2376 } 2225 2377 2226 2378 // Handle font files (digiblocks-fonts-{post_id}.css) 2227 if ( preg_match( '/digiblocks-fonts-(\d+)\.css$/', $filename, $matches ) ) {2379 elseif ( preg_match( '/^digiblocks-fonts-(\d+)\.css$/', $filename, $matches ) ) { 2228 2380 $post_id = (int) $matches[1]; 2229 2381 2230 2382 // Delete file if post doesn't exist 2231 2383 if ( ! isset( $existing_post_ids[ $post_id ] ) ) { 2232 wp_delete_file( $file );2384 $should_delete = true; 2233 2385 } 2386 } 2387 2388 // Handle template files (digiblocks-template-{hash}.css or digiblocks-template-{hash}.js) 2389 elseif ( preg_match( '/^digiblocks-template-([a-f0-9]{32})\.(css|js)$/', $filename, $matches ) ) { 2390 $template_hash = $matches[1]; 2391 2392 // Delete template files if they don't match the current template 2393 if ( empty( $current_template_hash ) || $template_hash !== $current_template_hash ) { 2394 $should_delete = true; 2395 } 2396 } 2397 2398 // Delete the file if it should be removed 2399 if ( $should_delete ) { 2400 wp_delete_file( $file ); 2234 2401 } 2235 2402 } … … 2417 2584 default: 2418 2585 return false; 2586 } 2587 } 2588 2589 /** 2590 * Get current template content from block theme 2591 * 2592 * @return string Template content 2593 */ 2594 private function get_current_template_content() { 2595 // Only proceed if we're using a block theme 2596 if ( ! wp_is_block_theme() ) { 2597 return ''; 2598 } 2599 2600 $template_content = ''; 2601 2602 try { 2603 // Get the current template 2604 $template = get_block_template( get_stylesheet() . '//' . get_page_template_slug() ); 2605 2606 // If no specific template, try to get the current template based on the query 2607 if ( ! $template ) { 2608 $template_hierarchy = array(); 2609 2610 if ( is_front_page() && is_home() ) { 2611 $template_hierarchy[] = 'front-page'; 2612 $template_hierarchy[] = 'home'; 2613 $template_hierarchy[] = 'index'; 2614 } elseif ( is_front_page() ) { 2615 $template_hierarchy[] = 'front-page'; 2616 $template_hierarchy[] = 'page'; 2617 $template_hierarchy[] = 'index'; 2618 } elseif ( is_home() ) { 2619 $template_hierarchy[] = 'home'; 2620 $template_hierarchy[] = 'index'; 2621 } elseif ( is_singular() ) { 2622 $post_type = get_post_type(); 2623 $template_hierarchy[] = "single-{$post_type}"; 2624 $template_hierarchy[] = 'single'; 2625 $template_hierarchy[] = 'index'; 2626 } elseif ( is_category() ) { 2627 $category = get_queried_object(); 2628 $template_hierarchy[] = "category-{$category->slug}"; 2629 $template_hierarchy[] = "category-{$category->term_id}"; 2630 $template_hierarchy[] = 'category'; 2631 $template_hierarchy[] = 'archive'; 2632 $template_hierarchy[] = 'index'; 2633 } elseif ( is_tag() ) { 2634 $tag = get_queried_object(); 2635 $template_hierarchy[] = "tag-{$tag->slug}"; 2636 $template_hierarchy[] = "tag-{$tag->term_id}"; 2637 $template_hierarchy[] = 'tag'; 2638 $template_hierarchy[] = 'archive'; 2639 $template_hierarchy[] = 'index'; 2640 } elseif ( is_author() ) { 2641 $author = get_queried_object(); 2642 $template_hierarchy[] = "author-{$author->user_nicename}"; 2643 $template_hierarchy[] = "author-{$author->ID}"; 2644 $template_hierarchy[] = 'author'; 2645 $template_hierarchy[] = 'archive'; 2646 $template_hierarchy[] = 'index'; 2647 } elseif ( is_date() ) { 2648 $template_hierarchy[] = 'date'; 2649 $template_hierarchy[] = 'archive'; 2650 $template_hierarchy[] = 'index'; 2651 } elseif ( is_archive() ) { 2652 $post_type = get_post_type(); 2653 if ( $post_type ) { 2654 $template_hierarchy[] = "archive-{$post_type}"; 2655 } 2656 $template_hierarchy[] = 'archive'; 2657 $template_hierarchy[] = 'index'; 2658 } elseif ( is_search() ) { 2659 $template_hierarchy[] = 'search'; 2660 $template_hierarchy[] = 'index'; 2661 } elseif ( is_404() ) { 2662 $template_hierarchy[] = '404'; 2663 $template_hierarchy[] = 'index'; 2664 } else { 2665 $template_hierarchy[] = 'index'; 2666 } 2667 2668 // Try to get template from hierarchy 2669 foreach ( $template_hierarchy as $template_slug ) { 2670 $template = get_block_template( get_stylesheet() . '//' . $template_slug ); 2671 if ( $template ) { 2672 break; 2673 } 2674 } 2675 } 2676 2677 // Get template content 2678 if ( $template && isset( $template->content ) ) { 2679 $template_content = $template->content; 2680 } 2681 2682 // Also get template parts used in the template 2683 if ( ! empty( $template_content ) ) { 2684 $template_content .= $this->get_template_parts_content( $template_content ); 2685 } 2686 2687 } catch ( Exception $e ) { 2688 // Silently handle errors 2689 return ''; 2690 } 2691 2692 return $template_content; 2693 } 2694 2695 /** 2696 * Get content from template parts referenced in template 2697 * 2698 * @param string $template_content Template content to scan 2699 * @return string Combined template parts content 2700 */ 2701 private function get_template_parts_content( $template_content ) { 2702 $template_parts_content = ''; 2703 2704 // Parse blocks to find template parts 2705 $blocks = parse_blocks( $template_content ); 2706 $template_parts_content .= $this->extract_template_parts_content( $blocks ); 2707 2708 return $template_parts_content; 2709 } 2710 2711 /** 2712 * Recursively extract template parts content 2713 * 2714 * @param array $blocks Array of parsed blocks 2715 * @return string Combined template parts content 2716 */ 2717 private function extract_template_parts_content( $blocks ) { 2718 $content = ''; 2719 2720 foreach ( $blocks as $block ) { 2721 // Check if this is a template part block 2722 if ( isset( $block['blockName'] ) && $block['blockName'] === 'core/template-part' ) { 2723 if ( isset( $block['attrs']['slug'] ) ) { 2724 $template_part_slug = $block['attrs']['slug']; 2725 $template_part_theme = isset( $block['attrs']['theme'] ) ? $block['attrs']['theme'] : get_stylesheet(); 2726 2727 // Get the template part 2728 $template_part = get_block_template( $template_part_theme . '//' . $template_part_slug, 'wp_template_part' ); 2729 2730 if ( $template_part && isset( $template_part->content ) ) { 2731 $content .= $template_part->content; 2732 2733 // Recursively get nested template parts 2734 $nested_blocks = parse_blocks( $template_part->content ); 2735 $content .= $this->extract_template_parts_content( $nested_blocks ); 2736 } 2737 } 2738 } 2739 2740 // Check inner blocks 2741 if ( ! empty( $block['innerBlocks'] ) ) { 2742 $content .= $this->extract_template_parts_content( $block['innerBlocks'] ); 2743 } 2744 } 2745 2746 return $content; 2747 } 2748 2749 /** 2750 * Generate CSS and JS files for template content 2751 * 2752 * @param string $template_content Template content 2753 * @param string $template_hash Unique hash for the template 2754 */ 2755 private function generate_template_assets( $template_content, $template_hash ) { 2756 // Extract CSS and JS from template blocks 2757 $css = $this->extract_block_css( $template_content, 'template-' . $template_hash ); 2758 $js = $this->extract_block_js( $template_content, 'template-' . $template_hash ); 2759 2760 // Generate CSS file 2761 $this->generate_template_css_file( $template_hash, $css ); 2762 2763 // Generate JS file 2764 $this->generate_template_js_file( $template_hash, $js ); 2765 } 2766 2767 /** 2768 * Generate CSS file for template 2769 * 2770 * @param string $template_hash Template hash 2771 * @param string $css CSS content 2772 */ 2773 private function generate_template_css_file( $template_hash, $css ) { 2774 // Initialize WP_Filesystem 2775 global $wp_filesystem; 2776 if ( ! is_object( $wp_filesystem ) ) { 2777 require_once ABSPATH . 'wp-admin/includes/file.php'; 2778 $filesystem_init = WP_Filesystem(); 2779 } 2780 2781 $css_file = DIGIBLOCKS_ASSETS_DIR . '/digiblocks-template-' . $template_hash . '.css'; 2782 2783 if ( empty( $css ) ) { 2784 // Clean up CSS file if it exists 2785 if ( $wp_filesystem && $wp_filesystem->exists( $css_file ) ) { 2786 $delete_result = $wp_filesystem->delete( $css_file ); 2787 } 2788 return; 2789 } 2790 2791 // Ensure digiblocks directory exists in uploads folder 2792 if ( ! file_exists( DIGIBLOCKS_ASSETS_DIR ) ) { 2793 $mkdir_result = wp_mkdir_p( DIGIBLOCKS_ASSETS_DIR ); 2794 } 2795 2796 // Direct file system access backup in case WP_Filesystem fails 2797 if ( ! $wp_filesystem || ! is_object( $wp_filesystem ) ) { 2798 if ( ! class_exists( 'WP_Filesystem_Direct' ) ) { 2799 require_once ABSPATH . 'wp-admin/includes/class-wp-filesystem-base.php'; 2800 require_once ABSPATH . 'wp-admin/includes/class-wp-filesystem-direct.php'; 2801 } 2802 $wp_filesystem_direct = new WP_Filesystem_Direct( null ); 2803 $write_result = $wp_filesystem_direct->put_contents( $css_file, $this->minify_css( $css ), FS_CHMOD_FILE ); 2804 return; 2805 } 2806 2807 // Minify CSS and write file 2808 $put_result = $wp_filesystem->put_contents( $css_file, $this->minify_css( $css ), FS_CHMOD_FILE ); 2809 } 2810 2811 /** 2812 * Generate JS file for template 2813 * 2814 * @param string $template_hash Template hash 2815 * @param string $js JS content 2816 */ 2817 private function generate_template_js_file( $template_hash, $js ) { 2818 // Initialize WP_Filesystem 2819 global $wp_filesystem; 2820 if ( ! is_object( $wp_filesystem ) ) { 2821 require_once ABSPATH . 'wp-admin/includes/file.php'; 2822 $filesystem_init = WP_Filesystem(); 2823 } 2824 2825 $js_file = DIGIBLOCKS_ASSETS_DIR . '/digiblocks-template-' . $template_hash . '.js'; 2826 2827 if ( empty( $js ) ) { 2828 // Clean up JS file if it exists 2829 if ( $wp_filesystem && $wp_filesystem->exists( $js_file ) ) { 2830 $delete_result = $wp_filesystem->delete( $js_file ); 2831 } 2832 return; 2833 } 2834 2835 // Ensure digiblocks directory exists in uploads folder 2836 if ( ! file_exists( DIGIBLOCKS_ASSETS_DIR ) ) { 2837 $mkdir_result = wp_mkdir_p( DIGIBLOCKS_ASSETS_DIR ); 2838 } 2839 2840 // Direct file system access backup in case WP_Filesystem fails 2841 if ( ! $wp_filesystem || ! is_object( $wp_filesystem ) ) { 2842 if ( ! class_exists( 'WP_Filesystem_Direct' ) ) { 2843 require_once ABSPATH . 'wp-admin/includes/class-wp-filesystem-base.php'; 2844 require_once ABSPATH . 'wp-admin/includes/class-wp-filesystem-direct.php'; 2845 } 2846 $wp_filesystem_direct = new WP_Filesystem_Direct( null ); 2847 $write_result = $wp_filesystem_direct->put_contents( $js_file, $this->minify_js( $js ), FS_CHMOD_FILE ); 2848 return; 2849 } 2850 2851 // Minify JS and write file 2852 $put_result = $wp_filesystem->put_contents( $js_file, $this->minify_js( $js ), FS_CHMOD_FILE ); 2853 } 2854 2855 /** 2856 * Handle template modification 2857 * 2858 * @param int $post_id Post ID 2859 * @param WP_Post $post Post object 2860 * @param bool $update Whether this is an update 2861 * @param WP_Post $post_before Previous post object 2862 */ 2863 public function handle_template_modification( $post_id, $post, $update, $post_before ) { 2864 // Only handle wp_template and wp_template_part post types 2865 if ( ! in_array( $post->post_type, array( 'wp_template', 'wp_template_part' ), true ) ) { 2866 return; 2867 } 2868 2869 // Skip autosaves and revisions 2870 if ( wp_is_post_autosave( $post_id ) || wp_is_post_revision( $post_id ) ) { 2871 return; 2872 } 2873 2874 // Clear any existing template assets since template content has changed 2875 $this->cleanup_template_assets(); 2876 } 2877 2878 /** 2879 * Handle template deletion 2880 * 2881 * @param int $post_id Post ID 2882 * @param WP_Post $post Post object 2883 */ 2884 public function handle_template_deletion( $post_id, $post ) { 2885 // Only handle wp_template and wp_template_part post types 2886 if ( ! in_array( $post->post_type, array( 'wp_template', 'wp_template_part' ), true ) ) { 2887 return; 2888 } 2889 2890 // Clear any existing template assets since template was deleted 2891 $this->cleanup_template_assets(); 2892 } 2893 2894 /** 2895 * Clean up template assets 2896 */ 2897 private function cleanup_template_assets() { 2898 if ( ! file_exists( DIGIBLOCKS_ASSETS_DIR ) ) { 2899 return; 2900 } 2901 2902 // Get all template files 2903 $template_files = glob( DIGIBLOCKS_ASSETS_DIR . '/digiblocks-template-*.{css,js}', GLOB_BRACE ); 2904 2905 if ( $template_files ) { 2906 foreach ( $template_files as $file ) { 2907 wp_delete_file( $file ); 2908 } 2419 2909 } 2420 2910 } -
digiblocks/trunk/includes/helpers.php
r3317829 r3346454 186 186 } 187 187 188 if ( ! function_exists( 'digiblocks_get_single_gap_css' ) ) { 189 /** 190 * Get single gap CSS for responsive design 191 * 192 * @param array $gap_values Gap values array 193 * @param string $device Current device 194 * @return string CSS gap property 195 */ 196 function digiblocks_get_single_gap_css( $gap_values, $device ) { 197 // Default gap structure 198 $default_gap = array( 199 'desktop' => array( 'value' => 20, 'unit' => 'px' ), 200 'tablet' => array( 'value' => '', 'unit' => 'px' ), 201 'mobile' => array( 'value' => '', 'unit' => 'px' ), 202 ); 203 204 // Merge with defaults 205 $gap_values = wp_parse_args( $gap_values, $default_gap ); 206 207 // Get gap value with responsive fallback 208 $gap_value = ''; 209 $gap_unit = 'px'; 210 211 // If current device has a value, use it 212 if ( isset( $gap_values[ $device ] ) && ! empty( $gap_values[ $device ]['value'] ) ) { 213 $gap_value = $gap_values[ $device ]['value']; 214 $gap_unit = isset( $gap_values[ $device ]['unit'] ) ? $gap_values[ $device ]['unit'] : 'px'; 215 } 216 // For tablet: fallback to desktop 217 elseif ( $device === 'tablet' && isset( $gap_values['desktop'] ) && ! empty( $gap_values['desktop']['value'] ) ) { 218 $gap_value = $gap_values['desktop']['value']; 219 $gap_unit = isset( $gap_values['desktop']['unit'] ) ? $gap_values['desktop']['unit'] : 'px'; 220 } 221 // For mobile: try tablet first, then desktop 222 elseif ( $device === 'mobile' ) { 223 if ( isset( $gap_values['tablet'] ) && ! empty( $gap_values['tablet']['value'] ) ) { 224 $gap_value = $gap_values['tablet']['value']; 225 $gap_unit = isset( $gap_values['tablet']['unit'] ) ? $gap_values['tablet']['unit'] : 'px'; 226 } elseif ( isset( $gap_values['desktop'] ) && ! empty( $gap_values['desktop']['value'] ) ) { 227 $gap_value = $gap_values['desktop']['value']; 228 $gap_unit = isset( $gap_values['desktop']['unit'] ) ? $gap_values['desktop']['unit'] : 'px'; 229 } 230 } 231 // Default case 232 elseif ( isset( $gap_values['desktop'] ) && ! empty( $gap_values['desktop']['value'] ) ) { 233 $gap_value = $gap_values['desktop']['value']; 234 $gap_unit = isset( $gap_values['desktop']['unit'] ) ? $gap_values['desktop']['unit'] : 'px'; 235 } 236 237 // Return gap CSS if we have a value 238 if ( ! empty( $gap_value ) || $gap_value === 0 || $gap_value === '0' ) { 239 return "gap: {$gap_value}{$gap_unit};"; 240 } 241 242 return ''; 243 } 244 } 245 188 246 /** 189 247 * Get default responsive dimension values. -
digiblocks/trunk/readme.txt
r3317839 r3346454 5 5 Tested up to: 6.8 6 6 Requires PHP: 7.4 7 Stable tag: 1.0. 07 Stable tag: 1.0.1 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 37 37 * **[Lottie Animation](https://digiblocks.me/block/lottie?utm_source=wordpress.org&utm_medium=free%20plugin%20listing&utm_campaign=digiblocks)** - Add beautiful Lottie animations to your content. 38 38 * **[Newsletter](https://digiblocks.me/block/newsletter?utm_source=wordpress.org&utm_medium=free%20plugin%20listing&utm_campaign=digiblocks)** - Add a newsletter subscription form. 39 * **[ Posts](https://digiblocks.me/block/posts?utm_source=wordpress.org&utm_medium=free%20plugin%20listing&utm_campaign=digiblocks)** - Display your WordPress posts in beautiful grid and list layouts.39 * **[Row](https://digiblocks.me/block/row?utm_source=wordpress.org&utm_medium=free%20plugin%20listing&utm_campaign=digiblocks)** - Create horizontal layouts with flexible alignment and spacing controls. 40 40 * **[Pricing Table](https://digiblocks.me/block/pricing-table?utm_source=wordpress.org&utm_medium=free%20plugin%20listing&utm_campaign=digiblocks)** - Create beautiful pricing tables with multiple plans and features. 41 41 * **[Separator](https://digiblocks.me/block/separator?utm_source=wordpress.org&utm_medium=free%20plugin%20listing&utm_campaign=digiblocks)** - Add a separator with various styles, text, and icon options. … … 49 49 = Pro Version Blocks = 50 50 51 * **[Posts](https://digiblocks.me/block/posts?utm_source=wordpress.org&utm_medium=free%20plugin%20listing&utm_campaign=digiblocks)** - Display your WordPress posts in beautiful grid and list layouts. 51 52 * **[Money Back](https://digiblocks.me/block/money-back?utm_source=wordpress.org&utm_medium=free%20plugin%20listing&utm_campaign=digiblocks)** - Add a customizable money back guarantee. 52 53 * **[Logo](https://digiblocks.me/block/logo?utm_source=wordpress.org&utm_medium=free%20plugin%20listing&utm_campaign=digiblocks)** - Add a customizable logo for your website header or footer. … … 210 211 == Changelog == 211 212 213 = 1.0.1 - August 18, 2025 = 214 * Tweak: Table block, warning icon added 215 * Tweak: Icon box block, Better settings for icon width and spacing 216 * Fixed: If the Text block was used in post content, it wasn't added in excerpt 217 212 218 = 1.0.0 - June 15, 2025 = 213 219 * Initial release -
digiblocks/trunk/resources/css/blocks/_container.css
r3317829 r3346454 1 /**2 * Editor styles for Container and Column blocks3 */4 5 1 /* Container block */ 6 2 .block-editor-block-list__block[data-type="digiblocks/container"] { -
digiblocks/trunk/resources/css/blocks/editor.css
r3317829 r3346454 9 9 /* Blocks */ 10 10 @import "_container.css"; 11 @import "_row.css"; 11 12 @import "_social-icons.css"; 12 13
Note: See TracChangeset
for help on using the changeset viewer.