Skip to content

Add Custom Shapes Filter Not Working Properly #6550

@sajadko

Description

@sajadko

Prerequisites

  • I have searched for similar issues in both open and closed tickets and cannot find a duplicate.
  • The issue still exists against the latest stable version of Elementor.

Description

i have read this :
#4759

when i use your filter hook , shape item name display correct but when i use it i get an error in console about not found svg on this address ( Jquery Error ) :

GET http://localhost/test/wp-content/plugins/elementor/assets/shapes/madona.svg 404 (Not Found)

Code :

define("THEMEURLL", get_template_directory_uri());
add_filter( 'elementor/shapes/additional_shapes', function( $additional_shapes ) {
	$additional_shapes['madona'] = [
		'title' => _x( 'My custom shape displayed name', 'Shapes', 'elementor' ),
		'has_flip' => true,
		'height_only' => true,
		'path' => THEMEURLL.'/includes/elementor/shapes/', //could be in your theme/child/plugin
	];

	return $additional_shapes;
});

Environment

System Info ``` ```

last version of Wordpress

last stable version of Elementor

Default Wordpress Theme (and other themes also checked)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIndicates a bug with one or multiple components.element/settings/shape-dividerReferences the top and bottom element Shape Divider feature.status/mergedIndicates when a Pull Request has been merged to a Release.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions