Добавление настроек строки в плагин WPBakery - PullRequest
0 голосов
/ 18 февраля 2020

Как мне получить настройки для внешнего интерфейса? Мне нужно добавить классы в vc_row.

enter image description here

/ ** * Эффект Кена Бернса для Роу. * /

add_action ('vc_after_init', 'ken_burns_effect_add_option_to_vc_row');

function ken_burns_effect_add_option_to_vc_row() {
    // Ken Burns Effect Attributes
    $ken_burns_effect_attributes = 
    array(
        array(
            'type' => 'checkbox',
            'heading' => __( 'Ken Burns for image background', 'ken_burns_effect' ),
            'param_name' => 'enable_ken_burns_effect',
            'value' => array(
                __( 'Yes', 'ken_burns_effect' ) => 'yes',
            ),
            'description' => 'Check this box if you want to enable ken burns effect for this row.',
        ),
        array(
            'type' => 'dropdown',
            'heading' => __( 'Direction', 'ken_burns_effect' ),
            'param_name' => 'direction_ken_burns_effect',
            'value' => array(
                'Zoom In' => 'zoom_in',
                'Zoom Out' => 'zoom_out',
            ),
            'description' => __( '', 'ken_burns_effect' ),
            'dependency' => array(
                'element' => 'enable_ken_burns_effect',
                'value' => array( 'yes' ),
            ),
        ), 
        array(
            'type' => 'textfield',
            'heading' => __( 'Transition speed', 'ken_burns_effect' ),
            'param_name' => 'transition_speed_ken_burns_effect',
            'value' => '',
            'description' => __( '', 'ken_burns_effect' ),
            'dependency' => array(
                'element' => 'enable_ken_burns_effect',
                'value' => array( 'yes' ),
            ),
        ),
    );
    vc_add_params( 'vc_row', $ken_burns_effect_attributes);
}
...