| Server IP : 212.183.175.188 / Your IP : 216.73.217.18 Web Server : Apache System : Linux duemilacom6.interac.it 5.10.0-28-amd64 #1 SMP Debian 5.10.209-2 (2024-01-31) x86_64 User : cvevolpi ( 10022) PHP Version : 7.4.33 Disable Function : opcache_get_status MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /var/www/vhosts/cvevolpi.it/httpdocs/wp-content/themes/sentinelPROD/visualComposer/ |
Upload File : |
<?php
// ------------------------------------------------------------------------------
// TITLE
// ------------------------------------------------------------------------------
function vc_theme_vc_divider($atts, $content = null) {
$defaults = array (
'show_line' => 'no',
'space_above' => 0,
'space_below' => 0,
'el_class' => '',
);
$atts = sc_default_params ( $defaults, $atts );
$atts['space_above'] = intval( $atts['space_above']);
$atts['space_below'] = intval( $atts['space_below']);
$text = '';
( $atts['show_line'] == 'yes' || $atts['show_line'] == 'true') ? $dividerLineClass = 'divider_line' : $dividerLineClass = '';
$text .= '<div class="'.$dividerLineClass.' '.$atts['el_class'].'" style="margin-top:'.$atts['space_above'].'px;padding-bottom:'.$atts['space_below'].'px;">';
$text .= '</div>';
return wpb_js_remove_wpautop ( $text );
}
add_shortcode ( 'vc_divider', 'vc_theme_vc_divider' );
vc_map ( array (
"name" => __ ( "Divider", "js_composer" ),
"base" => "vc_divider",
"icon" => "icon-wpb-layer-shape-text",
"category" => __ ( 'Content', 'js_composer' ),
"params" => array (
array (
"type" => "checkbox",
"heading" => __ ( "Show Line", "js_composer" ),
"param_name" => "show_line",
),
array (
"type" => "textfield",
"heading" => __ ( "Space above the line", "js_composer" ),
"param_name" => "space_above",
"description" => __ ( "In pixels (do not write PX)", "js_composer" )
),
array (
"type" => "textfield",
"heading" => __ ( "Space Below the line", "js_composer" ),
"param_name" => "space_below",
"description" => __ ( "In pixels (do not write PX)", "js_composer" )
),
array (
"type" => "textfield",
"heading" => __ ( "Extra class name", "js_composer" ),
"param_name" => "el_class",
"description" => __ ( "If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.", "js_composer" )
)
)
) );
// show line [yes/no] space above the line [px] space below the line [px]