Feature Request: Adding a custom class to items
-
I did something like this to add a custom class attribute to images items.
The problem is, I can’t find a filter to add this class to the item output. Inspecting the code it seems it’s impossible to do it, am I wrong?Could this feature be added?
add_filter('vpf_extend_image_controls', 'hd_vpf_extend_image_controls', 10, 2); function hd_vpf_extend_image_controls($controls, $name) { $class_control = array( 'type' => 'text', 'label' => esc_html__( 'Additional Class', 'visual-portfolio' ), 'description' => esc_html__( 'Additional class for item', 'visual-portfolio' ), 'name' => 'text_control_additional_class', 'placeholder' => esc_html__( 'some-class', 'visual-portfolio' ), 'default' => '' ); $controls['additional_class'] = $class_control; return $controls; }
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘Feature Request: Adding a custom class to items’ is closed to new replies.