File: /home/zwafgyp/lacalita/wp-content/plugins/rey-core/inc/elementor/custom/kit.php
<?php
namespace ReyCore\Elementor\Custom;
if (!defined('ABSPATH')) exit; // Exit if accessed directly
class Kit {
public function __construct(){
add_action( 'elementor/element/kit/section_settings-layout/before_section_end', [$this, 'kit_layout_settings']);
add_action( 'elementor/element/kit/section_layout-settings/before_section_end', [$this, 'kit_layout_settings']);
add_action( 'elementor/kit/register_tabs', [$this, 'kit_buttons'] );
add_action( 'elementor/element/kit/section_typography/before_section_end', [$this, 'typo_settings']);
}
/**
* Remove Container width as it directly conflicts with Rey's container settings
*
* @since 1.6.12
*/
public function kit_layout_settings( $stack ){
$stack->remove_responsive_control( 'container_width' );
}
public function kit_buttons($kit){
$kit->register_tab( 'theme-style-buttons', KitButtons::class );
}
public function typo_settings( $stack ){
if( ! apply_filters('reycore/elementor/kit/typo_selectors', true) ){
return;
}
$map = [
'body_color' => '--body-color',
'link_normal_color' => '--link-color',
'link_hover_color' => '--link-color-hover',
];
foreach ($map as $control_key => $css_variable) {
$stack->update_control(
$control_key,
[
'selectors' => [
'{{WRAPPER}}' => sprintf('%s:{{VALUE}};', $css_variable)
],
'render_type' => 'ui',
]
);
}
$stack->update_responsive_control(
'paragraph_spacing',
[
'selectors' => [
// '{{WRAPPER}}' => sprintf('%s:{{VALUE}};', $css_variable)
'{{WRAPPER}}' => '--paragraph-spacing:{{SIZE}}{{UNIT}};'
],
'render_type' => 'ui',
]
);
}
}