🤩Change field Description in slides Elementor to Text rich (ok)
wp-content\plugins\elementor-slides-wysiwyg\elementor-slides-wysiwyg.php (đã hoạt động)
<?php
/**
* Plugin Name: Elementor Pro Slides WYSIWYG Description
* Description: Convert Slides widget description field to WYSIWYG editor.
* Version: 1.1
* Author: Lionel
*/
if ( ! defined( 'ABSPATH' ) ) exit;
// Hook into the controls registration for the Slides widget
add_action( 'elementor/element/slides/section_slides/before_section_end', function( $element, $args ) {
// Get the repeater
$repeater = $element->get_controls( 'slides' );
if ( isset( $repeater['fields']['description'] ) ) {
// Replace the description field inside repeater with WYSIWYG
$repeater['fields']['description']['type'] = \Elementor\Controls_Manager::WYSIWYG;
$repeater['fields']['description']['label'] = __( 'Description (Rich Text)', 'plugin-name' );
$repeater['fields']['description']['show_label'] = true;
// Update the repeater back on the widget
$element->update_control( 'slides', $repeater );
}
}, 20, 2 );
Tham khảo
Previous[CONTACT FORM 7] Thay đổi thông báo thành công bằng thẻ định dạng (okNextSử dụng WC_Widget_Product_Categories trong theme như nào? (ok)
Last updated
Was this helpful?