Adding Background position to Visual Composer Row

Hi, could you please add a new parameter to row settings - background position? I got this working with following changes:

Add the param to row:
vc_add_param("vc_row", array(
"type" => "dropdown",
"class" => "",
"heading" => "Background position",
"param_name" => "background_position",
"value" => array(
'' => 'None',
"center center" => "center center",
"center top" => "center top",
"center bottom" => "center bottom"
)
));


copy "plugins/js_composer/include/templates/shortcodes/vc_row.php" to betheme/vc_templates and add:


$background_position = $atts['background_position'] == '' ? '' : 'background-position: '.$atts['background_position'].'!important';
$output .= '<div ' . implode( ' ', $wrapper_attributes ) . ' style="'.$background_position.'">';


Without this, some of the demos that are done in Muffin Builder cannot be duplicated in Visual Composer.

I added the changes to my child theme, so I'm upgrade safe, but this might be a great addition to the base theme...

Thanks!

Comments

Sign In or Register to comment.