Skip to content

[Feature Request] Add custom shapes #4759

@olivierchauveau

Description

@olivierchauveau

Prerequisites

  • I have searched for similar features requests in both open and closed tickets and cannot find a duplicate.
  • The feature is still missing in the latest stable version of Elementor ( Elementor Pro. )

What problem is your feature request going to solve? Please describe.
Add custom shapes to Elementor that don't be erase by next update.

Describe the solution you'd like
I would like to get a hook in shapes.php so we could add our own shapes with the functions.php child theme file for example or any other solution that can solved this issue.

Describe alternatives you've considered
I add my own custom shapes by adding my svg to /assets/shapes/ and add lines to /includes/shapes.php in order to be able to choose my custom shapes in Elementor section shape options. It works well but the svg files are always erased and the shapes.php is reinitialized when I update Elementor. I'm forced to upload again the svg and shapes.php after each uptades. And Elementor is often updated.

Additional context
The custom lines are added to shapes.php under

private static function init_shapes() {
	self::$shapes = [

Exemple of custom shape lines

'mycustomshapesvgfilename' => [
	'title' => _x( 'My custom shape displayed name', 'Shapes', 'elementor' ),
	'has_flip' => true, /* or false */
	'has_flip' => true, /* or false */
	'height_only' => true, /* or false */
],:

Metadata

Metadata

Assignees

No one assigned

    Labels

    element/settings/shape-dividerReferences the top and bottom element Shape Divider feature.request/featureIndicates a Request for a non-existing New Feature.status/mergedIndicates when a Pull Request has been merged to a Release.type/developer-apiIndicates when a topic is related to the Developer API and Documentation.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions