PluginProbe
aBlocks – Gutenberg Blocks, User Dashboard Builder, Popup Builder, Form Builder & Animation Builder / 2.13.0
aBlocks – Gutenberg Blocks, User Dashboard Builder, Popup Builder, Form Builder & Animation Builder v2.13.0
2.13.0 2.13.1 2.12.0 2.11.1 2.11.0 2.10.0 2.9.0 2.7.4 2.7.5 2.7.6 2.7.7 2.8.0 2.8.1 2.9.1 trunk 1.0 1.0-beta1 1.0-beta2 1.0-beta3 1.0.1 1.0.2 1.0.3 1.1.0 1.1.1 1.1.2 All 80 releases
ablocks / includes / blocks / atomic-shared / attributes.php

attributes.php in aBlocks – Gutenberg Blocks, User Dashboard Builder, Popup Builder, Form Builder & Animation Builder 2.13.0, at includes/blocks/atomic-shared/attributes.php

33 lines 1.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Common attributes shared by every atomic block. Each block's attributes.php
4 * includes this and adds its own extras (tag, src, svgCode …).
5 */
6
7 if ( ! defined( 'ABSPATH' ) ) {
8 exit;
9 }
10
11 return [
12 'block_id' => [ 'type' => 'string', 'default' => '' ],
13 'blockVersion' => [ 'type' => 'number', 'default' => 3 ],
14 'globalClasses' => [ 'type' => 'array', 'default' => [] ],
15 'htmlId' => [ 'type' => 'string', 'default' => '' ],
16 // Any atomic element can be a link — that is what makes a whole card
17 // clickable — so this is shared rather than per-block.
18 'link' => [ 'type' => 'object', 'default' => [ 'url' => '', 'newTab' => false, 'noFollow' => false ] ],
19 'animation' => [ 'type' => 'object', 'default' => [ 'type' => '', 'duration' => '0.6', 'delay' => '0' ] ],
20 'animations' => [ 'type' => 'array', 'default' => [] ],
21 'transitionDuration' => [ 'type' => 'string', 'default' => '' ],
22 'alignment' => [ 'type' => 'object', 'default' => [ 'value' => '', 'valueTablet' => '', 'valueMobile' => '' ] ],
23 // Buckets are created on demand as controls are touched, so the default is
24 // just the schema marker — see StyleBuckets for the shape. These defaults
25 // back-fill attributes a saved block omitted (AssetsGenerator), so the
26 // marker has to be here or the styles would read as an unreadable schema.
27 'styles' => [ 'type' => 'object', 'default' => \ABlocks\Classes\StyleBuckets::empty_styles() ],
28 // Shared "Advanced" tab: free-form CSS (with a `selector` placeholder) and
29 // per-device visibility. Consumed by AtomicBlockBase::build_css().
30 'customCSS' => [ 'type' => 'string', 'default' => '' ],
31 'hideOn' => [ 'type' => 'object', 'default' => [ 'desktop' => false, 'tablet' => false, 'mobile' => false ] ],
32 ];
33