简体   繁体   English

修改Elementor小部件

[英]modify Elementor widget

How i can add new social icon for Widget_Social_Icons() ? 我如何为Widget_Social_Icons()添加新的社交图标?

I can add new icon for Control_Icon() 我可以为Control_Icon()添加新图标

function jet_modify_controls( $controls_registry ) {
    // Get existing icons
    $icons = $controls_registry->get_control( 'icon' )->get_settings( 'options' );
    // Append new icons
    $new_icons = array_merge(
        array(
            'fab fa-viber' => 'viber',
        ),
        $icons
    );
    // Then we set a new list of icons as the options of the icon control
    $controls_registry->get_control( 'icon' )->set_settings( 'options', $new_icons );
}
add_action( 'elementor/controls/controls_registered', 'jet_modify_controls', 99, 1 );

I found action "elementor/widgets/widgets_registered" but i cant find method for adding new icon for him 我发现动作“ elementor / widgets / widgets_registered”,但我找不到为他添加新图标的方法

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM