diff --git a/src/addons/addon-example.md b/src/addons/addon-example.md index 162f05c2..e4fd959a 100644 --- a/src/addons/addon-example.md +++ b/src/addons/addon-example.md @@ -160,7 +160,7 @@ final class Plugin { * @since 1.0.0 * @access public */ - public function is_compatible() { + public function is_compatible(): void { // Check if Elementor installed and activated if ( ! did_action( 'elementor/loaded' ) ) { @@ -192,7 +192,7 @@ final class Plugin { * @since 1.0.0 * @access public */ - public function admin_notice_missing_main_plugin() { + public function admin_notice_missing_main_plugin(): void { if ( isset( $_GET['activate'] ) ) unset( $_GET['activate'] ); @@ -215,7 +215,7 @@ final class Plugin { * @since 1.0.0 * @access public */ - public function admin_notice_minimum_elementor_version() { + public function admin_notice_minimum_elementor_version(): void { if ( isset( $_GET['activate'] ) ) unset( $_GET['activate'] ); @@ -239,7 +239,7 @@ final class Plugin { * @since 1.0.0 * @access public */ - public function admin_notice_minimum_php_version() { + public function admin_notice_minimum_php_version(): void { if ( isset( $_GET['activate'] ) ) unset( $_GET['activate'] ); @@ -265,7 +265,7 @@ final class Plugin { * @since 1.0.0 * @access public */ - public function init() { + public function init(): void { add_action( 'elementor/widgets/register', [ $this, 'register_widgets' ] ); add_action( 'elementor/controls/register', [ $this, 'register_controls' ] ); @@ -281,7 +281,7 @@ final class Plugin { * * @param \Elementor\Widgets_Manager $widgets_manager Elementor widgets manager. */ - public function register_widgets( $widgets_manager ) { + public function register_widgets( $widgets_manager ): void { require_once( __DIR__ . '/includes/widgets/widget-1.php' ); require_once( __DIR__ . '/includes/widgets/widget-2.php' ); @@ -300,7 +300,7 @@ final class Plugin { * * @param \Elementor\Controls_Manager $controls_manager Elementor controls manager. */ - public function register_controls( $controls_manager ) { + public function register_controls( $controls_manager ): void { require_once( __DIR__ . '/includes/controls/control-1.php' ); require_once( __DIR__ . '/includes/controls/control-2.php' ); diff --git a/src/addons/compatibility.md b/src/addons/compatibility.md index e596a35a..66ea4ab1 100644 --- a/src/addons/compatibility.md +++ b/src/addons/compatibility.md @@ -53,8 +53,9 @@ final class Plugin { * * @since 1.0.0 * @access public + * @return bool */ - public function is_compatible() { + public function is_compatible(): bool { // Check if Elementor is installed and activated if ( ! did_action( 'elementor/loaded' ) ) { @@ -86,7 +87,7 @@ final class Plugin { * @since 1.0.0 * @access public */ - public function admin_notice_missing_main_plugin() { + public function admin_notice_missing_main_plugin(): void { if ( isset( $_GET['activate'] ) ) unset( $_GET['activate'] ); @@ -109,7 +110,7 @@ final class Plugin { * @since 1.0.0 * @access public */ - public function admin_notice_minimum_elementor_version() { + public function admin_notice_minimum_elementor_version(): void { if ( isset( $_GET['activate'] ) ) unset( $_GET['activate'] ); @@ -133,7 +134,7 @@ final class Plugin { * @since 1.0.0 * @access public */ - public function admin_notice_minimum_php_version() { + public function admin_notice_minimum_php_version(): void { if ( isset( $_GET['activate'] ) ) unset( $_GET['activate'] ); diff --git a/src/addons/initialization.md b/src/addons/initialization.md index b340be47..1a0236d4 100644 --- a/src/addons/initialization.md +++ b/src/addons/initialization.md @@ -21,14 +21,14 @@ final class Plugin { * @since 1.0.0 * @access public */ - public function init() { + public function init(): void { add_action( 'elementor/frontend/after_enqueue_styles', [ $this, 'frontend_styles' ] ); add_action( 'elementor/frontend/after_register_scripts', [ $this, 'frontend_scripts' ] ); } - public function frontend_styles() { + public function frontend_styles(): void { wp_register_style( 'frontend-style-1', plugins_url( 'assets/css/frontend-style-1.css', __FILE__ ) ); wp_register_style( 'frontend-style-2', plugins_url( 'assets/css/frontend-style-2.css', __FILE__ ), [ 'external-framework' ] ); @@ -39,7 +39,7 @@ final class Plugin { } - public function frontend_scripts() { + public function frontend_scripts(): void { wp_register_script( 'frontend-script-1', plugins_url( 'assets/js/frontend-script-1.js', __FILE__ ) ); wp_register_script( 'frontend-script-2', plugins_url( 'assets/js/frontend-script-2.js', __FILE__ ), [ 'external-library' ] ); @@ -70,7 +70,7 @@ final class Plugin { * @since 1.0.0 * @access public */ - public function init() { + public function init(): void { add_action( 'elementor/widgets/register', [ $this, 'register_widgets' ] ); @@ -85,7 +85,7 @@ final class Plugin { * * @param \Elementor\Widgets_Manager $widgets_manager Elementor widgets manager. */ - public function register_widgets( $widgets_manager ) { + public function register_widgets( $widgets_manager ): void { require_once( __DIR__ . '/includes/widgets/widget-1.php' ); require_once( __DIR__ . '/includes/widgets/widget-2.php' ); @@ -115,7 +115,7 @@ final class Plugin { * @since 1.0.0 * @access public */ - public function init() { + public function init(): void { add_action( 'elementor/controls/register', [ $this, 'register_controls' ] ); @@ -130,7 +130,7 @@ final class Plugin { * * @param \Elementor\Controls_Manager $controls_manager Elementor controls manager. */ - public function register_controls( $controls_manager ) { + public function register_controls( $controls_manager ): void { require_once( __DIR__ . '/includes/controls/control-1.php' ); require_once( __DIR__ . '/includes/controls/control-2.php' ); diff --git a/src/addons/main-class.md b/src/addons/main-class.md index a842ba15..7dd7fa44 100644 --- a/src/addons/main-class.md +++ b/src/addons/main-class.md @@ -15,8 +15,8 @@ final class Plugin { public static function instance() {} public function __construct() {} - public function is_compatible() {} - public function init() {} + public function is_compatible(): bool {} + public function init(): void {} } ``` @@ -94,7 +94,7 @@ final class Plugin { * @since 1.0.0 * @access public */ - public function is_compatible() { + public function is_compatible(): bool { // Compatibility checks here... @@ -110,7 +110,7 @@ final class Plugin { * @since 1.0.0 * @access public */ - public function init() { + public function init(): void { // Addon functionality here... diff --git a/src/controls/complex-example.md b/src/controls/complex-example.md index bd985fd0..73c5cffc 100644 --- a/src/controls/complex-example.md +++ b/src/controls/complex-example.md @@ -106,7 +106,7 @@ class Elementor_EmojiOneArea_Control extends \Elementor\Base_Data_Control { * @access public * @return string Control type. */ - public function get_type() { + public function get_type(): string { return 'emojionearea'; } @@ -119,7 +119,7 @@ class Elementor_EmojiOneArea_Control extends \Elementor\Base_Data_Control { * @since 1.0.0 * @access public */ - public function enqueue() { + public function enqueue(): void { // Styles wp_register_style( 'emojionearea', 'https://cdnjs.cloudflare.com/ajax/libs/emojionearea/3.4.2/emojionearea.css', [], '3.4.2' ); wp_enqueue_style( 'emojionearea' ); @@ -140,7 +140,7 @@ class Elementor_EmojiOneArea_Control extends \Elementor\Base_Data_Control { * @access protected * @return array Control default settings. */ - protected function get_default_settings() { + protected function get_default_settings(): array { return [ 'label_block' => true, 'rows' => 3, @@ -158,7 +158,7 @@ class Elementor_EmojiOneArea_Control extends \Elementor\Base_Data_Control { * @since 1.0.0 * @access public */ - public function content_template() { + public function content_template(): void { $control_uid = $this->get_control_uid(); ?>
@@ -245,7 +245,7 @@ class Elementor_Test_Widget extends \Elementor\Widget_Base { * @access public * @return string Widget name. */ - public function get_name() { + public function get_name(): string { return 'test'; } @@ -258,7 +258,7 @@ class Elementor_Test_Widget extends \Elementor\Widget_Base { * @access public * @return string Widget title. */ - public function get_title() { + public function get_title(): string { return esc_html__( 'Test', 'elementor-emojionearea-control' ); } @@ -271,7 +271,7 @@ class Elementor_Test_Widget extends \Elementor\Widget_Base { * @access public * @return string Widget icon. */ - public function get_icon() { + public function get_icon(): string { return 'eicon-code'; } @@ -284,7 +284,7 @@ class Elementor_Test_Widget extends \Elementor\Widget_Base { * @access public * @return array Widget categories. */ - public function get_categories() { + public function get_categories(): array { return [ 'general' ]; } @@ -297,7 +297,7 @@ class Elementor_Test_Widget extends \Elementor\Widget_Base { * @access public * @return array Widget keywords. */ - public function get_keywords() { + public function get_keywords(): array { return [ 'test', 'emoji' ]; } @@ -310,7 +310,7 @@ class Elementor_Test_Widget extends \Elementor\Widget_Base { * @access public * @return string Widget help URL. */ - public function get_custom_help_url() { + public function get_custom_help_url(): string { return 'https://developers.elementor.com/docs/widgets/'; } @@ -322,7 +322,7 @@ class Elementor_Test_Widget extends \Elementor\Widget_Base { * @since 1.0.0 * @access protected */ - protected function register_controls() { + protected function register_controls(): void { $this->start_controls_section( 'content_section', @@ -353,7 +353,7 @@ class Elementor_Test_Widget extends \Elementor\Widget_Base { * @since 1.0.0 * @access protected */ - protected function render() { + protected function render(): void { $settings = $this->get_settings_for_display(); if ( empty( $settings['content'] ) ) { diff --git a/src/controls/control-enqueue.md b/src/controls/control-enqueue.md index 788ba229..da37ae2d 100644 --- a/src/controls/control-enqueue.md +++ b/src/controls/control-enqueue.md @@ -11,7 +11,7 @@ If you need to use an external library or some custom JS/CSS, you can do that by ```php class Elementor_Test_Control extends \Elementor\Base_Control { - protected function enqueue() { + protected function enqueue(): void { // Styles wp_register_style( 'control-style', plugins_url( 'assets/css/control-style.css', __FILE__ ) ); diff --git a/src/controls/control-settings.md b/src/controls/control-settings.md index 856856e9..f373b3bc 100644 --- a/src/controls/control-settings.md +++ b/src/controls/control-settings.md @@ -25,7 +25,7 @@ If a control uses the default settings, you don't need to add it to your class. ```php class Elementor_Test_Control extends \Elementor\Base_Control { - protected function get_default_settings() { + protected function get_default_settings(): array { return [ 'label_block' => true, diff --git a/src/controls/control-structure.md b/src/controls/control-structure.md index 35de2fe8..606aeb51 100644 --- a/src/controls/control-structure.md +++ b/src/controls/control-structure.md @@ -31,9 +31,9 @@ A simple control only requires two methods, the control type and the template: ```php class Elementor_Test_Control extends \Elementor\Base_Control { - public function get_type() {} + public function get_type(): string {} - public function content_template() {} + public function content_template(): void {} } ``` @@ -43,15 +43,15 @@ More advanced controls can use other available methods: ```php class Elementor_Test_Control extends \Elementor\Base_Control { - public function get_type() {} + public function get_type(): string {} - protected function get_default_settings() {} + protected function get_default_settings(): array {} - public function get_default_value() {} + public function get_default_value(): string {} - public function content_template() {} + public function content_template(): void {} - public function enqueue() {} + public function enqueue(): void {} } ``` diff --git a/src/controls/control-template.md b/src/controls/control-template.md index 35a39570..0ea2eecc 100644 --- a/src/controls/control-template.md +++ b/src/controls/control-template.md @@ -13,7 +13,7 @@ With JS templates we don’t need to retrieve data using a special function, Ele get_control_uid(); ?> diff --git a/src/controls/control-values.md b/src/controls/control-values.md index 44527511..6db20408 100644 --- a/src/controls/control-values.md +++ b/src/controls/control-values.md @@ -13,17 +13,17 @@ The following will set a default value for a [data control](./../editor-controls ```php class Elementor_Test_Control extends \Elementor\Base_Data_Control { - public function get_type() { + public function get_type(): string { return 'continents-control'; } - protected function get_default_settings() { + protected function get_default_settings(): array { return [ 'continents' => [ 'Asia', 'Africa', 'Europe', 'North America', 'South America', 'Australia/Oceania', 'Antarctica', ] ]; } - public function get_default_value() { + public function get_default_value(): string { return 'Europe'; } @@ -38,7 +38,7 @@ When controls are used in widgets, you can either use the default value set by t start_controls_section( 'section_content', diff --git a/src/controls/simple-example.md b/src/controls/simple-example.md index 6ec0e1f3..75b43fce 100644 --- a/src/controls/simple-example.md +++ b/src/controls/simple-example.md @@ -103,7 +103,7 @@ class Elementor_Currency_Control extends \Elementor\Base_Data_Control { * @access public * @return string Control type. */ - public function get_type() { + public function get_type(): string { return 'currency'; } @@ -117,7 +117,7 @@ class Elementor_Currency_Control extends \Elementor\Base_Data_Control { * @static * @return array Available currencies. */ - public static function get_currencies() { + public static function get_currencies(): array { return [ 'USD' => 'USD ($)', 'EUR' => 'EUR (€)', @@ -137,7 +137,7 @@ class Elementor_Currency_Control extends \Elementor\Base_Data_Control { * @access protected * @return array Currency control default settings. */ - protected function get_default_settings() { + protected function get_default_settings(): array { return [ 'currencies' => self::get_currencies() ]; @@ -153,7 +153,7 @@ class Elementor_Currency_Control extends \Elementor\Base_Data_Control { * @access public * @return array Currency control default value. */ - public function get_default_value() { + public function get_default_value(): string { return 'EUR'; } @@ -167,7 +167,7 @@ class Elementor_Currency_Control extends \Elementor\Base_Data_Control { * @since 1.0.0 * @access public */ - public function content_template() { + public function content_template(): void { $control_uid = $this->get_control_uid(); ?>
@@ -222,7 +222,7 @@ class Elementor_Currency_Widget extends \Elementor\Widget_Base { * @access public * @return string Widget name. */ - public function get_name() { + public function get_name(): string { return 'currency'; } @@ -235,7 +235,7 @@ class Elementor_Currency_Widget extends \Elementor\Widget_Base { * @access public * @return string Widget title. */ - public function get_title() { + public function get_title(): string { return esc_html__( 'Currency', 'elementor-currency-control' ); } @@ -248,7 +248,7 @@ class Elementor_Currency_Widget extends \Elementor\Widget_Base { * @access public * @return string Widget icon. */ - public function get_icon() { + public function get_icon(): string { return 'eicon-cart-medium'; } @@ -261,7 +261,7 @@ class Elementor_Currency_Widget extends \Elementor\Widget_Base { * @access public * @return array Widget categories. */ - public function get_categories() { + public function get_categories(): array { return [ 'general' ]; } @@ -274,7 +274,7 @@ class Elementor_Currency_Widget extends \Elementor\Widget_Base { * @access public * @return array Widget keywords. */ - public function get_keywords() { + public function get_keywords(): array { return [ 'currency', 'currencies' ]; } @@ -287,7 +287,7 @@ class Elementor_Currency_Widget extends \Elementor\Widget_Base { * @access public * @return string Widget help URL. */ - public function get_custom_help_url() { + public function get_custom_help_url(): string { return 'https://developers.elementor.com/docs/widgets/'; } @@ -299,7 +299,7 @@ class Elementor_Currency_Widget extends \Elementor\Widget_Base { * @since 1.0.0 * @access protected */ - protected function register_controls() { + protected function register_controls(): void { $this->start_controls_section( 'content_section', @@ -338,7 +338,7 @@ class Elementor_Currency_Widget extends \Elementor\Widget_Base { * @since 1.0.0 * @access protected */ - protected function render() { + protected function render(): void { $settings = $this->get_settings_for_display(); if ( empty( $settings['price_currency'] ) ) { diff --git a/src/deprecations/deprecated-action-hook.md b/src/deprecations/deprecated-action-hook.md index cb21ba46..22d14dae 100644 --- a/src/deprecations/deprecated-action-hook.md +++ b/src/deprecations/deprecated-action-hook.md @@ -19,7 +19,7 @@ For example, take the following code: ```php class Name { - function init( $args ) { + function init( $args ): void { do_action( 'elementor/old/action', $args ); } @@ -33,7 +33,7 @@ use Elementor\Plugin; class Name { - function init( $args ) { + function init( $args ): void { // Deprecation handler Plugin::$instance->modules_manager->get_modules( 'dev-tools' )->deprecation->do_deprecated_action( 'elementor/old/action', @@ -56,7 +56,7 @@ After eight major versions, the code will look like this: ```php class Name { - function init( $args ) { + function init( $args ): void { do_action( 'elementor/new/action', $args ); } diff --git a/src/deprecations/deprecated-argument.md b/src/deprecations/deprecated-argument.md index e5de68bd..4bb7c34d 100644 --- a/src/deprecations/deprecated-argument.md +++ b/src/deprecations/deprecated-argument.md @@ -21,7 +21,7 @@ class Items_Manager { private $items; - function register( $instance, $id = null ) { + function register( $instance, $id = null ): void { $this->items[ $id ] = $instance; } @@ -39,7 +39,7 @@ class Items_Manager { private $items; - function register( $instance, $id = null ) { + function register( $instance, $id = null ): void { if ( $id ) { // TODO: Remove this in the future. Plugin::instance()->modules_manager->get_modules( 'dev-tools' )->deprecation->deprecated_argument( @@ -66,7 +66,7 @@ class Items_Manager { private $items; - function register( $instance ) { + function register( $instance ): void { $id = $instance->get_id(); $this->items[ $id ] = $instance; } diff --git a/src/deprecations/deprecated-filter-hook.md b/src/deprecations/deprecated-filter-hook.md index 0ee4c827..edbef09d 100644 --- a/src/deprecations/deprecated-filter-hook.md +++ b/src/deprecations/deprecated-filter-hook.md @@ -17,7 +17,7 @@ For example, take the following code: ```php class Name { - function init( $args ) { + function init( $args ): void { $value = apply_filters( 'elementor/old/filter', $value, $args ); } @@ -31,7 +31,7 @@ use Elementor\Plugin; class Name { - function init( $args ) { + function init( $args ): void { // Deprecation handler Plugin::$instance->modules_manager->get_modules( 'dev-tools' )->deprecation->apply_deprecated_filter( 'elementor/old/filter', @@ -54,7 +54,7 @@ After eight major versions, the code will look like this: ```php class Name { - function init( $args ) { + function init( $args ): void { $value = apply_filters( 'elementor/new/filter', $value, $args ); } diff --git a/src/deprecations/deprecated-function.md b/src/deprecations/deprecated-function.md index 79169e3d..2e18137d 100644 --- a/src/deprecations/deprecated-function.md +++ b/src/deprecations/deprecated-function.md @@ -19,7 +19,7 @@ For example, take the following code: ```php class Items { - function add_item( $item_instance ) { + function add_item( $item_instance ): void { /* ... */ } @@ -33,11 +33,11 @@ use Elementor\Plugin; class Items { - function register( $item_instance ) { + function register( $item_instance ): void { /* ... */ } - function add_item( $item_instance ) { + function add_item( $item_instance ): void { // Deprecation handler Plugin::$instance->modules_manager->get_modules( 'dev-tools' )->deprecation->deprecated_function( 'add_item()', @@ -59,7 +59,7 @@ After eight major versions, the code will look like this: ```php class Items { - function register( $item_instance ) { + function register( $item_instance ): void { /* ... */ } @@ -73,8 +73,8 @@ Addon developers who use the old `add_item()` method should simply rename the me ```diff class MyItem extends Items { -- protected function add_item() { -+ protected function register() { +- protected function add_item(): void { ++ protected function register(): void { /* ... */ } diff --git a/src/deprecations/simple-example.md b/src/deprecations/simple-example.md index 03c33c84..963cd29f 100644 --- a/src/deprecations/simple-example.md +++ b/src/deprecations/simple-example.md @@ -11,22 +11,22 @@ Addon developers should update their code, replacing deprecated methods. The fix ```diff class Elementor_Test_Widget extends \Elementor\Widget_Base { - public function get_name() {} + public function get_name(): string {} - public function get_title() {} + public function get_title(): string {} - public function get_icon() {} + public function get_icon(): string {} - public function get_categories() {} + public function get_categories(): array {} -- protected function _register_controls() {} -+ protected function register_controls() {} +- protected function _register_controls(): void {} ++ protected function register_controls(): void {} -- protected function _render() {} -+ protected function render() {} +- protected function _render(): void {} ++ protected function render(): void {} -- protected function _content_template() {} -+ protected function content_template() {} +- protected function _content_template(): void {} ++ protected function content_template(): void {} } ``` diff --git a/src/dynamic-tags/advanced-example.md b/src/dynamic-tags/advanced-example.md index 12243b41..4d510cda 100644 --- a/src/dynamic-tags/advanced-example.md +++ b/src/dynamic-tags/advanced-example.md @@ -107,7 +107,7 @@ class Elementor_Dynamic_Tag_ACF_Average extends \Elementor\Core\DynamicTags\Tag * @access public * @return string Dynamic tag name. */ - public function get_name() { + public function get_name(): string { return 'acf-average'; } @@ -120,7 +120,7 @@ class Elementor_Dynamic_Tag_ACF_Average extends \Elementor\Core\DynamicTags\Tag * @access public * @return string Dynamic tag title. */ - public function get_title() { + public function get_title(): string { return esc_html__( 'ACF Average', 'elementor-acf-average-dynamic-tag' ); } @@ -133,7 +133,7 @@ class Elementor_Dynamic_Tag_ACF_Average extends \Elementor\Core\DynamicTags\Tag * @access public * @return array Dynamic tag groups. */ - public function get_group() { + public function get_group(): array { return [ 'site' ]; } @@ -146,7 +146,7 @@ class Elementor_Dynamic_Tag_ACF_Average extends \Elementor\Core\DynamicTags\Tag * @access public * @return array Dynamic tag categories. */ - public function get_categories() { + public function get_categories(): array { return [ \Elementor\Modules\DynamicTags\Module::TEXT_CATEGORY ]; } @@ -159,7 +159,7 @@ class Elementor_Dynamic_Tag_ACF_Average extends \Elementor\Core\DynamicTags\Tag * @access protected * @return void */ - protected function register_controls() { + protected function register_controls(): void { $this->add_control( 'fields', [ @@ -178,7 +178,7 @@ class Elementor_Dynamic_Tag_ACF_Average extends \Elementor\Core\DynamicTags\Tag * @access public * @return void */ - public function render() { + public function render(): void { $fields = $this->get_settings( 'fields' ); $sum = 0; $count = 0; diff --git a/src/dynamic-tags/complex-example.md b/src/dynamic-tags/complex-example.md index 3bdb1b9f..a1a39f86 100644 --- a/src/dynamic-tags/complex-example.md +++ b/src/dynamic-tags/complex-example.md @@ -107,7 +107,7 @@ class Elementor_Dynamic_Tag_Server_Variable extends \Elementor\Core\DynamicTags\ * @access public * @return string Dynamic tag name. */ - public function get_name() { + public function get_name(): string { return 'server-variable'; } @@ -120,7 +120,7 @@ class Elementor_Dynamic_Tag_Server_Variable extends \Elementor\Core\DynamicTags\ * @access public * @return string Dynamic tag title. */ - public function get_title() { + public function get_title(): string { return esc_html__( 'Server Variable', 'textdomain' ); } @@ -133,7 +133,7 @@ class Elementor_Dynamic_Tag_Server_Variable extends \Elementor\Core\DynamicTags\ * @access public * @return array Dynamic tag groups. */ - public function get_group() { + public function get_group(): array { return [ 'request-variables' ]; } @@ -146,7 +146,7 @@ class Elementor_Dynamic_Tag_Server_Variable extends \Elementor\Core\DynamicTags\ * @access public * @return array Dynamic tag categories. */ - public function get_categories() { + public function get_categories(): array { return [ \Elementor\Modules\DynamicTags\Module::TEXT_CATEGORY ]; } @@ -159,7 +159,7 @@ class Elementor_Dynamic_Tag_Server_Variable extends \Elementor\Core\DynamicTags\ * @access protected * @return void */ - protected function register_controls() { + protected function register_controls(): void { $variables = []; foreach ( array_keys( $_SERVER ) as $variable ) { @@ -185,7 +185,7 @@ class Elementor_Dynamic_Tag_Server_Variable extends \Elementor\Core\DynamicTags\ * @access public * @return void */ - public function render() { + public function render(): void { $user_selected_variable = $this->get_settings( 'user_selected_variable' ); if ( ! $user_selected_variable ) { diff --git a/src/dynamic-tags/dynamic-tags-categories.md b/src/dynamic-tags/dynamic-tags-categories.md index 899c4c05..15c9cdaa 100644 --- a/src/dynamic-tags/dynamic-tags-categories.md +++ b/src/dynamic-tags/dynamic-tags-categories.md @@ -32,7 +32,7 @@ When creating new dynamic tags, you need to define what data type the tag will r ```php class Elementor_Test_Tag extends \Elementor\Core\DynamicTags\Tag { - public function get_categories() { + public function get_categories(): array { return [ \Elementor\Modules\DynamicTags\Module::TEXT_CATEGORY ]; } @@ -44,7 +44,7 @@ The method returns an array, meaning that the dynamic tag can return several dat ```php class Elementor_Test_Tag extends \Elementor\Core\DynamicTags\Tag { - public function get_categories() { + public function get_categories(): array { return [ \Elementor\Modules\DynamicTags\Module::URL_CATEGORY, \Elementor\Modules\DynamicTags\Module::TEXT_CATEGORY, @@ -62,11 +62,11 @@ On the other hand, when you create [controls](./../editor-controls/), you need t ```php {13-19} class Elementor_Test_Control extends \Elementor\Base_Control { - public function get_type() {} + public function get_type(): string {} - public function content_template() {} + public function content_template(): void {} - protected function get_default_settings() { + protected function get_default_settings(): array { return [ 'show_label' => true, diff --git a/src/dynamic-tags/dynamic-tags-controls.md b/src/dynamic-tags/dynamic-tags-controls.md index b1292f0d..7abeafa0 100644 --- a/src/dynamic-tags/dynamic-tags-controls.md +++ b/src/dynamic-tags/dynamic-tags-controls.md @@ -11,7 +11,7 @@ To set custom controls for dynamic tags, use the `register_controls()` method as ```php class Elementor_Test_Tag extends \Elementor\Core\DynamicTags\Tag { - protected function register_controls() { + protected function register_controls(): void { $this->add_control( 'text_param', diff --git a/src/dynamic-tags/dynamic-tags-data.md b/src/dynamic-tags/dynamic-tags-data.md index 1579f630..768577bf 100644 --- a/src/dynamic-tags/dynamic-tags-data.md +++ b/src/dynamic-tags/dynamic-tags-data.md @@ -11,19 +11,19 @@ Dynamic tags data is "returned" by these methods: ```php class Elementor_Test_Tag extends \Elementor\Core\DynamicTags\Tag { - public function get_name() { + public function get_name(): string { return 'tag-name'; } - public function get_title() { + public function get_title(): string { return esc_html__( 'Dynamic Tag Name', 'textdomain' ); } - public function get_group() { + public function get_group(): array { return [ 'group-name' ]; } - public function get_categories() { + public function get_categories(): array { return [ \Elementor\Modules\DynamicTags\Module::TEXT_CATEGORY ]; } diff --git a/src/dynamic-tags/dynamic-tags-groups.md b/src/dynamic-tags/dynamic-tags-groups.md index 4d0a2ef4..be2ee1c5 100644 --- a/src/dynamic-tags/dynamic-tags-groups.md +++ b/src/dynamic-tags/dynamic-tags-groups.md @@ -27,7 +27,7 @@ When creating new dynamic tags, you can set the tag group by returning group nam ```php class Elementor_Test_Tag extends \Elementor\Core\DynamicTags\Tag { - public function get_group() { + public function get_group(): array { return [ 'action' ]; } diff --git a/src/dynamic-tags/dynamic-tags-rendering.md b/src/dynamic-tags/dynamic-tags-rendering.md index 1c630042..1ee6300c 100644 --- a/src/dynamic-tags/dynamic-tags-rendering.md +++ b/src/dynamic-tags/dynamic-tags-rendering.md @@ -11,7 +11,7 @@ To render the dynamic tag output and data echoes, we use the `render()` method a ```php class Elementor_Test_Tag extends \Elementor\Core\DynamicTags\Tag { - public function render() { + public function render(): void { echo rand(); @@ -25,7 +25,7 @@ To extract data from the [dynamic tag controls](./dynamic-tags-controls/), we ca ```php class Elementor_Test_Tag extends \Elementor\Core\DynamicTags\Tag { - public function render() { + public function render(): void { $param1 = $this->get_settings( 'text_param' ); $param2 = $this->get_settings( 'number_param' ); $param3 = $this->get_settings( 'select_param' ); diff --git a/src/dynamic-tags/dynamic-tags-structure.md b/src/dynamic-tags/dynamic-tags-structure.md index 3ebb09c9..de542893 100644 --- a/src/dynamic-tags/dynamic-tags-structure.md +++ b/src/dynamic-tags/dynamic-tags-structure.md @@ -20,17 +20,17 @@ A simple dynamic tag skeleton will look like this: ```php class Elementor_Test_Tag extends \Elementor\Core\DynamicTags\Tag { - public function get_name() {} + public function get_name(): string {} - public function get_title() {} + public function get_title(): string {} - public function get_group() {} + public function get_group(): array {} - public function get_categories() {} + public function get_categories(): array {} - protected function register_controls() {} + protected function register_controls(): void {} - public function render() {} + public function render(): void {} } ``` diff --git a/src/dynamic-tags/simple-example.md b/src/dynamic-tags/simple-example.md index 8d6bf129..47c21028 100644 --- a/src/dynamic-tags/simple-example.md +++ b/src/dynamic-tags/simple-example.md @@ -86,7 +86,7 @@ class Elementor_Dynamic_Tag_Random_Number extends \Elementor\Core\DynamicTags\Ta * @access public * @return string Dynamic tag name. */ - public function get_name() { + public function get_name(): string { return 'random-number'; } @@ -99,7 +99,7 @@ class Elementor_Dynamic_Tag_Random_Number extends \Elementor\Core\DynamicTags\Ta * @access public * @return string Dynamic tag title. */ - public function get_title() { + public function get_title(): string { return esc_html__( 'Random Number', 'elementor-random-number-dynamic-tag' ); } @@ -112,7 +112,7 @@ class Elementor_Dynamic_Tag_Random_Number extends \Elementor\Core\DynamicTags\Ta * @access public * @return array Dynamic tag groups. */ - public function get_group() { + public function get_group(): array { return [ 'actions' ]; } @@ -125,7 +125,7 @@ class Elementor_Dynamic_Tag_Random_Number extends \Elementor\Core\DynamicTags\Ta * @access public * @return array Dynamic tag categories. */ - public function get_categories() { + public function get_categories(): array { return [ \Elementor\Modules\DynamicTags\Module::NUMBER_CATEGORY ]; } @@ -138,7 +138,7 @@ class Elementor_Dynamic_Tag_Random_Number extends \Elementor\Core\DynamicTags\Ta * @access public * @return void */ - public function render() { + public function render(): void { echo rand(); } diff --git a/src/editor-controls/control-alert.md b/src/editor-controls/control-alert.md index 3e122cd7..6142209c 100644 --- a/src/editor-controls/control-alert.md +++ b/src/editor-controls/control-alert.md @@ -65,7 +65,7 @@ This control does not return any value. start_controls_section( 'content_section', diff --git a/src/editor-controls/control-animation.md b/src/editor-controls/control-animation.md index 5dee6f0f..eddb7ecf 100644 --- a/src/editor-controls/control-animation.md +++ b/src/editor-controls/control-animation.md @@ -77,7 +77,7 @@ When using this control, the `type` should be set to `\Elementor\Controls_Manage start_controls_section( 'style_section', @@ -100,7 +100,7 @@ class Elementor_Test_Widget extends \Elementor\Widget_Base { } - protected function render() { + protected function render(): void { $settings = $this->get_settings_for_display(); ?>
@@ -109,7 +109,7 @@ class Elementor_Test_Widget extends \Elementor\Widget_Base {
... diff --git a/src/editor-controls/control-box-shadow.md b/src/editor-controls/control-box-shadow.md index 6533c6bf..77b7b710 100644 --- a/src/editor-controls/control-box-shadow.md +++ b/src/editor-controls/control-box-shadow.md @@ -37,7 +37,7 @@ When using this control, the `type` should be set to `\Elementor\Controls_Manage start_controls_section( 'style_section', diff --git a/src/editor-controls/control-button.md b/src/editor-controls/control-button.md index d83d0d59..17bd2d03 100644 --- a/src/editor-controls/control-button.md +++ b/src/editor-controls/control-button.md @@ -87,7 +87,7 @@ This control does not return any value. start_controls_section( 'style_section', diff --git a/src/editor-controls/control-choose.md b/src/editor-controls/control-choose.md index bd84051a..2cdb9203 100644 --- a/src/editor-controls/control-choose.md +++ b/src/editor-controls/control-choose.md @@ -89,7 +89,7 @@ When using this control, the `type` should be set to `\Elementor\Controls_Manage start_controls_section( 'style_section', @@ -130,7 +130,7 @@ class Elementor_Test_Widget extends \Elementor\Widget_Base { } - protected function render() { + protected function render(): void { $settings = $this->get_settings_for_display(); ?>
@@ -139,7 +139,7 @@ class Elementor_Test_Widget extends \Elementor\Widget_Base {
... diff --git a/src/editor-controls/control-code.md b/src/editor-controls/control-code.md index 65e76136..d581482c 100644 --- a/src/editor-controls/control-code.md +++ b/src/editor-controls/control-code.md @@ -89,7 +89,7 @@ When using this control, the `type` should be set to `\Elementor\Controls_Manage start_controls_section( 'content_section', @@ -113,7 +113,7 @@ class Elementor_Test_Widget extends \Elementor\Widget_Base { } - protected function render() { + protected function render(): void { $settings = $this->get_settings_for_display(); if ( empty( $settings['custom_html'] ) ) { @@ -127,7 +127,7 @@ class Elementor_Test_Widget extends \Elementor\Widget_Base { } - protected function content_template() { + protected function content_template(): void { ?> <# if ( '' === settings.custom_html ) { diff --git a/src/editor-controls/control-color.md b/src/editor-controls/control-color.md index a58d946f..5b609fbe 100644 --- a/src/editor-controls/control-color.md +++ b/src/editor-controls/control-color.md @@ -83,7 +83,7 @@ When using this control, the `type` should be set to `\Elementor\Controls_Manage start_controls_section( 'style_section', @@ -108,7 +108,7 @@ class Elementor_Test_Widget extends \Elementor\Widget_Base { } - protected function render() { + protected function render(): void { $settings = $this->get_settings_for_display(); ?>
@@ -117,7 +117,7 @@ class Elementor_Test_Widget extends \Elementor\Widget_Base {
... diff --git a/src/editor-controls/control-date-time.md b/src/editor-controls/control-date-time.md index 15743893..ea1c5bd4 100644 --- a/src/editor-controls/control-date-time.md +++ b/src/editor-controls/control-date-time.md @@ -85,7 +85,7 @@ When using this control, the `type` should be set to `\Elementor\Controls_Manage start_controls_section( 'content_section', @@ -107,7 +107,7 @@ class Elementor_Test_Widget extends \Elementor\Widget_Base { } - protected function render() { + protected function render(): void { $settings = $this->get_settings_for_display(); if ( empty( $settings['due_date'] ) ) { @@ -121,7 +121,7 @@ class Elementor_Test_Widget extends \Elementor\Widget_Base { <# if ( '' === settings.due_date ) { diff --git a/src/editor-controls/control-deprecated-notice.md b/src/editor-controls/control-deprecated-notice.md index f8bb5200..7e978738 100644 --- a/src/editor-controls/control-deprecated-notice.md +++ b/src/editor-controls/control-deprecated-notice.md @@ -99,7 +99,7 @@ Add a notice warning that the widget is deprecated using the regular `add_contro start_controls_section( 'content_section', @@ -139,7 +139,7 @@ Add a notice warning that the widget is deprecated using the `deprecated_notice( start_controls_section( 'content_section', diff --git a/src/editor-controls/control-dimensions.md b/src/editor-controls/control-dimensions.md index 65a111bc..564d531b 100644 --- a/src/editor-controls/control-dimensions.md +++ b/src/editor-controls/control-dimensions.md @@ -127,7 +127,7 @@ When using this control, the `type` should be set to `\Elementor\Controls_Manage start_controls_section( 'style_section', @@ -161,7 +161,7 @@ class Elementor_Test_Widget extends \Elementor\Widget_Base { } - protected function render() { + protected function render(): void { $settings = $this->get_settings_for_display(); ?>
@@ -170,7 +170,7 @@ class Elementor_Test_Widget extends \Elementor\Widget_Base {
... diff --git a/src/editor-controls/control-divider.md b/src/editor-controls/control-divider.md index 452292ef..86e82ed5 100644 --- a/src/editor-controls/control-divider.md +++ b/src/editor-controls/control-divider.md @@ -45,7 +45,7 @@ This control does not return any value. start_controls_section( 'content_section', diff --git a/src/editor-controls/control-exit-animation.md b/src/editor-controls/control-exit-animation.md index 9aede001..0940835c 100644 --- a/src/editor-controls/control-exit-animation.md +++ b/src/editor-controls/control-exit-animation.md @@ -77,7 +77,7 @@ When using this control, the `type` should be set to `\Elementor\Controls_Manage start_controls_section( 'style_section', @@ -100,7 +100,7 @@ class Elementor_Test_Widget extends \Elementor\Widget_Base { } - protected function render() { + protected function render(): void { $settings = $this->get_settings_for_display(); ?>
@@ -109,7 +109,7 @@ class Elementor_Test_Widget extends \Elementor\Widget_Base {
... diff --git a/src/editor-controls/control-font.md b/src/editor-controls/control-font.md index 77d44d98..84604c06 100644 --- a/src/editor-controls/control-font.md +++ b/src/editor-controls/control-font.md @@ -93,7 +93,7 @@ When using this control, the `type` should be set to `\Elementor\Controls_Manage start_controls_section( 'style_section', @@ -119,7 +119,7 @@ class Elementor_Test_Widget extends \Elementor\Widget_Base { } - protected function render() { + protected function render(): void { $settings = $this->get_settings_for_display(); ?>

@@ -129,7 +129,7 @@ class Elementor_Test_Widget extends \Elementor\Widget_Base { } - protected function content_template() { + protected function content_template(): void { ?>

... diff --git a/src/editor-controls/control-gallery.md b/src/editor-controls/control-gallery.md index a7683e76..e9f08fd7 100644 --- a/src/editor-controls/control-gallery.md +++ b/src/editor-controls/control-gallery.md @@ -95,7 +95,7 @@ When using this control, the `type` should be set to `\Elementor\Controls_Manage start_controls_section( 'content_section', @@ -119,14 +119,14 @@ class Elementor_Test_Widget extends \Elementor\Widget_Base { } - protected function render() { + protected function render(): void { $settings = $this->get_settings_for_display(); foreach ( $settings['gallery'] as $image ) { echo ''; } } - protected function content_template() { + protected function content_template(): void { ?> <# _.each( settings.gallery, function( image ) { #> diff --git a/src/editor-controls/control-heading.md b/src/editor-controls/control-heading.md index 91d0f4a4..c77f13c3 100644 --- a/src/editor-controls/control-heading.md +++ b/src/editor-controls/control-heading.md @@ -63,7 +63,7 @@ This control does not return any value. start_controls_section( 'content_section', diff --git a/src/editor-controls/control-hidden.md b/src/editor-controls/control-hidden.md index cb821b1c..63cd5b99 100644 --- a/src/editor-controls/control-hidden.md +++ b/src/editor-controls/control-hidden.md @@ -51,7 +51,7 @@ When using this control, the `type` should be set to `\Elementor\Controls_Manage start_controls_section( 'content_section', @@ -74,14 +74,14 @@ class Elementor_Test_Widget extends \Elementor\Widget_Base { } - protected function render() { + protected function render(): void { $settings = $this->get_settings_for_display(); ?> start_controls_section( 'style_section', @@ -99,7 +99,7 @@ class Elementor_Test_Widget extends \Elementor\Widget_Base { } - protected function render() { + protected function render(): void { $settings = $this->get_settings_for_display(); $elementClass = 'container'; @@ -116,7 +116,7 @@ class Elementor_Test_Widget extends \Elementor\Widget_Base { <# const elementClass = 'container'; diff --git a/src/editor-controls/control-icon.md b/src/editor-controls/control-icon.md index fe703100..704dc8ed 100644 --- a/src/editor-controls/control-icon.md +++ b/src/editor-controls/control-icon.md @@ -97,7 +97,7 @@ When using this control, the `type` should be set to `\Elementor\Controls_Manage start_controls_section( 'content_section', @@ -133,14 +133,14 @@ class Elementor_Test_Widget extends \Elementor\Widget_Base { } - protected function render() { + protected function render(): void { $settings = $this->get_settings_for_display(); ?> start_controls_section( 'section_icon', @@ -155,7 +155,7 @@ class Icons_Elementor_Test_Control_Widget extends \Elementor\Widget_Base { } - protected function render() { + protected function render(): void { $settings = $this->get_settings_for_display(); ?>
@@ -164,7 +164,7 @@ class Icons_Elementor_Test_Control_Widget extends \Elementor\Widget_Base { <# const iconHTML = elementor.helpers.renderIcon( view, settings.selected_icon, { 'aria-hidden': true }, 'i' , 'object' ); diff --git a/src/editor-controls/control-image-dimensions.md b/src/editor-controls/control-image-dimensions.md index ad8d3463..900fb334 100644 --- a/src/editor-controls/control-image-dimensions.md +++ b/src/editor-controls/control-image-dimensions.md @@ -93,7 +93,7 @@ When using this control, the `type` should be set to `\Elementor\Controls_Manage start_controls_section( 'content_section', diff --git a/src/editor-controls/control-media.md b/src/editor-controls/control-media.md index 0be4b175..07e0cd45 100644 --- a/src/editor-controls/control-media.md +++ b/src/editor-controls/control-media.md @@ -101,7 +101,7 @@ Add an image: start_controls_section( 'content_section', @@ -126,7 +126,7 @@ class Elementor_Test_Widget extends \Elementor\Widget_Base { } - protected function render() { + protected function render(): void { $settings = $this->get_settings_for_display(); if ( empty( $settings['image']['url'] ) ) { @@ -147,7 +147,7 @@ class Elementor_Test_Widget extends \Elementor\Widget_Base { echo \Elementor\Group_Control_Image_Size::get_attachment_image_html( $settings, 'thumbnail', 'image' ); } - protected function content_template() { + protected function content_template(): void { ?> <# if ( '' === settings.image.url ) { @@ -181,7 +181,7 @@ Add a video media type to display a self hosted video: start_controls_section( 'content_section', @@ -207,7 +207,7 @@ class Elementor_Test_Widget extends \Elementor\Widget_Base { } - protected function render() { + protected function render(): void { $settings = $this->get_settings_for_display(); $video_url = $settings['video']['url']; @@ -219,7 +219,7 @@ class Elementor_Test_Widget extends \Elementor\Widget_Base { <# const video_url = settings.video.url; @@ -241,7 +241,7 @@ Add a PDF file: start_controls_section( 'content_section', @@ -264,7 +264,7 @@ class Elementor_Test_Widget extends \Elementor\Widget_Base { } - protected function render() { + protected function render(): void { $settings = $this->get_settings_for_display(); $pdf_url = $settings['pdf']['url']; @@ -278,7 +278,7 @@ class Elementor_Test_Widget extends \Elementor\Widget_Base { <# const pdf_url = settings.pdf.url; diff --git a/src/editor-controls/control-notice.md b/src/editor-controls/control-notice.md index 31506a76..c3ea79be 100644 --- a/src/editor-controls/control-notice.md +++ b/src/editor-controls/control-notice.md @@ -73,7 +73,7 @@ This control does not return any value. start_controls_section( 'content_section', diff --git a/src/editor-controls/control-number.md b/src/editor-controls/control-number.md index bf0480c1..0a347531 100644 --- a/src/editor-controls/control-number.md +++ b/src/editor-controls/control-number.md @@ -107,7 +107,7 @@ When using this control, the `type` should be set to `\Elementor\Controls_Manage start_controls_section( 'content_section', @@ -133,7 +133,7 @@ class Elementor_Test_Widget extends \Elementor\Widget_Base { } - protected function render() { + protected function render(): void { $settings = $this->get_settings_for_display(); if ( empty( $settings['price'] ) ) { @@ -146,7 +146,7 @@ class Elementor_Test_Widget extends \Elementor\Widget_Base { <# if ( '' === settings.price ) { diff --git a/src/editor-controls/control-popover-toggle.md b/src/editor-controls/control-popover-toggle.md index d2d0d366..4715d0b5 100644 --- a/src/editor-controls/control-popover-toggle.md +++ b/src/editor-controls/control-popover-toggle.md @@ -97,7 +97,7 @@ When using this control, the `type` should be set to `\Elementor\Controls_Manage start_controls_section( 'style_section', diff --git a/src/editor-controls/control-popovers.md b/src/editor-controls/control-popovers.md index 9871bc75..9aee375a 100644 --- a/src/editor-controls/control-popovers.md +++ b/src/editor-controls/control-popovers.md @@ -49,7 +49,7 @@ In the example below, we'll group controls into two popovers - "Normal" tab and ```php {13-22,24,32} class Elementor_Test_Widget extends \Elementor\Widget_Base { - protected function register_controls() { + protected function register_controls(): void { $this->start_controls_section( 'style_section', diff --git a/src/editor-controls/control-raw-html.md b/src/editor-controls/control-raw-html.md index df13d09d..36c44283 100644 --- a/src/editor-controls/control-raw-html.md +++ b/src/editor-controls/control-raw-html.md @@ -81,7 +81,7 @@ This control does not return any value. start_controls_section( 'content_section', diff --git a/src/editor-controls/control-repeater.md b/src/editor-controls/control-repeater.md index 0a06b7f7..20b74d96 100644 --- a/src/editor-controls/control-repeater.md +++ b/src/editor-controls/control-repeater.md @@ -97,7 +97,7 @@ Usage example with `fields` array: start_controls_section( 'content_section', @@ -154,7 +154,7 @@ class Elementor_Test_Widget extends \Elementor\Widget_Base { } - protected function render() { + protected function render(): void { $settings = $this->get_settings_for_display(); if ( $settings['list'] ) { @@ -167,7 +167,7 @@ class Elementor_Test_Widget extends \Elementor\Widget_Base { } } - protected function content_template() { + protected function content_template(): void { ?> <# if ( settings.list.length ) { #>
@@ -189,7 +189,7 @@ Usage example with `Repeater()` class: start_controls_section( 'content_section', @@ -256,7 +256,7 @@ class Elementor_Test_Widget extends \Elementor\Widget_Base { } - protected function render() { + protected function render(): void { $settings = $this->get_settings_for_display(); if ( $settings['list'] ) { @@ -269,7 +269,7 @@ class Elementor_Test_Widget extends \Elementor\Widget_Base { } } - protected function content_template() { + protected function content_template(): void { ?> <# if ( settings.list.length ) { #>
diff --git a/src/editor-controls/control-section.md b/src/editor-controls/control-section.md index 4a948641..a51d2a48 100644 --- a/src/editor-controls/control-section.md +++ b/src/editor-controls/control-section.md @@ -41,7 +41,7 @@ The example below creates a single section which will be part of the "**Content* ```php {5-11,19} class Elementor_Test_Widget extends \Elementor\Widget_Base { - protected function register_controls() { + protected function register_controls(): void { $this->start_controls_section( 'content_section', @@ -75,7 +75,7 @@ Now let's create multiple control sections for the "**Content**" tab: ```php {5-11,19,21-27,35} class Elementor_Test_Widget extends \Elementor\Widget_Base { - protected function register_controls() { + protected function register_controls(): void { $this->start_controls_section( 'content_section', @@ -127,7 +127,7 @@ Elementor has a predefined list of tabs that you can use, but with widgets the c ```php {5-11,19,21-27,35,37-43,51} class Elementor_Test_Widget extends \Elementor\Widget_Base { - protected function register_controls() { + protected function register_controls(): void { $this->start_controls_section( 'content_section', diff --git a/src/editor-controls/control-select.md b/src/editor-controls/control-select.md index 2c7f343a..9091fb70 100644 --- a/src/editor-controls/control-select.md +++ b/src/editor-controls/control-select.md @@ -83,7 +83,7 @@ When using this control, the `type` should be set to `\Elementor\Controls_Manage start_controls_section( 'style_section', @@ -117,7 +117,7 @@ class Elementor_Test_Widget extends \Elementor\Widget_Base { } - protected function render() { + protected function render(): void { $settings = $this->get_settings_for_display(); ?>
@@ -126,7 +126,7 @@ class Elementor_Test_Widget extends \Elementor\Widget_Base {
... diff --git a/src/editor-controls/control-select2.md b/src/editor-controls/control-select2.md index c86d7921..7eb03ad9 100644 --- a/src/editor-controls/control-select2.md +++ b/src/editor-controls/control-select2.md @@ -89,7 +89,7 @@ When using this control, the `type` should be set to `\Elementor\Controls_Manage start_controls_section( 'content_section', @@ -119,7 +119,7 @@ class Elementor_Test_Widget extends \Elementor\Widget_Base { } - protected function render() { + protected function render(): void { $settings = $this->get_settings_for_display(); if ( $settings['list'] ) { echo '