Example #1
0
}
/* Animation */
if ($animation) {
    $animation .= ' animate-element';
}
/* */
if ($column_2_responsive) {
    $column_2_responsive = ' col-sm-6';
}
$border_class = "";
if ($column_border) {
    $border_class = " cs-border-radius";
}
$styles = array();
$class_align = '';
if (!empty($text_align)) {
    $styles[] = " text-align: {$text_align};";
    $class_align = " align-{$text_align}";
}
if (!empty($font_color)) {
    $styles[] = " color: {$font_color};";
}
$el_class .= ' wpb_column vc_column_container ' . $animation . $border_class . ' ' . $column_style . $class_align;
$style = cshero_build_style($styles);
$css_class = apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, $width . $column_2_responsive . $el_class . $responsive . vc_shortcode_custom_css_class($css, ' '), $this->settings['base'], $atts);
$output .= "\n\t" . '<div class="' . $css_class . '" ' . $style . '>';
$output .= "\n\t\t" . '<div class="wpb_wrapper">';
$output .= "\n\t\t\t" . wpb_js_remove_wpautop($content);
$output .= "\n\t\t" . '</div> ' . $this->endBlockComment('.wpb_wrapper');
$output .= "\n\t" . '</div> ' . $this->endBlockComment($el_class) . "\n";
echo $output;
Example #2
0
 function cshero_generetor_header_setting()
 {
     global $smof_data, $post;
     $header_setings = new stdClass();
     $header_setings->body_class = 'csbody';
     $header_setings->header_fixed = '0';
     $header_setings->top_padding = '';
     $header_setings->styles = '';
     $style = array();
     if (is_page() && get_post_meta($post->ID, 'cs_header_setting', true) == 'custom') {
         $header_setings->header_fixed = get_post_meta($post->ID, 'cs_header_fixed_top', true);
         if (get_post_meta($post->ID, 'cs_header_bg_color', true)) {
             $style[] = 'background-color:' . HexToRGB(get_post_meta($post->ID, 'cs_header_bg_color', true), get_post_meta($post->ID, 'cs_header_bg_opacity', true)) . ';';
         }
         if (get_post_meta($post->ID, 'cs_header_bg_parallax', true) == 'yes') {
             $style[] = 'border-bottom: 1px solid rgba(255, 255, 255, 0.2);';
         }
         if ($header_setings->header_fixed == '1') {
             $header_setings->body_class = 'csbody body_header_fixed';
         } else {
             $header_setings->body_class = 'csbody body_header_normal';
         }
     } else {
         $header_setings->header_fixed = $smof_data['header_fixed_top'];
         if ($smof_data['header_bg_color']) {
             $style[] = 'background-color:' . HexToRGB($smof_data['header_bg_color'], $smof_data['header_transparent'] / 100) . ';';
         }
         if ($smof_data['header_border_bottom'] == '1') {
             $style[] = 'border-bottom: 1px solid rgba(255, 255, 255, 0.2);';
         }
         if ($header_setings->header_fixed == '1') {
             $header_setings->body_class = 'csbody body_header_fixed';
         } else {
             $header_setings->body_class = 'csbody body_header_normal';
         }
     }
     if ($smof_data["header_margin"]) {
         $style[] = 'margin:' . esc_attr($smof_data["header_margin"]) . ';';
     }
     if ($smof_data["header_padding"]) {
         $style[] = 'padding:' . esc_attr($smof_data["header_padding"]) . ';';
     }
     $header_setings->styles = cshero_build_style($style);
     /* Top Padding */
     if ($smof_data["header_top_padding"]) {
         $header_setings->top_padding = cshero_build_style(array('padding:' . $smof_data["header_top_padding"] . ';'));
     }
     return $header_setings;
 }