本文整理汇总了PHP中vc_generate_dependencies_attributes函数的典型用法代码示例。如果您正苦于以下问题:PHP vc_generate_dependencies_attributes函数的具体用法?PHP vc_generate_dependencies_attributes怎么用?PHP vc_generate_dependencies_attributes使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了vc_generate_dependencies_attributes函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: products_settings_field
function products_settings_field($settings, $value)
{
$attr = array("post_type" => "product", "orderby" => "name", "order" => "asc", 'posts_per_page' => -1);
$categories = get_posts($attr);
$dependency = vc_generate_dependencies_attributes($settings);
$data = '<input type="text" value="' . $value . '" name="' . $settings['param_name'] . '" class="wpb_vc_param_value wpb-input wpb-select vc_custom_select_custom_val ' . $settings['param_name'] . ' ' . $settings['type'] . '" id="vc_custom_select_custom_prod">';
$data .= '<div class="vc_custom_select_custom_wrapper"><ul class="vc_custom_select_custom_vals">';
$insterted_vals = explode(',', $value);
foreach ($categories as $val) {
if (in_array($val->ID, $insterted_vals)) {
$data .= '<li data-val="' . $val->ID . '">' . $val->post_title . '<button>×</button></li>';
}
}
$data .= '</ul>';
$data .= '<ul class="vc_custom_select_custom">';
foreach ($categories as $val) {
$selected = '';
if (in_array($val->ID, $insterted_vals)) {
$selected = ' class="selected"';
}
$data .= '<li' . $selected . ' data-val="' . $val->ID . '">' . $val->post_title . '</li>';
}
$data .= '</ul></div>';
return $data;
}
示例2: checkbox_param
function checkbox_param($settings, $value)
{
$dependency = function_exists('vc_generate_dependencies_attributes') ? vc_generate_dependencies_attributes($settings) : '';
$param_name = isset($settings['param_name']) ? $settings['param_name'] : '';
$type = isset($settings['type']) ? $settings['type'] : '';
$options = isset($settings['options']) ? $settings['options'] : '';
$class = isset($settings['class']) ? $settings['class'] : '';
$default_set = isset($settings['default_set']) ? $settings['default_set'] : false;
$output = $checked = '';
$un = uniqid('ultswitch-' . rand());
if (is_array($options) && !empty($options)) {
foreach ($options as $key => $opts) {
if ($value == $key) {
$checked = "checked";
} else {
$checked = "";
}
$uid = uniqid('ultswitchparam-' . rand());
$output .= '<div class="onoffswitch">
<input type="checkbox" name="' . $param_name . '" value="' . $value . '" ' . $dependency . ' class="wpb_vc_param_value ' . $param_name . ' ' . $type . ' ' . $class . ' ' . $dependency . ' onoffswitch-checkbox chk-switch-' . $un . '" id="switch' . $uid . '" ' . $checked . '>
<label class="onoffswitch-label" for="switch' . $uid . '">
<div class="onoffswitch-inner">
<div class="onoffswitch-active">
<div class="onoffswitch-switch">' . $opts['on'] . '</div>
</div>
<div class="onoffswitch-inactive">
<div class="onoffswitch-switch">' . $opts['off'] . '</div>
</div>
</div>
</label>
</div>';
if (isset($opts['label'])) {
$lbl = $opts['label'];
} else {
$lbl = '';
}
$output .= '<div class="chk-label">' . $lbl . '</div><br/>';
}
}
if ($default_set) {
$set_value = 'off';
} else {
$set_value = '';
}
//$output .= '<input type="hidden" id="chk-switch-'.$un.'" class="wpb_vc_param_value ' . $param_name . ' ' . $type . ' ' . $class . '" name="' . $param_name . '" value="'.$value.'" />';
$output .= '<script type="text/javascript">
jQuery("#switch' . $uid . '").change(function(){
if(jQuery("#switch' . $uid . '").is(":checked")){
jQuery("#switch' . $uid . '").val("' . $key . '");
jQuery("#switch' . $uid . '").attr("checked","checked");
} else {
jQuery("#switch' . $uid . '").val("' . $set_value . '");
jQuery("#switch' . $uid . '").removeAttr("checked");
}
});
</script>';
return $output;
}
示例3: ewf_vc_param_position_settings
function ewf_vc_param_position_settings($settings, $value)
{
$dependency = vc_generate_dependencies_attributes($settings);
$param_name = isset($settings['param_name']) ? $settings['param_name'] : '';
$type = isset($settings['type']) ? $settings['type'] : '';
$min = isset($settings['min']) ? $settings['min'] : '';
$max = isset($settings['max']) ? $settings['max'] : '';
$class = isset($settings['class']) ? $settings['class'] : '';
$extra_class = array('top' => null, 'top-left' => null, 'top-right' => null, 'bottom' => null, 'bottom-right' => null, 'bottom-left' => null, 'left' => null, 'right' => null);
$extra_class[$value] = ' active';
$output = '<div class="ewf_param_position"></div>';
$output .= '<div class="ewf-position-box-wrapper">
<div class="ewf-position-box">
<div class="ewf-pb-top-right' . $extra_class['top-right'] . '"></div>
<div class="ewf-pb-top-left' . $extra_class['top-left'] . '"></div>
<div class="ewf-pb-top' . $extra_class['top'] . '"></div>
<div class="ewf-pb-bottom' . $extra_class['bottom'] . '"></div>
<div class="ewf-pb-bottom-right' . $extra_class['bottom-right'] . '"></div>
<div class="ewf-pb-bottom-left' . $extra_class['bottom-left'] . '"></div>
<div class="ewf-pb-left' . $extra_class['left'] . '"></div>
<div class="ewf-pb-right' . $extra_class['right'] . '"></div>
</div>
</div>';
$output .= '<input type="hidden" class="wpb_vc_param_value ' . $param_name . ' ' . $type . ' ' . $class . '" name="' . $param_name . '" value="' . $value . '" />';
$output .= '</div>';
return $output;
}
示例4: switch_button_settings_field
function switch_button_settings_field($settings, $value)
{
global $VISUAL_COMPOSER_EXTENSIONS;
$dependency = vc_generate_dependencies_attributes($settings);
$param_name = isset($settings['param_name']) ? $settings['param_name'] : '';
$type = isset($settings['type']) ? $settings['type'] : '';
$on = isset($settings['on']) ? $settings['on'] : __("On", "ts_visual_composer_extend");
$off = isset($settings['off']) ? $settings['off'] : __("Off", "ts_visual_composer_extend");
$style = isset($settings['style']) ? $settings['style'] : 'select';
// 'compact' or 'select'
$design = isset($settings['design']) ? $settings['design'] : 'toggle-light';
// 'toggle-light', 'toggle-modern' or 'toggle'soft'
$width = isset($settings['width']) ? $settings['width'] : '80';
$suffix = isset($settings['suffix']) ? $settings['suffix'] : '';
$class = isset($settings['class']) ? $settings['class'] : '';
$url = $VISUAL_COMPOSER_EXTENSIONS->TS_VCSC_PluginPath;
$output = '';
$output .= '<div class="ts-switch-button ts-composer-switch" data-value="' . $value . '" data-width="' . $width . '" data-style="' . $style . '" data-on="' . $on . '" data-off="' . $off . '">';
$output .= '<input type="hidden" style="display: none; " class="toggle-input wpb_vc_param_value ' . $param_name . ' ' . $type . '" value="' . $value . '" name="' . $param_name . '"/>';
$output .= '<div class="toggle ' . $design . '" style="width: ' . $width . 'px; height: 20px;">';
$output .= '<div class="toggle-slide">';
$output .= '<div class="toggle-inner">';
$output .= '<div class="toggle-on ' . ($value == 'true' ? 'active' : '') . '">' . $on . '</div>';
$output .= '<div class="toggle-blob"></div>';
$output .= '<div class="toggle-off ' . ($value == 'false' ? 'active' : '') . '">' . $off . '</div>';
$output .= '</div>';
$output .= '</div>';
$output .= '</div>';
$output .= '</div>';
return $output;
}
示例5: datetimepicker_setting_field
function datetimepicker_setting_field($settings, $value)
{
global $VISUAL_COMPOSER_EXTENSIONS;
$dependency = vc_generate_dependencies_attributes($settings);
$param_name = isset($settings['param_name']) ? $settings['param_name'] : '';
$type = isset($settings['type']) ? $settings['type'] : '';
$radios = isset($settings['options']) ? $settings['options'] : '';
$period = isset($settings['period']) ? $settings['period'] : '';
$url = $VISUAL_COMPOSER_EXTENSIONS->TS_VCSC_PluginPath;
$output = '';
if ($period == "datetime") {
$output .= '<div class="ts-datetime-picker-element">';
$output .= '<input name="' . $param_name . '" id="' . $param_name . '" class="ts-datetimepicker-value wpb_vc_param_value ' . $param_name . ' ' . $type . '" type="hidden" value="' . $value . '"/>';
//$output .= '<input class="ts-datetimepicker-clear" type="button" value="Clear" style="width: 150px; text-align: center; display: block; height: 30px; padding: 5px; font-size: 12px; line-height: 12px; margin-bottom: 10px;">';
$output .= '<input class="ts-datetimepicker" type="text" placeholder="" value="' . $value . '"/>';
$output .= '</div>';
} else {
if ($period == "date") {
$output .= '<div class="ts-date-picker-element">';
$output .= '<input name="' . $param_name . '" id="' . $param_name . '" class="ts-datepicker-value wpb_vc_param_value ' . $param_name . ' ' . $type . '" type="hidden" value="' . $value . '"/>';
//$output .= '<input class="ts-datetimepicker-clear" type="button" value="Clear" style="width: 150px; text-align: center; display: block; height: 30px; padding: 5px; font-size: 12px; line-height: 12px; margin-bottom: 10px;">';
$output .= '<input class="ts-datepicker" type="text" placeholder="" value="' . $value . '"/>';
$output .= '</div>';
} else {
if ($period == "time") {
$output .= '<div class="ts-time-picker-element">';
$output .= '<input name="' . $param_name . '" id="' . $param_name . '" class="ts-timepicker-value wpb_vc_param_value ' . $param_name . ' ' . $type . '" type="hidden" value="' . $value . '"/>';
//$output .= '<input class="ts-datetimepicker-clear" type="button" value="Clear" style="width: 150px; text-align: center; display: block; height: 30px; padding: 5px; font-size: 12px; line-height: 12px; margin-bottom: 10px;">';
$output .= '<input class="ts-timepicker" type="text" placeholder="" value="' . $value . '"/>';
$output .= '</div>';
}
}
}
return $output;
}
示例6: colorpicker_alpha_gen
function colorpicker_alpha_gen($settings, $value)
{
$base = $opacity = $output = '';
$dependency = function_exists('vc_generate_dependencies_attributes') ? vc_generate_dependencies_attributes($settings) : '';
$param_name = isset($settings['param_name']) ? $settings['param_name'] : '';
$type = isset($settings['type']) ? $settings['type'] : '';
$class = isset($settings['class']) ? $settings['class'] : '';
$uni = uniqid('colorpicker-' . rand());
if ($value != '') {
$arr_v = explode(',', $value);
if (is_array($arr_v)) {
if (isset($arr_v[1])) {
$opacity = $arr_v[1];
}
if (isset($arr_v[0])) {
$base = $arr_v[0];
}
}
} else {
//$opacity=1;
//$base='#fff';
}
$output = '
<input id="alpha_val' . $uni . '" class="wpb_vc_param_value ' . $param_name . ' ' . $type . ' ' . $class . ' vc_column_alpha" value="' . $value . '" ' . $dependency . ' data-uniqid="' . $uni . '" data-opacity="' . $opacity . '" data-hex-code="' . $base . '"/>
';
$output .= '
<input class="wpb_vc_param_value ' . $param_name . ' ' . $type . ' ' . $class . '" ' . $dependency . ' name="' . $param_name . '" value="' . $value . '" style="display:none"/>
<button class="alpha_clear" type="button">' . __('Clear', 'ultimate_vc') . '</button>
';
?>
<script type="text/javascript">
jQuery(document).ready(function(){
function colorpicker_alpha(selector,id_prefix){
jQuery(selector).each(function(){
var aid = jQuery(this).data('uniqid');
jQuery(id_prefix+aid).minicolors({
change: function(hex, opacity) {
console.log(hex+','+opacity);
jQuery(this).parent().next().val(hex+','+opacity);
console.log(jQuery(this).parent().next().attr('class'))
},
opacity: true,
defaultValue: jQuery(this).data('hex-code'),
position: 'default',
});
jQuery('.alpha_clear').click(function(){
jQuery(this).parent().find('input').val('');
jQuery(this).parent().find('.minicolors-swatch-color').css('background-color','');
//$select.val('');
//jQuery(id_prefix+aid).val('');
//jQuery(id_prefix+aid).next().find('.minicolors-swatch-color').css('background-color','');
})
});
}
colorpicker_alpha('.vc_column_alpha','#alpha_val');
})
</script>
<?php
return $output;
}
示例7: ultimate_google_fonts_style_settings
function ultimate_google_fonts_style_settings($settings, $value)
{
$dependency = vc_generate_dependencies_attributes($settings);
$html = '<input type="hidden" name="' . $settings['param_name'] . '" class="wpb_vc_param_value ugfont-style-value ' . $settings['param_name'] . ' ' . $settings['type'] . '_field" value="' . $value . '" ' . $dependency . '/>';
$html .= '<div class="ultimate_fstyle"></div>';
return $html;
}
示例8: gopricing_settings_field
function gopricing_settings_field($settings, $value)
{
global $VISUAL_COMPOSER_EXTENSIONS;
$dependency = vc_generate_dependencies_attributes($settings);
$param_name = isset($settings['param_name']) ? $settings['param_name'] : '';
$type = isset($settings['type']) ? $settings['type'] : '';
$radios = isset($settings['options']) ? $settings['options'] : '';
$url = $VISUAL_COMPOSER_EXTENSIONS->TS_VCSC_PluginPath;
$output = '';
$pricing_tables = get_option('go_pricing_tables');
if (!empty($pricing_tables)) {
$output .= '<select name="' . $param_name . '" id="' . $param_name . '" class="ts-go-pricing-tables wpb-input wpb-select dropdown wpb_vc_param_value ' . $param_name . ' ' . $type . '" style="margin-bottom: 20px;">';
foreach ($pricing_tables as $pricing_table) {
$tableID = $pricing_table['table-id'];
$tableName = $pricing_table['table-name'];
if ($value == $tableID) {
$output .= '<option class="" value="' . $tableID . '" selected>' . $tableName . '</option>';
} else {
$output .= '<option class="" value="' . $tableID . '">' . $tableName . '</option>';
}
}
$output .= '</select>';
} else {
$output .= '<select name="' . $param_name . '" id="' . $param_name . '" class="ts-go-pricing-tables wpb-input wpb-select dropdown wpb_vc_param_value ' . $param_name . ' ' . $type . '" style="margin-bottom: 20px;">';
$output .= '<option class="" value="None">No Tables could be found!</option>';
$output .= '</select>';
}
return $output;
}
示例9: parramMegaLayout
function parramMegaLayout($settings, $value)
{
$dependency = vc_generate_dependencies_attributes($settings);
ob_start();
?>
<div class="layout_images">
<?php
foreach ($settings['layout_images'] as $key => $image) {
echo '<img src="' . $image . '" data-layout="' . $key . '" class="' . $key . ' ' . ($key == $value ? 'active' : '') . '">';
}
?>
</div>
<input type="hidden"
name="<?php
echo $settings['param_name'];
?>
"
class="layout_image_field wpb_vc_param_value wpb-textinput <?php
echo $settings['param_name'] . ' ' . $settings['type'] . '_field';
?>
"
value="<?php
echo $value;
?>
" <?php
echo $dependency;
?>
>
<?php
return ob_get_clean();
}
示例10: messenger_settings_field
function messenger_settings_field($settings, $value)
{
global $VISUAL_COMPOSER_EXTENSIONS;
$dependency = vc_generate_dependencies_attributes($settings);
$param_name = isset($settings['param_name']) ? $settings['param_name'] : '';
$message = isset($settings['message']) ? $settings['message'] : '';
$type = isset($settings['type']) ? $settings['type'] : '';
$suffix = isset($settings['suffix']) ? $settings['suffix'] : '';
$class = isset($settings['class']) ? $settings['class'] : '';
$color = isset($settings['color']) ? $settings['color'] : '#000000';
$weight = isset($settings['weight']) ? $settings['weight'] : 'normal';
$size = isset($settings['size']) ? $settings['size'] : '12';
$margin_top = isset($settings['margin_top']) ? $settings['margin_top'] : '10';
$margin_bottom = isset($settings['margin_bottom']) ? $settings['margin_bottom'] : '10';
$padding_top = isset($settings['padding_top']) ? $settings['padding_top'] : '10';
$padding_bottom = isset($settings['padding_bottom']) ? $settings['padding_bottom'] : '10';
$border_top = isset($settings['border_top']) ? $settings['border_top'] : 'true';
$border_bottom = isset($settings['border_bottom']) ? $settings['border_bottom'] : 'true';
$url = $VISUAL_COMPOSER_EXTENSIONS->TS_VCSC_PluginPath;
$output = '';
if ($message != '') {
$output .= '<div id="' . $param_name . '" class="wpb_vc_param_value ' . $param_name . ' ' . $type . '" name="' . $param_name . '" style="text-align: justify; ' . ($border_top == "true" ? "border-top: 1px solid #dddddd;" : "") . ' ' . ($border_bottom == "true" ? "border-bottom: 1px solid #dddddd;" : "") . ' color: ' . $color . '; margin: ' . $margin_top . 'px 0 ' . $margin_bottom . 'px 0; padding: ' . $padding_top . 'px 0 ' . $padding_bottom . 'px 0; font-size: ' . $size . 'px; font-weight: ' . $weight . ';">' . $message . '</div>';
} else {
$output .= '<div id="' . $param_name . '" class="wpb_vc_param_value ' . $param_name . ' ' . $type . '" name="' . $param_name . '" style="text-align: justify; ' . ($border_top == "true" ? "border-top: 1px solid #dddddd;" : "") . ' ' . ($border_bottom == "true" ? "border-bottom: 1px solid #dddddd;" : "") . ' color: ' . $color . '; margin: ' . $margin_top . 'px 0 ' . $margin_bottom . 'px 0; padding: ' . $padding_top . 'px 0 ' . $padding_bottom . 'px 0; font-size: ' . $size . 'px; font-weight: ' . $weight . ';">' . $value . '</div>';
}
return $output;
}
示例11: mapmarker_settings_field
function mapmarker_settings_field($settings, $value)
{
global $VISUAL_COMPOSER_EXTENSIONS;
$dependency = vc_generate_dependencies_attributes($settings);
$param_name = isset($settings['param_name']) ? $settings['param_name'] : '';
$type = isset($settings['type']) ? $settings['type'] : '';
$pattern_select = isset($settings['value']) ? $settings['value'] : '';
$encoding = isset($settings['encoding']) ? $settings['encoding'] : '';
$url = $VISUAL_COMPOSER_EXTENSIONS->TS_VCSC_PluginPath;
$dir = $VISUAL_COMPOSER_EXTENSIONS->TS_VCSC_PluginDir;
$output = '';
$counter = 0;
$output .= __("Search for Marker:", "ts_visual_composer_extend");
$output .= '<input name="ts-font-marker-search" id="ts-font-marker-search" class="ts-font-marker-search" type="text" placeholder="Search ..." />';
$output .= '<div class="ts-visual-selector ts-font-marker-wrapper">';
$output .= '<input name="' . $param_name . '" id="' . $param_name . '" class="wpb_vc_param_value ' . $param_name . ' ' . $type . '" type="hidden" value="' . $value . '"/>';
$markerpath = $dir . 'images/marker/';
$images = glob($markerpath . "*.png");
foreach ($images as $img) {
$markername = basename($img);
$counter++;
if ($value == '' && $counter == 1) {
$output .= '<a class="TS_VCSC_Marker_Link current" href="#" title="' . __("Marker Name:", "ts_visual_composer_extend") . ': ' . $markername . '" rel="' . $markername . '"><img src="' . TS_VCSC_GetResourceURL('images/marker/') . $markername . '" style="height: 37px; width: 32px;"><div class="selector-tick"></div></a>';
} else {
if ($value == $markername) {
$output .= '<a class="TS_VCSC_Marker_Link current" href="#" title="' . __("Marker Name:", "ts_visual_composer_extend") . ': ' . $markername . '" rel="' . $markername . '"><img src="' . TS_VCSC_GetResourceURL('images/marker/') . $markername . '" style="height: 37px; width: 32px;"><div class="selector-tick"></div></a>';
} else {
$output .= '<a class="TS_VCSC_Marker_Link" href="#" title="' . __("Marker Name:", "ts_visual_composer_extend") . ': ' . $markername . '" rel="' . $markername . '"><img src="' . TS_VCSC_GetResourceURL('images/marker/') . $markername . '" style="height: 37px; width: 32px;"></a>';
}
}
}
$output .= '</div>';
return $output;
}
示例12: audioselect_settings_field
function audioselect_settings_field($settings, $value)
{
global $VISUAL_COMPOSER_EXTENSIONS;
$dependency = vc_generate_dependencies_attributes($settings);
$param_name = isset($settings['param_name']) ? $settings['param_name'] : '';
$type = isset($settings['type']) ? $settings['type'] : '';
$audio_format = isset($settings['audio_format']) ? $settings['audio_format'] : 'mpeg';
$audio_format = explode(',', $audio_format);
$url = $VISUAL_COMPOSER_EXTENSIONS->TS_VCSC_PluginPath;
$output = '';
$args = array('post_type' => 'attachment', 'post_mime_type' => 'audio', 'post_status' => 'inherit', 'posts_per_page' => -1);
if ($value != '') {
$metadata = wp_get_attachment_metadata($value);
$disabled = '';
$visible = 'display: block;';
$query_audios = new WP_Query($args);
if ($query_audios->have_posts()) {
foreach ($query_audios->posts as $audio) {
if ($audio->ID == $value) {
$audio_id = $value;
$audio_title = $audio->post_title;
$audio_length = isset($metadata['length_formatted']) ? $metadata['length_formatted'] : 'N/A';
break;
}
}
}
wp_reset_postdata();
} else {
$metadata = array();
$disabled = 'disabled="disabled"';
$visible = 'display: none;';
$audio_id = '';
$audio_title = '';
$audio_url = '';
$audio_length = '';
}
$output .= '<div class="ts_vcsc_audio_select_block" data-format="' . implode(',', $audio_format) . '">';
$output .= '<input style="display: none;" name="' . $settings['param_name'] . '" class="wpb_vc_param_value wpb-textinput audio_value ' . $param_name . ' ' . $type . '_field" type="text" value="' . $value . '" ' . $dependency . '/>';
$output .= '<input type="button" class="audio_select button" value="' . __('Select Audio', 'ts_visual_composer_extend') . '" style="width: 150px; text-align: center;">';
$output .= '<input type="button" class="audio_remove button" value="' . __('Remove Audio', 'ts_visual_composer_extend') . '" style="width: 150px; text-align: center; color: red; margin-left: 20px;" ' . $disabled . '>';
$output .= '<div class="audio_metadata_frame" style="width: 100%; margin-top: 20px; ' . $visible . '">';
$output .= '<div style="float: left; width: 92px; margin-right: 10px;">';
if (in_array("mp3", $audio_format) || in_array("mpeg", $audio_format)) {
$output .= '<img src="' . TS_VCSC_GetResourceURL('images/mediatypes/mp3_audio.jpg') . '" style="width: 90px; height: auto; border: 1px solid #ededed;">';
} else {
if (in_array("ogg", $audio_format) || in_array("ogv", $audio_format)) {
$output .= '<img src="' . TS_VCSC_GetResourceURL('images/mediatypes/ogg_audio.jpg') . '" style="width: 90px; height: auto; border: 1px solid #ededed;">';
}
}
$output .= '</div>';
$output .= '<div style="float: left;">';
$output .= '<div style=""><span style="">' . __('Audio ID', 'ts_visual_composer_extend') . ': </span><span class="audio_metadata audio_id">' . $audio_id . '</span></div>';
$output .= '<div style=""><span style="">' . __('Audio Name', 'ts_visual_composer_extend') . ': </span><span class="audio_metadata audio_name">' . $audio_title . '</span></div>';
$output .= '<div style=""><span style="">' . __('Audio Duration', 'ts_visual_composer_extend') . ': </span><span class="audio_metadata audio_duration">' . ($audio_length != '' ? $audio_length : 'N/A') . '</span></div>';
$output .= '</div>';
$output .= '</div>';
$output .= '</div>';
return $output;
}
示例13: ultimate_responsive_callback
function ultimate_responsive_callback($settings, $value)
{
$dependency = vc_generate_dependencies_attributes($settings);
$unit = $settings['unit'];
$medias = $settings['media'];
if (is_numeric($value)) {
$value = "desktop:" . $value . 'px;';
}
$uid = 'ultimate-responsive-' . rand(1000, 9999);
$html = '<div class="ultimate-responsive-wrapper" id="' . $uid . '" >';
$html .= ' <div class="ultimate-responsive-items" >';
foreach ($medias as $key => $default_value) {
//$html .= $key;
switch ($key) {
/*case 'Large Screen':
$data_id = strtolower((preg_replace('/\s+/', '_', $key)));
$class = 'required';
$dashicon = "<i class='dashicons dashicons-welcome-view-site'></i>";
$html .= $this->ultimate_responsive_param_media($class, $dashicon, $key, $default_value ,$unit, $data_id);
break;*/
case 'Desktop':
$class = 'required';
$data_id = strtolower(preg_replace('/\\s+/', '_', $key));
$dashicon = "<i class='dashicons dashicons-desktop'></i>";
$html .= $this->ultimate_responsive_param_media($class, $dashicon, $key, $default_value, $unit, $data_id);
$html .= "<div class='simplify'>\n\t\t\t\t\t\t\t\t\t\t<div class='ult-tooltip simplify-options'>" . __("Responsive Options", "ultimate_vc") . "</div>\n\t\t\t\t\t\t\t\t\t\t<i class='simplify-icon dashicons dashicons-arrow-right-alt2'></i>\n\t\t\t\t\t\t\t\t\t </div>";
break;
case 'Tablet':
$class = 'optional';
$data_id = strtolower(preg_replace('/\\s+/', '_', $key));
$dashicon = "<i class='dashicons dashicons-tablet' style='transform: rotate(90deg);'></i>";
$html .= $this->ultimate_responsive_param_media($class, $dashicon, $key, $default_value, $unit, $data_id);
break;
case 'Tablet Portrait':
$class = 'optional';
$data_id = strtolower(preg_replace('/\\s+/', '_', $key));
$dashicon = "<i class='dashicons dashicons-tablet'></i>";
$html .= $this->ultimate_responsive_param_media($class, $dashicon, $key, $default_value, $unit, $data_id);
break;
case 'Mobile Landscape':
$class = 'optional';
$data_id = strtolower(preg_replace('/\\s+/', '_', $key));
$dashicon = "<i class='dashicons dashicons-smartphone' style='transform: rotate(90deg);'></i>";
$html .= $this->ultimate_responsive_param_media($class, $dashicon, $key, $default_value, $unit, $data_id);
break;
case 'Mobile':
$class = 'optional';
$data_id = strtolower(preg_replace('/\\s+/', '_', $key));
$dashicon = "<i class='dashicons dashicons-smartphone'></i>";
$html .= $this->ultimate_responsive_param_media($class, $dashicon, $key, $default_value, $unit, $data_id);
break;
}
}
$html .= ' </div>';
$html .= $this->get_units($unit);
$html .= ' <input type="hidden" data-unit="' . $unit . '" name="' . $settings['param_name'] . '" class="wpb_vc_param_value ultimate-responsive-value ' . $settings['param_name'] . ' ' . $settings['type'] . '_field" value="' . $value . '" ' . $dependency . ' />';
$html .= '</div>';
return $html;
}
示例14: imagehotspot_settings_field
function imagehotspot_settings_field($settings, $value)
{
global $VISUAL_COMPOSER_EXTENSIONS;
$dependency = vc_generate_dependencies_attributes($settings);
$param_name = isset($settings['param_name']) ? $settings['param_name'] : '';
$type = isset($settings['type']) ? $settings['type'] : '';
$min = isset($settings['min']) ? $settings['min'] : '';
$max = isset($settings['max']) ? $settings['max'] : '';
$step = isset($settings['step']) ? $settings['step'] : '';
$unit = isset($settings['unit']) ? $settings['unit'] : '';
$decimals = isset($settings['decimals']) ? $settings['decimals'] : 0;
$suffix = isset($settings['suffix']) ? $settings['suffix'] : '';
$class = isset($settings['class']) ? $settings['class'] : '';
$url = $VISUAL_COMPOSER_EXTENSIONS->TS_VCSC_PluginPath;
$coordinates = explode(",", $value);
$output = '';
$required_vc = '4.3.0';
if (defined('WPB_VC_VERSION')) {
if (version_compare(WPB_VC_VERSION, $required_vc) >= 0) {
// Hotspot Image Preview
$output .= '<div class="ts-image-hotspot-container-preview" style="margin-top: 30px;">';
$output .= '<img class="ts-image-hotspot-image-preview" data-default="' . TS_VCSC_GetResourceURL('images/other/hotspot_raster.jpg') . '" src="">';
$output .= '<div class="ts-image-hotspot-holder-preview">';
$output .= '<div class="ts-image-hotspot-single-preview" style="left: ' . $coordinates[0] . '%; top: ' . $coordinates[1] . '%;">';
$output .= '<div class="ts-image-hotspot-trigger-preview"><div class="ts-image-hotspot-trigger-pulse"></div><div class="ts-image-hotspot-trigger-dot"></div></div>';
$output .= '</div>';
$output .= '</div>';
$output .= '</div>';
$output .= '<div class="vc_clearfix"></div>';
// Message
$output .= '<div class="" style="text-align: justify; margin-top: 30px; font-size: 13px; font-style: italic; color: #999999;">' . __("Use the sliders below or use your mouse to drag the hotspot to its desired spot on the image.", "ts_visual_composer_extend") . '</div>';
} else {
// Message
$output .= '<div class="" style="text-align: justify; margin-top: 0px; font-size: 13px; font-style: italic; color: #999999;">' . __("Use the sliders below to position the hotspot on its desired spot on the image.", "ts_visual_composer_extend") . '</div>';
}
} else {
// Message
$output .= '<div class="" style="text-align: justify; margin-top: 0px; font-size: 13px; font-style: italic; color: #999999;">' . __("Use the sliders below to position the hotspot on its desired spot on the image.", "ts_visual_composer_extend") . '</div>';
}
// Hidden Input
$output .= '<input name="' . $param_name . '" id="' . $param_name . '" class="ts-nouislider-hotspot-value wpb_vc_param_value ' . $param_name . ' ' . $type . '" type="hidden" value="' . $value . '"/>';
// X-Position Slider
$output .= '<div class="ts-nouislider-hotspot-slider" style="width: 100%; margin-top: 20px;">';
$output .= '<div class="" style="font-weight: bold;">' . __("Horizontal Position (X)", "ts_visual_composer_extend") . '</div>';
$output .= '<input id="ts-input-hotspot-horizontal" style="width: 100px; float: left; margin-left: 0px; margin-right: 10px;" name="" class="ts-nouislider-serial nouislider-input-selector nouislider-input-composer" type="text" value="' . $coordinates[0] . '"/>';
$output .= '<span style="float: left; margin-right: 30px; margin-top: 10px;" class="unit">' . $unit . '</span>';
$output .= '<div id="ts-nouislider-hotspot-horizontal" class="ts-nouislider-input ts-nouislider-hotspot-element" data-position="horizontal" data-value="' . $coordinates[0] . '" data-min="' . $min . '" data-max="' . $max . '" data-decimals="' . $decimals . '" data-step="' . $step . '" style="width: 250px; float: left; margin-top: 10px;"></div>';
$output .= '</div>';
$output .= '<div class="vc_clearfix"></div>';
// Y-Position Slider
$output .= '<div class="ts-nouislider-hotspot-slider" style="width: 100%; margin-top: 20px;">';
$output .= '<div class="" style="font-weight: bold;">' . __("Vertical Position (Y)", "ts_visual_composer_extend") . '</div>';
$output .= '<input id="ts-input-hotspot-vertical" style="width: 100px; float: left; margin-left: 0px; margin-right: 10px;" name="" class="ts-nouislider-serial nouislider-input-selector nouislider-input-composer" type="text" value="' . $coordinates[1] . '"/>';
$output .= '<span style="float: left; margin-right: 30px; margin-top: 10px;" class="unit">' . $unit . '</span>';
$output .= '<div id="ts-nouislider-hotspot-vertical" class="ts-nouislider-input ts-nouislider-hotspot-element" data-position="vertical" data-value="' . $coordinates[1] . '" data-min="' . $min . '" data-max="' . $max . '" data-decimals="' . $decimals . '" data-step="' . $step . '" style="width: 250px; float: left; margin-top: 10px;"></div>';
$output .= '</div>';
return $output;
}
示例15: ult_param_heading_callback
function ult_param_heading_callback($settings, $value)
{
$dependency = vc_generate_dependencies_attributes($settings);
$param_name = isset($settings['param_name']) ? $settings['param_name'] : '';
$class = isset($settings['class']) ? $settings['class'] : '';
$text = isset($settings['text']) ? $settings['text'] : '';
$output = '<h4 ' . $dependency . ' class="wpb_vc_param_value ' . $class . '">' . $text . '</h4>';
return $output;
}