Customize Visual Composer Single Image element
-
Hi, my first post here. Pls blow my mind away.
I need to customize VC’s Single Image element from my plugin.
I found this:add_filter( 'vc_shortcode_set_template_vc_single_image', array( $this, 'addVcSingleImageShortcodesTemplates', ) );and:
public function addVcSingleImageShortcodesTemplates( $template ) { $file = vc_path_dir( 'TEMPLATES_DIR', 'params/vc_grid_item/shortcodes/vc_single_image.php' ); if ( is_file( $file ) ) { return $file; } return $template; }in class-vc-grid-item.php.
I know for a fact that vc_single_image.php is the file that runs when displaying images on the site, but I can comment out the function addVcSingleImageShortcodesTemplates and it will still run without errors (and images will be displayed). I dont see how remove_filter( ‘vc_shortcode_set_template_vc_single_image’,…) could help.
Could anyone explain to me how this works? How can I customize vc_single_image.php (I need to add more html tags to an image) from my plugin?
Right now I have hard-coded my changes in vc_single_image.php and ofc they will be overwritten when VC updates.Unfortunately I cant link to project because problem is in admin panel.
Any help is appreciated!
Thank you
The topic ‘Customize Visual Composer Single Image element’ is closed to new replies.