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/controls/gsap-animation.php +16 -58 2.10.0 → 2.14.0 View file →
@@ -72,67 +72,25 @@
72 72 ]
73 73 ];
74 74 }
75 75
76 + /**
77 + * GSAP animations are driven entirely by the frontend script (see the
78 + * gsap view scripts) — this control contributes no CSS.
79 + *
80 + * The body used to compile a mask-image rule from `mask*` members and then
81 + * throw the result away with an unconditional `return []`. Since the control
82 + * declares no mask members at all, every one of those reads was an
83 + * "Undefined array key" notice on any page carrying a GSAP animation. Dead
84 + * code that could only emit warnings, so it is gone; masking lives in the
85 + * Mask control.
86 + *
87 + * @param mixed $attribute_value Stored control value.
88 + * @param string $property Unused.
89 + * @param string $device Unused.
90 + * @return array Always empty.
91 + */
76 92 public static function get_css( $attribute_value, $property = '', $device = '' ) {
77 - $default_attar_value = self::get_attribute_default_value( (bool) $device );
78 - $value = wp_parse_args( $attribute_value, $default_attar_value );
79 -
80 - $css = [];
81 -
82 - /**
83 - * Generated CSS
84 - * css property
85 - * mask-image
86 - * mask-size
87 - * mask-position
88 - * mask-repeat
89 - */
90 -
91 - if ( $value['mask'] ) {
92 - if ( 'custom' === $value['maskShape'] ) {
93 - $css['mask-image'] = 'url(' . $value['customMaskShape'] . ')';
94 - } else {
95 - $css['mask-image'] = 'url(' . ABLOCKS_ROOT_URL . '/assets/images/mask-shapes/' . $value['maskShape'] . '.svg)';
96 - }
97 - $css['mask-size'] = 'contain';
98 - $css['mask-position'] = 'center center';
99 - $css['mask-repeat'] = 'no-repeat';
100 - }
101 -
102 - if ( $value[ 'maskSize' . $device ] && 'custom' !== $value[ 'maskSize' . $device ] ) {
103 - $css['mask-size'] = $value[ 'maskSize' . $device ];
104 - }
105 -
106 - if (
107 - $value[ 'maskSize' . $device ] &&
108 - 'custom' === $value[ 'maskSize' . $device ] &&
109 - $value[ 'scaleUnit' . $device ]
110 - ) {
111 - $css['mask-size'] = $value[ 'scale' . $device ] . $value[ 'scaleUnit' . $device ];
112 - }
113 -
114 - if (
115 - 'custom' === $value[ 'maskPosition' . $device ] &&
116 - $value[ 'xPosition' . $device ] &&
117 - $value[ 'xPositionUnit' . $device ]
118 - ) {
119 - $css['-webkit-mask-position-x'] = $value[ 'xPosition' . $device ] . $value[ 'xPositionUnit' . $device ];
120 - $css['-webkit-mask-position-y'] = $value[ 'yPosition' . $device ] . $value[ 'yPositionUnit' . $device ];
121 - }
122 -
123 - if (
124 - 'custom' === $value[ 'maskPosition' . $device ] &&
125 - $value[ 'yPosition' . $device ] &&
126 - $value[ 'yPositionUnit' . $device ]
127 - ) {
128 - $css['-webkit-mask-position-y'] = $value[ 'yPosition' . $device ] . $value[ 'yPositionUnit' . $device ];
129 - }
130 -
131 - if ( $value[ 'maskRepeat' . $device ] ) {
132 - $css['mask-repeat'] = $value[ 'maskRepeat' . $device ];
133 - }
134 -
135 93 return [];
136 94 }
137 95
138 96