File: /home/shaping-sar.ru/public_html/wp-content/themes/beauty spa/builder/shortcode/spa_saleoff.php
<?php
if(!class_exists('iz_vc_spa_sale_description'))
{
class iz_vc_spa_sale_description extends iz_shortcode{
public function __construct()
{
$this->custom_shortcode('iz_saleoff_desc', array($this, 'iz_render_html'));
add_action('vc_before_init', array($this, 'iz_vc_shortcode'));
}
public function iz_render_html($atts, $content ='')
{
extract( shortcode_atts( array(
'title' => '',
'span' => '',
'detail' => '',
), $atts ) );
$html = '<h2>'.$title.'<span>'.$span.'</span></h2>';
$html .= '<p>'.$detail.'</p>';
return $html;
}
public function iz_vc_shortcode()
{
vc_map( array(
"name" => __( "Spa Sale Off Description", IZ_LANG),
"base" => "iz_saleoff_desc",
"category" => __( "Spa Shortcode", IZ_LANG),
// 'admin_enqueue_css' => array(get_template_directory_uri().'/builder/assets/css/vc_extends_css.css'),
"params" => array(
array(
'type' => 'textfield',
'heading' => __('Sale Off Title', IZ_LANG),
'param_name' => 'title',
'value' => '',
),
array(
'type' => 'textfield',
'heading' => __('Sale Off Title Span Text', IZ_LANG),
'param_name' => 'span',
'value' => '',
),
array(
'type' => 'textarea',
'heading' => __('Detail', IZ_LANG),
'value' => '',
'param_name' => 'detail',
),
)
));
}
}
}