| 1 |
<?php |
| 2 |
|
| 3 |
if ( ! defined( 'ABSPATH' ) ) { |
| 4 |
exit; |
| 5 |
} |
| 6 |
|
| 7 |
$attributes = [ |
| 8 |
'block_id' => [ 'type' => 'string', 'default' => '' ], |
| 9 |
'blockVersion' => [ 'type' => 'number', 'default' => 3 ], |
| 10 |
'tag' => [ 'type' => 'string', 'default' => 'p' ], |
| 11 |
'content' => [ 'type' => 'string', 'default' => '' ], |
| 12 |
'globalClasses' => [ 'type' => 'array', 'default' => [] ], |
| 13 |
'htmlId' => [ 'type' => 'string', 'default' => '' ], |
| 14 |
'link' => [ 'type' => 'object', 'default' => [ 'url' => '', 'newTab' => false, 'noFollow' => false ] ], |
| 15 |
'animation' => [ 'type' => 'object', 'default' => [ 'type' => '', 'duration' => '0.6', 'delay' => '0' ] ], |
| 16 |
// Multiple interactions/animations. Each: {id, trigger, effect, type, |
| 17 |
// direction, duration(ms), delay(ms), easing, off:{deviceId:true}}. |
| 18 |
'animations' => [ 'type' => 'array', 'default' => [] ], |
| 19 |
'transitionDuration' => [ 'type' => 'string', 'default' => '' ], |
| 20 |
'alignment' => [ |
| 21 |
'type' => 'object', |
| 22 |
'default' => [ 'value' => '', 'valueTablet' => '', 'valueMobile' => '' ], |
| 23 |
], |
| 24 |
// Style buckets (breakpoint × state) are created on demand as controls are |
| 25 |
// touched — see StyleBuckets for the shape — so the default is just the |
| 26 |
// schema marker. These defaults back-fill attributes a saved block omitted |
| 27 |
// (AssetsGenerator), so the marker has to be here or the styles would read |
| 28 |
// as an unreadable schema. |
| 29 |
'styles' => [ 'type' => 'object', 'default' => \ABlocks\Classes\StyleBuckets::empty_styles() ], |
| 30 |
// Shared "Advanced" tab (see AtomicBlockBase::build_css). |
| 31 |
'customCSS' => [ 'type' => 'string', 'default' => '' ], |
| 32 |
'hideOn' => [ 'type' => 'object', 'default' => [ 'desktop' => false, 'tablet' => false, 'mobile' => false ] ], |
| 33 |
]; |
| 34 |
|
| 35 |
return $attributes; |
| 36 |
|