| @@ -134,14 +134,12 @@ | ||
| 134 | 134 | private static function init_shapes() { |
| 135 | 135 | $native_shapes = [ |
| 136 | 136 | 'mountains' => [ |
| 137 | 137 | 'title' => esc_html_x( 'Mountains', 'Shapes', 'elementor' ), |
| 138 | - 'image' => ELEMENTOR_ASSETS_URL . 'shapes/mountains.svg', | |
| 139 | 138 | 'has_flip' => true, |
| 140 | 139 | ], |
| 141 | 140 | 'drops' => [ |
| 142 | 141 | 'title' => esc_html_x( 'Drops', 'Shapes', 'elementor' ), |
| 143 | - 'image' => ELEMENTOR_ASSETS_URL . 'shapes/drops.svg', | |
| 144 | 142 | 'has_negative' => true, |
| 145 | 143 | 'has_flip' => true, |
| 146 | 144 | 'height_only' => true, |
| 147 | 145 | ], |
| @@ -146,9 +144,8 @@ | ||
| 146 | 144 | 'height_only' => true, |
| 147 | 145 | ], |
| 148 | 146 | 'clouds' => [ |
| 149 | 147 | 'title' => esc_html_x( 'Clouds', 'Shapes', 'elementor' ), |
| 150 | - 'image' => ELEMENTOR_ASSETS_URL . 'shapes/clouds.svg', | |
| 151 | 148 | 'has_negative' => true, |
| 152 | 149 | 'has_flip' => true, |
| 153 | 150 | 'height_only' => true, |
| 154 | 151 | ], |
| @@ -153,82 +150,67 @@ | ||
| 153 | 150 | 'height_only' => true, |
| 154 | 151 | ], |
| 155 | 152 | 'zigzag' => [ |
| 156 | 153 | 'title' => esc_html_x( 'Zigzag', 'Shapes', 'elementor' ), |
| 157 | - 'image' => ELEMENTOR_ASSETS_URL . 'shapes/zigzag.svg', | |
| 158 | 154 | ], |
| 159 | 155 | 'pyramids' => [ |
| 160 | 156 | 'title' => esc_html_x( 'Pyramids', 'Shapes', 'elementor' ), |
| 161 | - 'image' => ELEMENTOR_ASSETS_URL . 'shapes/pyramids.svg', | |
| 162 | 157 | 'has_negative' => true, |
| 163 | 158 | 'has_flip' => true, |
| 164 | 159 | ], |
| 165 | 160 | 'triangle' => [ |
| 166 | 161 | 'title' => esc_html_x( 'Triangle', 'Shapes', 'elementor' ), |
| 167 | - 'image' => ELEMENTOR_ASSETS_URL . 'shapes/triangle.svg', | |
| 168 | 162 | 'has_negative' => true, |
| 169 | 163 | ], |
| 170 | 164 | 'triangle-asymmetrical' => [ |
| 171 | 165 | 'title' => esc_html_x( 'Triangle Asymmetrical', 'Shapes', 'elementor' ), |
| 172 | - 'image' => ELEMENTOR_ASSETS_URL . 'shapes/triangle-asymmetrical.svg', | |
| 173 | 166 | 'has_negative' => true, |
| 174 | 167 | 'has_flip' => true, |
| 175 | 168 | ], |
| 176 | 169 | 'tilt' => [ |
| 177 | 170 | 'title' => esc_html_x( 'Tilt', 'Shapes', 'elementor' ), |
| 178 | - 'image' => ELEMENTOR_ASSETS_URL . 'shapes/tilt.svg', | |
| 179 | 171 | 'has_flip' => true, |
| 180 | 172 | 'height_only' => true, |
| 181 | 173 | ], |
| 182 | 174 | 'opacity-tilt' => [ |
| 183 | 175 | 'title' => esc_html_x( 'Tilt Opacity', 'Shapes', 'elementor' ), |
| 184 | - 'image' => ELEMENTOR_ASSETS_URL . 'shapes/opacity-tilt.svg', | |
| 185 | 176 | 'has_flip' => true, |
| 186 | 177 | ], |
| 187 | 178 | 'opacity-fan' => [ |
| 188 | 179 | 'title' => esc_html_x( 'Fan Opacity', 'Shapes', 'elementor' ), |
| 189 | - 'image' => ELEMENTOR_ASSETS_URL . 'shapes/opacity-fan.svg', | |
| 190 | 180 | ], |
| 191 | 181 | 'curve' => [ |
| 192 | 182 | 'title' => esc_html_x( 'Curve', 'Shapes', 'elementor' ), |
| 193 | - 'image' => ELEMENTOR_ASSETS_URL . 'shapes/curve.svg', | |
| 194 | 183 | 'has_negative' => true, |
| 195 | 184 | ], |
| 196 | 185 | 'curve-asymmetrical' => [ |
| 197 | 186 | 'title' => esc_html_x( 'Curve Asymmetrical', 'Shapes', 'elementor' ), |
| 198 | - 'image' => ELEMENTOR_ASSETS_URL . 'shapes/curve-asymmetrical.svg', | |
| 199 | 187 | 'has_negative' => true, |
| 200 | 188 | 'has_flip' => true, |
| 201 | 189 | ], |
| 202 | 190 | 'waves' => [ |
| 203 | 191 | 'title' => esc_html_x( 'Waves', 'Shapes', 'elementor' ), |
| 204 | - 'image' => ELEMENTOR_ASSETS_URL . 'shapes/waves.svg', | |
| 205 | 192 | 'has_negative' => true, |
| 206 | 193 | 'has_flip' => true, |
| 207 | 194 | ], |
| 208 | 195 | 'wave-brush' => [ |
| 209 | 196 | 'title' => esc_html_x( 'Waves Brush', 'Shapes', 'elementor' ), |
| 210 | - 'image' => ELEMENTOR_ASSETS_URL . 'shapes/wave-brush.svg', | |
| 211 | 197 | 'has_flip' => true, |
| 212 | 198 | ], |
| 213 | 199 | 'waves-pattern' => [ |
| 214 | 200 | 'title' => esc_html_x( 'Waves Pattern', 'Shapes', 'elementor' ), |
| 215 | - 'image' => ELEMENTOR_ASSETS_URL . 'shapes/waves-pattern.svg', | |
| 216 | 201 | 'has_flip' => true, |
| 217 | 202 | ], |
| 218 | - 'book' => [ | |
| 219 | - 'title' => esc_html_x( 'Book', 'Shapes', 'elementor' ), | |
| 220 | - 'image' => ELEMENTOR_ASSETS_URL . 'shapes/book.svg', | |
| 203 | + 'arrow' => [ | |
| 204 | + 'title' => esc_html_x( 'Arrow', 'Shapes', 'elementor' ), | |
| 221 | 205 | 'has_negative' => true, |
| 222 | 206 | ], |
| 223 | 207 | 'split' => [ |
| 224 | 208 | 'title' => esc_html_x( 'Split', 'Shapes', 'elementor' ), |
| 225 | - 'image' => ELEMENTOR_ASSETS_URL . 'shapes/split.svg', | |
| 226 | 209 | 'has_negative' => true, |
| 227 | 210 | ], |
| 228 | - 'arrow' => [ | |
| 229 | - 'title' => esc_html_x( 'Arrow', 'Shapes', 'elementor' ), | |
| 230 | - 'image' => ELEMENTOR_ASSETS_URL . 'shapes/arrow.svg', | |
| 211 | + 'book' => [ | |
| 212 | + 'title' => esc_html_x( 'Book', 'Shapes', 'elementor' ), | |
| 231 | 213 | 'has_negative' => true, |
| 232 | 214 | ], |
| 233 | 215 | ]; |
| 234 | 216 | |
| @@ -249,11 +231,9 @@ | ||
| 249 | 231 | |
| 250 | 232 | if ( null !== $additional_shapes ) { |
| 251 | 233 | return $additional_shapes; |
| 252 | 234 | } |
| 253 | - | |
| 254 | 235 | $additional_shapes = []; |
| 255 | - | |
| 256 | 236 | /** |
| 257 | 237 | * Additional shapes. |
| 258 | 238 | * |
| 259 | 239 | * Filters the shapes used by Elementor to add additional shapes. |
| @@ -262,16 +242,8 @@ | ||
| 262 | 242 | * |
| 263 | 243 | * @param array $additional_shapes Additional Elementor shapes. |
| 264 | 244 | */ |
| 265 | 245 | $additional_shapes = apply_filters( 'elementor/shapes/additional_shapes', $additional_shapes ); |
| 266 | - | |
| 267 | - // BC for addons that add additional shapes the old way using `url` instead of `image`. | |
| 268 | - foreach ( $additional_shapes as $shape_name => $shape_settings ) { | |
| 269 | - if ( ! isset( $shape_settings['image'] ) && isset( $shape_settings['url'] ) ) { | |
| 270 | - $additional_shapes[ $shape_name ]['image'] = $shape_settings['url']; | |
| 271 | - } | |
| 272 | - } | |
| 273 | - | |
| 274 | 246 | return $additional_shapes; |
| 275 | 247 | } |
| 276 | 248 | |
| 277 | 249 | /** |