Lifetime updates on every purchase Support replies within 24 hours Secure checkout via Gumroad 8,500+ sales since 2016

Editor controls

Updated 1 min read 3 views

Add sections and fields of your own to the sidebar; values are saved with the layout in $config['extra']. Fields can add a class to the grid or set a CSS property, per device.

add_filter( 'vlt_grid_controls', function ( $controls ) {
	$controls['card'] = [
		'title'     => 'Card',
		'after'     => 'skin',
		'condition' => [ 'skin' => 'minimal' ],
		'fields'    => [
		'overlay'   => [ 
            'type' => 'toggle', 
            'label' => 'Overlay', 
            'default' => true,
            'class' => 'has-overlay' 
        ],
		'radius'  => [ 
            'type' => 'number', 
            'label' => 'Radius', 
            'min' => 0, 
            'max' => 40, 
            'responsive' => true,
		    'default' => [ 
                'desktop' => 12, 
                'tablet' => 8, 
                'mobile' => 4 
             ],
		     'style'   => [ 
                  [ 
                     'element' => '.my-card', 'property' => '--card-radius', 'mask' => '$px' 
] ] ],
		],
	];
	return $controls;
} );

Field types: toggle, select, number, text, textarea, color, image, separator. Extra fields for Media images: vlt_grid_image_controls.

Was this article helpful?