PluginProbe
aBlocks – Gutenberg Blocks, User Dashboard Builder, Popup Builder, Form Builder & Animation Builder / 2.14.0
aBlocks – Gutenberg Blocks, User Dashboard Builder, Popup Builder, Form Builder & Animation Builder v2.14.0
2.14.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 All 81 releases
← All changes | includes/blocks/storeengine-product-gallery/attributes.php +66 -0 2.7.5 → 2.14.0 View file →
@@ -1,0 +1,66 @@
1 +<?php
2 +
3 +use ABlocks\Controls\Typography;
4 +use ABlocks\Controls\Background;
5 +use ABlocks\Controls\Border;
6 +use ABlocks\Controls\Dimensions;
7 +use ABlocks\Controls\Range;
8 +use ABlocks\Controls\Alignment;
9 +use ABlocks\Controls\BoxShadow;
10 +
11 +if ( ! defined( 'ABSPATH' ) ) {
12 + exit;
13 +}
14 +
15 +$attributes = [
16 + 'block_id' => array(
17 + 'type' => 'string',
18 + 'default' => '',
19 + ),
20 + 'blockVersion' => array(
21 + 'type' => 'number',
22 + 'default' => 2,
23 + ),
24 + 'product_id' => array(
25 + 'type' => 'number',
26 + 'default' => 0,
27 + ),
28 + 'isCustom' => array(
29 + 'type' => 'boolean',
30 + 'default' => false,
31 + ),
32 + 'imageOpacityH' => array(
33 + 'type' => 'number',
34 + 'default' => 1,
35 + ),
36 + 'imageOpacity' => array(
37 + 'type' => 'number',
38 + 'default' => 1,
39 + ),
40 +];
41 +
42 +$attributes = array_merge(
43 + $attributes,
44 + Range::get_attribute([
45 + 'attributeName' => 'imageWidth',
46 + 'attributeObjectKey' => 'value',
47 + 'isResponsive' => true,
48 + 'defaultValue' => 100,
49 + 'hasUnit' => true,
50 + 'unitDefaultValue' => '%',
51 + ]),
52 + Range::get_attribute([
53 + 'attributeName' => 'imageHeight',
54 + 'attributeObjectKey' => 'value',
55 + 'isResponsive' => true,
56 + 'defaultValue' => 100,
57 + 'hasUnit' => true,
58 + 'unitDefaultValue' => '%',
59 + ]),
60 + Alignment::get_attribute( 'alignment', true, [ 'value' => 'left' ] ),
61 + BoxShadow::get_attribute( 'boxShadow' ),
62 + Border::get_attribute( 'border', true ),
63 +);
64 +
65 +return array_merge( $attributes, \ABlocks\Classes\BlockGlobal::get_attributes() );
66 +