本文整理汇总了PHP中vcex_inline_style函数的典型用法代码示例。如果您正苦于以下问题:PHP vcex_inline_style函数的具体用法?PHP vcex_inline_style怎么用?PHP vcex_inline_style使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了vcex_inline_style函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: implode
}
$caption_data = implode(' ', $caption_data);
// Caption classes
$caption_classes = array('wpex-slider-caption', 'sp-layer', 'sp-padding', 'clr');
if ($caption_visibility) {
$caption_classes[] = $caption_visibility;
}
if ($caption_style) {
$caption_classes[] = 'sp-' . $caption_style;
}
if ('true' == $caption_rounded) {
$caption_classes[] = 'sp-rounded';
}
$caption_classes = implode(' ', $caption_classes);
// Caption style
$caption_inline_style = vcex_inline_style(array('font_size' => $caption_font_size, 'padding' => $caption_padding));
}
// Main Classes
$wrap_classes = array('wpex-slider', 'slider-pro', 'vcex-image-slider', 'clr');
if ($classes) {
$wrap_classes[] = $this->getExtraClass($classes);
}
if ($visibility) {
$wrap_classes[] = $visibility;
}
if ('lightbox' == $thumbnail_link) {
$wrap_classes[] = 'lightbox-group';
if ($lightbox_skin) {
$wrap_data[] = 'data-skin="' . $lightbox_skin . '"';
vcex_enque_style('ilightbox', $lightbox_skin);
}
示例2: vcex_inline_js
$wrap_classes[] = 'wpex-hover-white-text';
}
// Inline js
if ($color_hover || $background_hover) {
vcex_inline_js('data_hover');
}
// Inner style
$inner_style_attr = vcex_inline_style(array('border_color' => $inner_bottom_border_color));
// Icon output
if ($icon = vcex_get_icon_class($atts, 'icon')) {
// Enqueue needed icon font
if ('fontawesome' != $icon_type) {
vcex_enqueue_icon_font($icon_type);
}
// Icon style
$icon_style_attr = vcex_inline_style(array('color' => $icon_color));
// Icon output
$icon_output = '<div class="vcex-icon-wrap vcex-icon-position-' . $icon_position . '"' . $icon_style_attr . '><span class="' . $icon . '"></span></div>';
// Add icon to heading
if ('left' == $icon_position) {
$icon_left = $icon_output;
} else {
$icon_right = $icon_output;
}
}
// Implode data
$wrap_classes = implode(' ', $wrap_classes);
$link_html = implode(' ', $link_html);
$wrap_data = implode(' ', $wrap_data);
// Generate heading
$output = '<' . $tag . ' class="' . $wrap_classes . '"' . $link_html . $heading_style_attr . $wrap_data . '>';
示例3: extract
<?php
extract(shortcode_atts(array('title' => '', 'element_type' => 'div', 'title_align' => 'separator_align_center', 'el_class' => '', 'el_width' => '', 'font_size' => '', 'font_weight' => '', 'style' => 'one', 'margin_bottom' => '', 'span_background' => '', 'span_color' => '', 'border_color' => '', 'align' => 'align_center', 'el_width' => '', 'border_width' => '', 'color' => '', 'accent_color' => '', 'layout' => 'separator_with_text'), $atts));
/*-----------------------------------------------------------------------------------*/
/* - Modified Separator With Text
/*-----------------------------------------------------------------------------------*/
if ('separator_with_text' == $layout) {
// Define class
$class = "vc_separator wpb_content_element";
// Add extra classes
$el_class = $this->getExtraClass($el_class);
// Main Style
$main_style = vcex_inline_style(array('font_size' => $font_size, 'font_weight' => $font_weight, 'margin_bottom' => $margin_bottom));
// Span Style
$span_style = vcex_inline_style(array('background' => $span_background, 'color' => $span_color, 'border_color' => $border_color));
// Add classes\
$class .= ' vc_text_separator';
$class .= ' vc_text_separator_' . $style;
$class .= $this->getExtraClass($el_class);
$class .= $title_align ? ' ' . $title_align : '';
$class .= $el_width ? ' vc_sep_width_' . $el_width : ' vc_sep_width_100';
//$class .= ( $color && 'custom' != $color ) ? ' vc_sep_color_' . $color : '';
$css_class = apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, $class, $this->settings['base'], $atts);
?>
<<?php
echo $element_type;
?>
class="<?php
echo $class;
?>
示例4: vcex_inline_style
}
// Item Margin
if ('no-margins' == $style) {
$items_margin = '0';
}
// Items to scroll fallback for old setting
if ('page' == $items_scroll) {
$items_scroll = $items;
}
// Title design
if ('yes' == $title) {
$heading_style = vcex_inline_style(array('margin' => $content_heading_margin, 'text_transform' => $content_heading_transform, 'font_weight' => $content_heading_weight, 'font_size' => $content_heading_size, 'color' => $content_heading_color));
}
// Content Design
if ('yes' == $title || 'yes' == $caption) {
$content_style = vcex_inline_style(array('background' => $content_background, 'padding' => $content_padding, 'margin' => $content_margin, 'border' => $content_border, 'font_size' => $content_font_size, 'color' => $content_color, 'text_align' => $content_alignment));
}
// Main Classes
$wrap_classes = array('wpex-carousel', 'wpex-carousel-images', 'clr', 'owl-carousel');
if ($style) {
$wrap_classes[] = $style;
}
if ($classes) {
$wrap_classes[] = $this->getExtraClass($classes);
}
$wrap_classes = implode(' ', $wrap_classes);
?>
<div<?php
echo vcex_html('id_attr', $unique_id);
?>
示例5: isset
// Not needed in admin ever
if (is_admin()) {
return;
}
// Fallbacks (old atts)
$link_title = isset($atts['link_title']) ? $atts['link_title'] : '';
$link_target = isset($atts['link_target']) ? $atts['link_target'] : '';
// Get and extract shortcode attributes
extract(vc_map_get_attributes($this->getShortcode(), $atts));
// Primary and secondary imags required
if (!$primary_image || !$secondary_image) {
return;
}
// Add styles
$wrapper_inline_style = vcex_inline_style(array('width' => $container_width));
$image_style = vcex_inline_style(array('border_radius' => $border_radius), false);
// Add classes
$wrapper_classes = array('vcex-image-swap', 'clr');
if ($classes) {
$wrapper_classes[] = $this->getExtraClass($classes);
}
if ($css_animation) {
$wrapper_classes[] = $this->getCSSAnimation($css_animation);
}
$wrapper_classes = implode(' ', $wrapper_classes);
?>
<?php
if ($primary_image && $secondary_image) {
?>
示例6: vcex_inline_style
// Month Style
if ('true' == $date) {
$month_style = vcex_inline_style(array('background_color' => $month_background, 'color' => $month_color));
}
// Readmore design and classes
if ('true' == $read_more) {
// Readmore text
$read_more_text = $read_more_text ? $read_more_text : esc_html__('read more', 'total');
// Readmore classes
$readmore_classes = wpex_get_button_classes($readmore_style, $readmore_style_color);
if ($readmore_hover_color || $readmore_hover_background) {
$readmore_classes .= ' wpex-data-hover';
}
// Read more style
$readmore_border_color = 'outline' == $readmore_style ? $readmore_color : '';
$readmore_style = vcex_inline_style(array('background' => $readmore_background, 'color' => $readmore_color, 'border_color' => $readmore_border_color, 'font_size' => $readmore_size, 'padding' => $readmore_padding, 'border_radius' => $readmore_border_radius, 'margin' => $readmore_margin));
// Readmore data
$readmore_data = '';
if ($readmore_hover_color) {
$readmore_data .= ' data-hover-color="' . $readmore_hover_color . '"';
}
if ($readmore_hover_background) {
$readmore_data .= ' data-hover-background="' . $readmore_hover_background . '"';
}
}
// Hover js
if ($readmore_hover_color || $readmore_hover_background) {
$inline_js[] = 'data_hover';
}
// Load inline js
if (!empty($inline_js)) {
示例7: wpex_overlay_classes
}
if ($overlay_style) {
$media_classes[] = wpex_overlay_classes($overlay_style);
}
$media_classes = implode(' ', $media_classes);
// Content Design
$content_style = vcex_inline_style(array('color' => $content_color, 'text_align' => $content_alignment));
$content_css = $content_css ? vc_shortcode_custom_css_class($content_css) : '';
// Title design
if ('true' == $title) {
$heading_style = vcex_inline_style(array('margin' => $content_heading_margin, 'text_transform' => $content_heading_transform, 'font_size' => $content_heading_size, 'font_weight' => $content_heading_weight, 'line_height' => $content_heading_line_height));
$content_heading_color = vcex_inline_style(array('color' => $content_heading_color));
}
// Date design
if ('true' == $date) {
$date_style = vcex_inline_style(array('color' => $date_color, 'font_size' => $date_font_size, 'margin' => $date_margin));
}
// Sanitize carousel data to prevent errors
$items = $items ? $items : 4;
$items_scroll = $items_scroll ? $items_scroll : 1;
$arrows = $arrows ? $arrows : 'true';
$dots = $dots ? $dots : 'false';
$auto_play = $auto_play ? $auto_play : 'false';
$infinite_loop = $infinite_loop ? $infinite_loop : 'true';
$timeout_duration = $timeout_duration ? $timeout_duration : 5000;
$center = $center ? $center : 'false';
$items_margin = $items_margin ? absint($items_margin) : 15;
$items_margin = 'no-margins' == $style ? 0 : $items_margin;
$tablet_items = $tablet_items ? $tablet_items : 3;
$mobile_landscape_items = $mobile_landscape_items ? $mobile_landscape_items : 2;
$mobile_portrait_items = $mobile_portrait_items ? $mobile_portrait_items : 1;
示例8: vc_shortcode_custom_css_class
$wrap_classes[] = 'with-button';
}
if ($visibility) {
$wrap_classes[] = $visibility;
}
if ($css_animation) {
$wrap_classes[] = $this->getCSSAnimation($css_animation);
}
if ($classes) {
$wrap_classes[] = $this->getExtraClass($classes);
}
$wrap_classes[] = vc_shortcode_custom_css_class($css);
$wrap_classes = implode(' ', $wrap_classes);
// Button style
if ($button_url && $button_text) {
$button_inline_style = vcex_inline_style(array('border_radius' => $button_border_radius));
}
?>
<div class="<?php
echo esc_attr($wrap_classes);
?>
"<?php
vcex_unique_id($unique_id);
?>
>
<?php
// Display content
if ($content) {
?>
示例9: implode
}
$media_classes = implode(' ', $media_classes);
}
// Content Design
$content_style = vcex_inline_style(array('background' => $content_background, 'padding' => $content_padding, 'margin' => $content_margin, 'border' => $content_border, 'opacity' => $content_opacity, 'text_align' => $content_alignment));
// Title design
if ('true' == $title) {
$heading_style = vcex_inline_style(array('margin' => $content_heading_margin, 'font_size' => $content_heading_size, 'font_weight' => $content_heading_weight, 'text_transform' => $content_heading_transform, 'line_height' => $content_heading_line_height, 'color' => $content_heading_color));
}
// Date design
if ('true' == $date) {
$date_style = vcex_inline_style(array('color' => $date_color, 'font_size' => $date_font_size));
}
// Excerpt style
if ('true' == $excerpt) {
$excerpt_styling = vcex_inline_style(array('color' => $content_color, 'font_size' => $content_font_size));
}
// Sanitize carousel data to prevent errors
$items = $items ? $items : 4;
$items_scroll = $items_scroll ? $items_scroll : 1;
$arrows = $arrows ? $arrows : 'true';
$dots = $dots ? $dots : 'false';
$auto_play = $auto_play ? $auto_play : 'false';
$infinite_loop = $infinite_loop ? $infinite_loop : 'true';
$timeout_duration = $timeout_duration ? $timeout_duration : 5000;
$center = $center ? $center : 'false';
$items_margin = $items_margin ? $items_margin : 15;
$items_margin = 'no-margins' == $style ? 0 : $items_margin;
$tablet_items = $tablet_items ? $tablet_items : 3;
$mobile_landscape_items = $mobile_landscape_items ? $mobile_landscape_items : 2;
$mobile_portrait_items = $mobile_portrait_items ? $mobile_portrait_items : 1;
示例10: vcex_inline_style
?>
>
<?php
}
?>
<?php
// define inner output
$inner_output = '';
// Add icon if defined
if ($icon) {
// Icon classes
$icon_wrap_classes = 'vcex-icon-wrap';
// Icon inline style
$icon_style = vcex_inline_style(array('background' => $icon_background, 'width' => $icon_width, 'border_radius' => $icon_border_radius, 'height' => $icon_height, 'line_height' => wpex_sanitize_data($icon_height, 'px'), 'margin_right' => $margin_right, 'font_size' => $icon_size, 'color' => $color));
// Add icon to output
$inner_output .= '<div class="' . $icon_wrap_classes . '"' . $icon_style . '><span class="' . $icon . '"></span></div>';
}
// Add content to output
if ($content) {
$inner_output .= do_shortcode($content);
}
// Echo inner content (icon_content)
echo $inner_output;
// Close link tag
if ($url) {
echo '</a>';
}
?>
示例11: array
$lightbox_class = 'wpex-lightbox';
}
// Hover Classes
$hover_classes = array();
if ($img_filter) {
$hover_classes[] = wpex_image_filter_class($img_filter);
}
if ($img_hover_style) {
$hover_classes[] = wpex_image_hover_classes($img_hover_style);
}
$hover_classes = implode(' ', $hover_classes);
// Title style & title related vars
if ('yes' == $title) {
$title_tag = $title_tag ? $title_tag : 'h2';
$title_type = $title_type ? $title_type : 'title';
$title_style = vcex_inline_style(array('font_size' => $title_size, 'color' => $title_color, 'text_transform' => $title_transform, 'line_height' => $title_line_height, 'margin' => $title_margin, 'font_weight' => $title_weight));
}
// Load inline js for front-end editor
if ($inline_js) {
vcex_inline_js($inline_js);
}
?>
<?php
// Open CSS div
if ($css) {
?>
<div class="vcex-image-grid-css-wrapper <?php
echo vc_shortcode_custom_css_class($css);
?>
示例12: vcex_inline_style
echo '</a>';
}
?>
</<?php
echo $heading_type;
?>
>
<?php
}
?>
<?php
// Content
if ($content) {
$text_style = vcex_inline_style(array('font_size' => $content_font_size, 'color' => $content_color, 'font_weight' => $content_font_weight));
?>
<div class="vcex-teaser-text remove-last-p-margin clr"<?php
echo $text_style;
?>
>
<?php
echo do_shortcode(wpautop($content));
?>
</div><!-- .vcex-teaser-text -->
<?php
}
?>
示例13: vcex_inline_style
// Icon style
$icon_style = vcex_inline_style(array('font_size' => $icon_size, 'border_radius' => $icon_border_radius, 'color' => $icon_color, 'background' => $icon_bg, 'padding' => $icon_padding, 'height' => $icon_height, 'line_height' => wpex_sanitize_data($icon_height, 'px'), 'width' => $icon_width));
// Border style
$vcex_inner_border_style = '';
if ('dotted' != $style) {
$border_top_width = 'double' == $style ? $height : '';
$top_margin = $height ? $height / 2 : '';
$top_margin = $height && 'double' == $style ? ($height * 2 + 4) / 2 : $top_margin;
$vcex_inner_border_style = vcex_inline_style(array('border_color' => $color, 'border_bottom_width' => $height, 'border_top_width' => $border_top_width, 'margin_top' => -$top_margin));
}
// Reset vars if icon is defined so styles aren't duplicated in main wrapper
$height = $color = '';
}
// Main style
$botttom_height = 'double' == $style ? $height : '';
$wrap_style = vcex_inline_style(array('height' => $dotted_height, 'width' => $width, 'margin_top' => $margin_top, 'margin_bottom' => $margin_bottom, 'border_top_width' => $height, 'border_bottom_width' => $botttom_height, 'border_color' => $color));
// Turn wrap classes into a string
$wrap_classes = implode(' ', $wrap_classes);
?>
<div class="<?php
echo esc_attr($wrap_classes);
?>
"<?php
echo $wrap_style;
?>
>
<?php
if ($icon) {
?>
<div class="vcex-divider-icon">
示例14: vcex_inline_style
$input_style = $submit_style = $submit_data = '';
// Wrapper classes
$wrap_classes = 'vcex-newsletter-form clr';
if ($classes) {
$wrap_classes .= $this->getExtraClass($classes);
}
if ($visibility) {
$wrap_classes .= ' ' . $visibility;
}
if ($css_animation) {
$wrap_classes .= $this->getCSSAnimation($css_animation);
}
// Input Style
$input_style = vcex_inline_style(array('border' => $input_border, 'border_radius' => $input_border_radius, 'padding' => $input_padding, 'letter_spacing' => $input_letter_spacing, 'height' => $input_height, 'background' => $input_bg, 'color' => $input_color, 'font_size' => $input_font_size, 'font_weight' => $input_weight));
// Submit Style
$submit_style = vcex_inline_style(array('height' => $submit_height, 'line_height' => $submit_height, 'margin_top' => $submit_height ? '-' . $submit_height / 2 : '', 'right' => $submit_position_right, 'border' => $submit_border, 'letter_spacing' => $submit_letter_spacing, 'padding' => $submit_padding, 'background' => $submit_bg, 'color' => $submit_color, 'font_size' => $submit_font_size, 'font_weight' => $submit_weight, 'border_radius' => $submit_border_radius));
// Submit classes
$submit_classes = 'vcex-newsletter-form-button';
// Submit Data
if ($submit_hover_bg) {
$submit_data .= ' data-hover-background="' . $submit_hover_bg . '"';
$submit_classes .= ' wpex-data-hover';
}
if ($submit_hover_color) {
$submit_data .= ' data-hover-color="' . $submit_hover_color . '"';
}
// Load inline js for data hover
if ($submit_hover_bg || $submit_hover_color) {
vcex_inline_js(array('data_hover'));
}
// Mailchimp
示例15: wpex_enqueue_google_font
}
?>
</div><!-- .vcex-milestone-number -->
<?php
if (!empty($caption)) {
?>
<?php
// Load custom font
if ($caption_font_family) {
wpex_enqueue_google_font($caption_font_family);
}
// Caption Style
$caption_style = vcex_inline_style(array('font_family' => $caption_font_family, 'color' => $caption_color, 'font_size' => $caption_size, 'font_weight' => $caption_font));
?>
<?php
if ($url && !$url_wrap) {
?>
<a href="<?php
echo esc_url($url);
?>
" class="vcex-milestone-caption"<?php
echo vcex_html('rel_attr', $url_rel);
echo vcex_html('target_attr', $url_target);
echo $caption_style;
?>
><?php