PluginProbe
Elementor Website Builder – more than just a page builder / 3.2.3
Elementor Website Builder – more than just a page builder v3.2.3
4.3.0-beta2 4.3.0-beta1 4.2.4 4.2.3 4.2.2 4.2.1 4.2.0 4.1.5 4.2.0-beta2 4.2.0-dev2 4.2.0-beta1 4.1.4 4.1.3 4.1.2 4.1.1 4.1.0 4.1.0-beta3 4.1.0-dev3 4.0.9 4.1.0-beta2 4.1.0-dev2 4.0.8 4.1.0-beta1 4.1.0-dev1 4.0.7 All 451 releases
elementor / modules / shapes / module.php

module.php in Elementor Website Builder – more than just a page builder 3.2.3, at modules/shapes/module.php

68 lines 1.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace Elementor\Modules\Shapes;
4
5 if ( ! defined( 'ABSPATH' ) ) {
6 exit; // Exit if accessed directly
7 }
8
9 class Module extends \Elementor\Core\Base\Module {
10
11 /**
12 * @param bool $add_custom Determine if the output should include the `Custom` option.
13 *
14 * @return array List of paths.
15 */
16 public static function get_paths( $add_custom = true ) {
17 $paths = [
18 'wave' => __( 'Wave', 'elementor' ),
19 'arc' => __( 'Arc', 'elementor' ),
20 'circle' => __( 'Circle', 'elementor' ),
21 'line' => __( 'Line', 'elementor' ),
22 'oval' => __( 'Oval', 'elementor' ),
23 'spiral' => __( 'Spiral', 'elementor' ),
24 ];
25
26 if ( $add_custom ) {
27 $paths['custom'] = __( 'Custom', 'elementor' );
28 }
29
30 return $paths;
31 }
32
33 /**
34 * @param $path string Path name.
35 *
36 * @return string The path SVG markup.
37 */
38 public static function get_path_svg( $path ) {
39 $file_name = ELEMENTOR_ASSETS_PATH . 'svg-paths/' . $path . '.svg';
40
41 if ( ! is_file( $file_name ) ) {
42 return '';
43 }
44
45 return file_get_contents( $file_name );
46 }
47
48 /**
49 * Get the module's associated widgets.
50 *
51 * @return string[]
52 */
53 protected function get_widgets() {
54 return [
55 'TextPath',
56 ];
57 }
58
59 /**
60 * Retrieve the module name.
61 *
62 * @return string
63 */
64 public function get_name() {
65 return 'shapes';
66 }
67 }
68