Hello!
Could you help me a bit with something I’m struggle with… I’m trying to add custom controls to elements like Text widget based on this following code (I put this on the functions.php file) :
add_filter( 'bricks/elements/text/controls', function( $controls ) {
$controls['myCustomElement'] = [
'tab' => 'content',
'label' => esc_html__( 'MY CUSTOM CHECKBOX', 'bricks' ),
'type' => 'checkbox',
'inline' => true,
'small' => true,
'default' => true, // Default: false
];
return $controls;
} );
Once I added this code I would like to add custom class, or attribute (manipulate the render of this element) based on the checked y/n value. But I can’t achieve the render part… could you help me with this ?
Thank a lot!