PluginProbe
Elementor Website Builder – more than just a page builder / 3.0.0
Elementor Website Builder – more than just a page builder v3.0.0
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 / core / kits / controls / repeater.php

repeater.php in Elementor Website Builder – more than just a page builder 3.0.0, at core/kits/controls/repeater.php

72 lines 1.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace Elementor\Core\Kits\Controls;
4
5 use Elementor\Control_Repeater;
6
7 if ( ! defined( 'ABSPATH' ) ) {
8 exit; // Exit if accessed directly
9 }
10
11 class Repeater extends Control_Repeater {
12
13 const CONTROL_TYPE = 'global-style-repeater';
14
15 /**
16 * Get control type.
17 *
18 * Retrieve the control type, in this case `global-style-repeater`.
19 *
20 * @since 3.0.0
21 * @access public
22 *
23 * @return string Control type.
24 */
25 public function get_type() {
26 return self::CONTROL_TYPE;
27 }
28
29 /**
30 * Get repeater control default settings.
31 *
32 * Retrieve the default settings of the repeater control. Used to return the
33 * default settings while initializing the repeater control.
34 *
35 * @since 3.0.0
36 * @access protected
37 *
38 * @return array Control default settings.
39 */
40 protected function get_default_settings() {
41 $settings = parent::get_default_settings();
42
43 $settings['item_actions']['duplicate'] = false;
44 $settings['item_actions']['sort'] = false;
45
46 return $settings;
47 }
48
49 /**
50 * Render repeater control output in the editor.
51 *
52 * Used to generate the control HTML in the editor using Underscore JS
53 * template. The variables for the class are available using `data` JS
54 * object.
55 *
56 * @since 3.0.0
57 * @access public
58 */
59 public function content_template() {
60 ?>
61 <div class="elementor-repeater-fields-wrapper"></div>
62 <# if ( itemActions.add ) { #>
63 <div class="elementor-button-wrapper">
64 <button class="elementor-button elementor-button-default elementor-repeater-add" type="button">
65 <i class="eicon-plus" aria-hidden="true"></i><span class="elementor-repeater__add-button__text">{{{ addButtonText }}}</span>
66 </button>
67 </div>
68 <# } #>
69 <?php
70 }
71 }
72