0
在Visual Composer中有一個名爲Progress Bar的內置插件。我想創建一個自己風格的自定義進度條。如何在visual composer中爲自定義進度條插件創建簡碼?
我的自定義進度欄插件代碼:
<?php
// About Us 2 addons
vc_map(array(
'name' => __('About Us & Progress Bar', 'f_triangle'),
'base' => 'abt_us_progress_bar',
"category" => __("F Triangle", "f_triangle"),
'description' => __('', 'f_triangle'),
'params' => array(
array(
'type' => 'param_group',
'heading' => __('Values', 'f_triangle'),
'param_name' => 'values',
'description' => __('Enter values for graph - value, title and color.', 'f_triangle'),
'group' => __('Progress Bar', 'f_triangle'),
'value' => urlencode(json_encode(array(
array(
'label' => __('Design', 'f_triangle'),
'value' => '35',
),
array(
'label' => __('HTML', 'f_triangle'),
'value' => '80',
),
array(
'label' => __('PHP', 'f_triangle'),
'value' => '60',
),
))),
'params' => array(
array(
'type' => 'textfield',
'heading' => __('Label', 'f_triangle'),
'param_name' => 'label',
'description' => __('Enter text used as title of bar.', 'f_triangle'),
'admin_label' => true,
),
array(
'type' => 'textfield',
'heading' => __('Value', 'f_triangle'),
'param_name' => 'value',
'description' => __('Enter value of bar.', 'f_triangle'),
'admin_label' => true,
),
),
),
)
));
?>
我的HTML代碼:
<div class="col-sm-5 wow fadeInRight" data-wow-duration="1000ms" data-wow-delay="300ms">
<div class="our-skills">
<h2 class="bold">Our Skills</h2>
<div class="single-skill">
<h3>Design</h3>
<div class="progress">
<div class="progress-bar progress-bar-primary six-sec-ease-in-out" role="progressbar" data-transition="35">35%</div>
</div>
</div>
<div class="single-skill">
<h3>HTML</h3>
<div class="progress">
<div class="progress-bar progress-bar-primary six-sec-ease-in-out" role="progressbar" data-transition="80">80%</div>
</div>
</div>
<div class="single-skill">
<h3>PHP</h3>
<div class="progress">
<div class="progress-bar progress-bar-primary six-sec-ease-in-out" role="progressbar" data-transition="60">60%</div>
</div>
</div>
</div>
</div>
我的自定義進度欄插件工作在WordPress後臺編輯不錯,但我不明白,我怎麼能爲此插件創建簡碼以將其與我的HTML集成。這就是爲什麼我無法在前端顯示它。那麼,我如何爲這個插件創建簡碼呢?