function attr() { $attr = array(); $attr['class'] = 'fusion-reading-box-container reading-box-container-' . $this->tagline_box_counter; if (self::$args['animation_type']) { $animations = FusionCore_Plugin::animations(array('type' => self::$args['animation_type'], 'direction' => self::$args['animation_direction'], 'speed' => self::$args['animation_speed'], 'offset' => self::$args['animation_offset'])); $attr = array_merge($attr, $animations); $attr['class'] .= ' ' . $attr['animation_class']; unset($attr['animation_class']); } $attr['style'] = ''; if (self::$args['margin_top'] || self::$args['margin_top'] === '0') { $attr['style'] .= sprintf('margin-top:%s;', Avada_Sanitize::get_value_with_unit(self::$args['margin_top'])); } if (self::$args['margin_bottom'] || self::$args['margin_bottom'] === '0') { $attr['style'] .= sprintf('margin-bottom:%s;', Avada_Sanitize::get_value_with_unit(self::$args['margin_bottom'])); } if (self::$args['class']) { $attr['class'] .= ' ' . self::$args['class']; } if (self::$args['id']) { $attr['id'] = self::$args['id']; } return $attr; }
function icon_attr() { $attr = array(); $attr['class'] = sprintf('section-separator-icon icon fa %s', FusionCore_Plugin::font_awesome_name_handler(self::$args['icon'])); $attr['style'] = sprintf('color:%s;', self::$args['icon_color']); return $attr; }
/** * Render the shortcode * * @param array $args Shortcode paramters * @param string $content Content between shortcode * * @return string HTML output */ public function render($args, $content = '') { $defaults = FusionCore_Plugin::set_shortcode_defaults(array('class' => '', 'id' => '', 'background_color' => Avada()->settings->get('countdown_background_color'), 'background_image' => Avada()->settings->get('countdown_background_image'), 'background_position' => Avada()->settings->get('countdown_background_position'), 'background_repeat' => Avada()->settings->get('countdown_background_repeat'), 'border_radius' => Avada()->settings->get('countdown_border_radius'), 'counter_box_color' => Avada()->settings->get('countdown_counter_box_color'), 'counter_text_color' => Avada()->settings->get('countdown_counter_text_color'), 'countdown_end' => '2000-01-01 00:00:00', 'dash_titles' => 'short', 'heading_text' => '', 'heading_text_color' => Avada()->settings->get('countdown_heading_text_color'), 'link_text' => '', 'link_text_color' => Avada()->settings->get('countdown_link_text_color'), 'link_target' => Avada()->settings->get('countdown_link_target'), 'link_url' => '', 'show_weeks' => Avada()->settings->get('countdown_show_weeks'), 'subheading_text' => '', 'subheading_text_color' => Avada()->settings->get('countdown_subheading_text_color')), $args); extract($defaults); self::$args = $defaults; $html = sprintf('<div %s>', FusionCore_Plugin::attributes('countdown-shortcode')); $html .= self::get_styles(); $html .= sprintf('<div %s>', FusionCore_Plugin::attributes('fusion-countdown-heading-wrapper')); $html .= sprintf('<div %s>%s</div>', FusionCore_Plugin::attributes('fusion-countdown-subheading'), $subheading_text); $html .= sprintf('<div %s>%s</div>', FusionCore_Plugin::attributes('fusion-countdown-heading'), $heading_text); $html .= '</div>'; $html .= sprintf('<div %s>', FusionCore_Plugin::attributes('countdown-shortcode-counter-wrapper')); $dashes = array(array('show' => $show_weeks, 'class' => 'weeks', 'shortname' => __('Weeks', 'fusion-core'), 'longname' => __('Weeks', 'fusion-core')), array('show' => 'yes', 'class' => 'days', 'shortname' => __('Days', 'fusion-core'), 'longname' => __('Days', 'fusion-core')), array('show' => 'yes', 'class' => 'hours', 'shortname' => __('Hrs', 'fusion-core'), 'longname' => __('Hours', 'fusion-core')), array('show' => 'yes', 'class' => 'minutes', 'shortname' => __('Min', 'fusion-core'), 'longname' => __('Minutes', 'fusion-core')), array('show' => 'yes', 'class' => 'seconds', 'shortname' => __('Sec', 'fusion-core'), 'longname' => __('Seconds', 'fusion-core'))); $dash_class = ''; if (!self::$args['counter_box_color'] || self::$args['counter_box_color'] == 'transparent') { $dash_class = ' fusion-no-bg'; } for ($i = 0; $i < count($dashes); $i++) { if ($dashes[$i]['show'] == 'yes') { $html .= sprintf('<div class="fusion-dash-wrapper %s"><div class="fusion-dash fusion-dash-%s">%s<div class="fusion-digit">0</div><div class="fusion-digit">0</div><div class="fusion-dash-title">%s</div></div></div>', $dash_class, $dashes[$i]['class'], $dashes[$i]['class'] == 'days' ? '<div class="fusion-first-digit fusion-digit">0</div>' : '', $dashes[$i][$dash_titles . 'name']); } } $html .= '</div>'; $html .= sprintf('<div %s>', FusionCore_Plugin::attributes('fusion-countdown-link-wrapper')); $html .= sprintf('<a %s>%s</a>', FusionCore_Plugin::attributes('countdown-shortcode-link'), $link_text); $html .= '</div>'; $html .= do_shortcode($content); $html .= '</div>'; $this->countdown_counter++; return $html; }
function wrapper_attr() { $attr = array(); $attr['class'] = 'fusion-column-wrapper'; $attr['style'] = ''; if (self::$args['background_image']) { $attr['style'] .= sprintf('background:url(%s) %s %s %s;', self::$args['background_image'], self::$args['background_position'], self::$args['background_repeat'], self::$args['background_color']); if (self::$args['background_repeat'] == 'no-repeat') { $attr['style'] .= '-webkit-background-size:cover;-moz-background-size:cover;-o-background-size:cover;background-size:cover;'; } } elseif (self::$args['background_color']) { $attr['style'] .= sprintf('background-color:%s;', self::$args['background_color']); } if (self::$args['border_color'] && self::$args['border_size'] && self::$args['border_style']) { if (FusionCore_Plugin::is_transparent_color(self::$args['border_color'])) { $attr['style'] .= sprintf('outline:%s %s %s;', self::$args['border_size'], self::$args['border_style'], self::$args['border_color']); $attr['style'] .= sprintf('outline-offset: -%s;', self::$args['border_size']); } else { $attr['style'] .= sprintf('border:%s %s %s;', self::$args['border_size'], self::$args['border_style'], self::$args['border_color']); } } if (self::$args['padding']) { $attr['style'] .= sprintf('padding:%s;', self::$args['padding']); } return $attr; }
function attr() { $attr = array(); $attr['class'] = 'fusion-highlight'; $brightness_level = FusionCore_Plugin::calc_color_brightness(self::$args['color']); if ($brightness_level > 140) { $attr['class'] .= ' light'; } else { $attr['class'] .= ' dark'; } if (self::$args['class']) { $attr['class'] .= ' ' . self::$args['class']; } if (self::$args['rounded'] == 'yes') { $attr['class'] .= ' rounded'; } if (self::$args['id']) { $attr['id'] = self::$args['id']; } if (self::$args['color'] == 'black') { $attr['class'] .= ' highlight2'; } else { $attr['class'] .= ' highlight1'; } $attr['style'] = sprintf('background-color:%s;', self::$args['color']); return $attr; }
/** * Render the shortcode * @param array $args Shortcode paramters * @param string $content Content between shortcode * @return string HTML output */ function render($args, $content = '') { global $smof_data; $defaults = FusionCore_Plugin::set_shortcode_defaults(array('class' => '', 'id' => '', 'content_align' => 'left', 'margin_top' => '', 'margin_bottom' => '', 'sep_color' => '', 'size' => 1, 'style_tag' => '', 'style_type' => $smof_data['title_style_type']), $args); if (!$defaults['margin_top'] && isset($smof_data['title_top_margin']) && $smof_data['title_top_margin']) { $defaults['margin_top'] = $smof_data['title_top_margin']; } if (!$defaults['margin_bottom'] && isset($smof_data['title_bottom_margin']) && $smof_data['title_bottom_margin']) { $defaults['margin_bottom'] = $smof_data['title_bottom_margin']; } extract($defaults); self::$args = $defaults; if (!$style_type || $style_type == 'default') { self::$args['style_type'] = $style_type = $smof_data['title_style_type']; } if (strpos($style_type, 'underline') !== FALSE || strpos($style_type, 'none') !== FALSE) { $html = sprintf('<div %s><h%s %s>%s</h%s></div>', FusionCore_Plugin::attributes('title-shortcode'), $size, FusionCore_Plugin::attributes('title-shortcode-heading'), do_shortcode($content), $size); } else { if (self::$args['content_align'] == 'right') { $html = sprintf('<div %s><div %s><div %s></div></div><h%s %s>%s</h%s></div>', FusionCore_Plugin::attributes('title-shortcode'), FusionCore_Plugin::attributes('title-sep-container'), FusionCore_Plugin::attributes('title-shortcode-sep'), $size, FusionCore_Plugin::attributes('title-shortcode-heading'), do_shortcode($content), $size); } elseif (self::$args['content_align'] == 'center') { $html = sprintf('<div %s><div %s><div %s></div></div><h%s %s>%s</h%s><div %s><div %s></div></div></div>', FusionCore_Plugin::attributes('title-shortcode'), FusionCore_Plugin::attributes('title-sep-container title-sep-container-left'), FusionCore_Plugin::attributes('title-shortcode-sep'), $size, FusionCore_Plugin::attributes('title-shortcode-heading'), do_shortcode($content), $size, FusionCore_Plugin::attributes('title-sep-container title-sep-container-right'), FusionCore_Plugin::attributes('title-shortcode-sep')); } else { $html = sprintf('<div %s><h%s %s>%s</h%s><div %s><div %s></div></div></div>', FusionCore_Plugin::attributes('title-shortcode'), $size, FusionCore_Plugin::attributes('title-shortcode-heading'), do_shortcode($content), $size, FusionCore_Plugin::attributes('title-sep-container'), FusionCore_Plugin::attributes('title-shortcode-sep')); } } return $html; }
/** * Render the shortcode * @param array $args Shortcode paramters * @param string $content Content between shortcode * @return string HTML output */ function render($args, $content = '') { $defaults = shortcode_atts(array('class' => 'fusion-lightbox', 'id' => '', 'caption' => '', 'content_type' => 'image', 'lightbox_height' => '', 'lightbox_width' => '', 'src' => '', 'thumbnail' => '', 'title' => ''), $args); extract($defaults); self::$args = $defaults; $html = sprintf('<a %s>%s</a>', FusionCore_Plugin::attributes('lightbox-shortcode'), do_shortcode($content)); return $html; }
/** * Render the shortcode * @param array $args Shortcode paramters * @param string $content Content between shortcode * @return string HTML output */ function render($args, $content = '') { $defaults = FusionCore_Plugin::set_shortcode_defaults(array('class' => '', 'id' => '', 'animation' => false, 'delay' => 0, 'placement' => 'top', 'title' => 'none', 'trigger' => 'hover'), $args); extract($defaults); self::$args = $defaults; $html = sprintf('<span %s>%s</span>', FusionCore_Plugin::attributes('tooltip-shortcode'), do_shortcode($content)); return $html; }
/** * Render the shortcode * @param array $args Shortcode paramters * @param string $content Content between shortcode * @return string HTML output */ function render($args, $content = '') { $defaults = FusionCore_Plugin::set_shortcode_defaults(array('class' => '', 'id' => '', 'link' => ''), $args); extract($defaults); self::$args = $defaults; $html = sprintf('<a %s>%s</a>', FusionCore_Plugin::attributes('one-page-text-link-shortcode'), do_shortcode($content)); return $html; }
/** * Render the shortcode * @param array $args Shortcode paramters * @param string $content Content between shortcode * @return string HTML output */ function render($args, $content = '') { $defaults = shortcode_atts(array('class' => '', 'name' => ''), $args); extract($defaults); self::$args = $defaults; $html = sprintf('<div %s></div>', FusionCore_Plugin::attributes('menu-anchor-shortcode')); return $html; }
/** * Render the shortcode * @param array $args Shortcode paramters * @param string $content Content between shortcode * @return string HTML output */ function render($args, $content = '') { global $smof_data; $defaults = FusionCore_Plugin::set_shortcode_defaults(array('class' => '', 'id' => '', 'boxed' => '', 'boxed_radius' => '', 'color' => strtolower($smof_data['dropcap_color'])), $args); extract($defaults); self::$args = $defaults; $html = sprintf('<span %s>%s</span>', FusionCore_Plugin::attributes('dropcap-shortcode'), do_shortcode($content)); return $html; }
/** * Render the shortcode * @param array $args Shortcode paramters * @param string $content Content between shortcode * @return string HTML output */ function render($args, $content = '') { global $woocommerce, $smof_data; $defaults = FusionCore_Plugin::set_shortcode_defaults(array('class' => '', 'id' => '', 'cat_slug' => '', 'number_posts' => 10, 'show_cats' => 'yes', 'show_price' => 'yes', 'show_buttons' => 'yes', 'picture_size' => 'fixed'), $args); extract($defaults); self::$args = $defaults; $html = ''; $buttons = ''; if (class_exists('Woocommerce')) { $number_posts = (int) $number_posts; $args = array('post_type' => 'product', 'posts_per_page' => $number_posts, 'meta_query' => array(array('key' => '_thumbnail_id', 'compare' => '!=', 'value' => null))); if ($cat_slug) { $cat_id = explode(',', $cat_slug); $args['tax_query'] = array(array('taxonomy' => 'product_cat', 'field' => 'slug', 'terms' => $cat_id)); } $css_class = 'simple-products-slider'; if ($picture_size != 'fixed') { $css_class = 'simple-products-slider-variable'; } $products = new WP_Query($args); $products_wrapper = $product = ''; if ($products->have_posts()) { while ($products->have_posts()) { $products->the_post(); $image = $price_tag = $terms = ''; if (has_post_thumbnail()) { if ($smof_data['image_rollover']) { $image = get_the_post_thumbnail(get_the_ID(), 'shop_catalog'); } else { $image = sprintf('<a href="%s">%s</a>', get_permalink(get_the_ID()), get_the_post_thumbnail(get_the_ID(), 'shop_catalog')); } if ($show_cats == 'yes') { $terms = get_the_term_list(get_the_ID(), 'product_cat', sprintf('<span %s>', FusionCore_Plugin::attributes('cats')), ', ', '</span>'); } ob_start(); woocommerce_get_template('loop/price.php'); $price = ob_get_contents(); ob_end_clean(); if ($price && $show_price == 'yes') { $price_tag = $price; } if ($show_buttons == 'yes') { ob_start(); woocommerce_get_template('loop/add-to-cart.php'); $cart_button = ob_get_contents(); ob_end_clean(); $buttons = sprintf('<div %s>%s<a href="%s" %s>%s</a></div>', FusionCore_Plugin::attributes('product-buttons'), $cart_button, get_permalink(), FusionCore_Plugin::attributes('show-details-button'), __('Details', 'Avada')); } $product .= sprintf('<li><div %s aria-haspopup="true">%s<div %s><div %s><h2><a href="%s">%s</a></h2>%s%s%s</div></div></div></li>', FusionCore_Plugin::attributes('woo-product-slider-shortcode-img-div'), $image, FusionCore_Plugin::attributes('image-extras'), FusionCore_Plugin::attributes('image-extras-content'), get_permalink(), get_the_title(), $terms, $price_tag, $buttons); } } $products_wrapper = sprintf('<ul>%s</ul>', $product); } $html = sprintf('<div %s><div %s><div %s><div %s>%s</div><div %s><span %s></span><span %s></span></div></div></div><div class="fusion-clearfix"></div></div>', FusionCore_Plugin::attributes('woo-product-slider-shortcode'), FusionCore_Plugin::attributes($css_class . ' simple-products-slider'), FusionCore_Plugin::attributes('es-carousel-wrapper fusion-carousel-large'), FusionCore_Plugin::attributes('es-carousel'), $products_wrapper, FusionCore_Plugin::attributes('es-nav'), FusionCore_Plugin::attributes('es-nav-prev'), FusionCore_Plugin::attributes('es-nav-next')); } return $html; }
/** * Render the shortcode * * @param array $args Shortcode paramters * @param string $content Content between shortcode * @return string HTML output */ function render($args, $content = '') { global $smof_data; $defaults = FusionCore_Plugin::set_shortcode_defaults(array('class' => '', 'id' => '', 'backgroundattachment' => 'scroll', 'backgroundcolor' => $smof_data['full_width_bg_color'], 'backgroundimage' => '', 'backgroundposition' => 'left top', 'backgroundrepeat' => 'no-repeat', 'bordercolor' => $smof_data['full_width_border_color'], 'bordersize' => $smof_data['full_width_border_size'], 'borderstyle' => 'solid', 'equal_height_columns' => 'no', 'fade' => 'no', 'hundred_percent' => 'no', 'menu_anchor' => '', 'overlay_color' => '', 'overlay_opacity' => '0.5', 'paddingbottom' => '20px', 'paddingleft' => '0px', 'paddingright' => '0px', 'paddingtop' => '20px', 'paddingBottom' => '', 'paddingTop' => '', 'video_loop' => 'yes', 'video_mp4' => '', 'video_mute' => 'yes', 'video_ogv' => '', 'video_preview_image' => '', 'video_webm' => ''), $args); if ($defaults['hundred_percent'] == 'yes') { $defaults['paddingleft'] = '0px'; $defaults['paddingright'] = '0px'; } extract($defaults); self::$args = $defaults; $this->depracted_args(); $outer_html = ''; self::$bg_type = 'image'; if ($video_mp4 || $video_ogv || $video_webm) { self::$bg_type = 'video'; } if ($fade == 'yes') { self::$bg_type = 'faded'; $outer_html .= sprintf('<div %s></div>', FusionCore_Plugin::attributes('fullwidth-faded')); } if (self::$bg_type == 'video') { $video_attributes = 'preload="auto" autoplay'; $video_src = ''; if ($video_loop == 'yes') { $video_attributes .= ' loop'; } if ($video_mute == 'yes') { $video_attributes .= ' muted'; } if ($video_mp4) { $video_src .= sprintf('<source src="%s" type="video/mp4">', $video_mp4); } if ($video_ogv) { $video_src .= sprintf('<source src="%s" type="video/ogg">', $video_ogg); } if ($video_webm) { $video_src .= sprintf('<source src="%s" type="video/webm">', $video_webm); } if ($overlay_color) { $outer_html .= sprintf('<div %s></div>', FusionCore_Plugin::attributes('fullwidth-overlay')); } $outer_html .= sprintf('<div class="%s"><video %s>%s</video></div>', 'fullwidth-video', $video_attributes, $video_src); if ($video_preview_image) { $video_preview_image_style = sprintf('background-image:url(%s);', $video_preview_image); $outer_html .= sprintf('<div class="%s" style="%s"></div>', 'fullwidth-video-image', $video_preview_image_style); } } if ($defaults['menu_anchor']) { $html = sprintf('<div id="%s"><div %s>%s<div %s>%s</div></div></div>', $defaults['menu_anchor'], FusionCore_Plugin::attributes('fullwidth-shortcode'), $outer_html, FusionCore_Plugin::attributes('avada-row'), do_shortcode($content)); } else { $html = sprintf('<div %s>%s<div %s>%s</div></div>', FusionCore_Plugin::attributes('fullwidth-shortcode'), $outer_html, FusionCore_Plugin::attributes('avada-row'), do_shortcode($content)); } return $html; }
/** * Render the shortcode * * @param array $args Shortcode paramters * @param string $content Content between shortcode * @return string HTML output */ function render($args, $content = '') { $defaults = shortcode_atts(array('class' => '', 'id' => '', 'last' => 'no'), $args); extract($defaults); self::$args = $defaults; $clearfix = ''; if (self::$args['last'] == 'yes') { $clearfix = sprintf('<div %s></div>', FusionCore_Plugin::attributes('fusion-clearfix')); } $html = sprintf('<div %s>%s</div>%s', FusionCore_Plugin::attributes('one-third-shortcode'), do_shortcode($content), $clearfix); return $html; }
/** * Render the child shortcode * @param array $args Shortcode paramters * @param string $content Content between shortcode * @return string HTML output */ function render_child($args, $content = '') { $defaults = FusionCore_Plugin::set_shortcode_defaults(array('alt' => '', 'image' => '', 'link' => '', 'linktarget' => '_self'), $args); extract($defaults); self::$child_args = $defaults; $output = sprintf('<img src="%s" alt="%s" />', $image, $alt); if ($link) { $output = sprintf('<a href="%s" target="%s">%s</a>', $link, $linktarget, $output); } $html = sprintf('<li><div %s>%s</div></li>', FusionCore_Plugin::attributes('image'), $output); return $html; }
/** * Render the child shortcode * @param array $args Shortcode paramters * @param string $content Content between shortcode * @return string HTML output */ function render_child($args, $content = '') { $defaults = FusionCore_Plugin::set_shortcode_defaults(array('open' => 'no', 'title' => ''), $args); extract($defaults); self::$child_args = $defaults; self::$child_args['toggle_class'] = ''; if ($open == 'yes') { self::$child_args['toggle_class'] = 'in'; } $this->collaps_id = uniqid('collapse-'); $html = sprintf('<div %s><div %s><h4 %s><a %s><i %s></i>%s</a></h4></div><div %s><div %s>%s</div></div></div>', FusionCore_Plugin::attributes('fusion-panel panel-default'), FusionCore_Plugin::attributes('panel-heading'), FusionCore_Plugin::attributes('panel-title toggle'), FusionCore_Plugin::attributes('toggle-shortcode-data-toggle'), FusionCore_Plugin::attributes('toggle-shortcode-fa-icon'), $title, FusionCore_Plugin::attributes('toggle-shortcode-collapse'), FusionCore_Plugin::attributes('panel-body toggle-content'), do_shortcode($content)); return $html; }
/** * Render the shortcode * @param array $args Shortcode paramters * @param string $content Content between shortcode * @return string HTML output */ function render($args, $content = '') { $defaults = FusionCore_Plugin::set_shortcode_defaults(array('class' => '', 'api_params' => '', 'autoplay' => "false", 'center' => 'no', 'height' => 360, 'id' => '', 'width' => 600), $args); extract($defaults); self::$args = $defaults; if ($autoplay == 'true' || $autoplay == 'yes') { $autoplay = '&autoplay=1'; } else { $autoplay = ''; } $html = sprintf('<div %s><div %s><iframe title="YouTube video player" src="http://www.youtube.com/embed/%s?wmode=transparent%s%s" width="%s" height="%s" frameborder="0" allowfullscreen></iframe></div></div>', FusionCore_Plugin::attributes('youtube-shortcode'), FusionCore_Plugin::attributes('youtube-shortcode-video-sc'), $id, $autoplay, $api_params, $width, $height); return $html; }
/** * Render the child shortcode * @param array $args Shortcode paramters * @param string $content Content between shortcode * @return string HTML output */ function render_child($args, $content = '') { $defaults = FusionCore_Plugin::set_shortcode_defaults(array('open' => 'no', 'title' => ' '), $args); extract($defaults); self::$child_args = $defaults; self::$child_args['toggle_class'] = ''; if ($open == 'yes') { self::$child_args['toggle_class'] = 'in'; } $this->collapse_id = substr(md5(sprintf('collapse-%s-%s-%s', get_the_ID(), $this->accordian_counter, $this->collapse_counter)), 15); $html = sprintf('<div %s><div %s><h4 %s><a %s><i %s></i><div %s>%s</div></a></h4></div><div %s><div %s>%s</div></div></div>', FusionCore_Plugin::attributes('fusion-panel panel-default'), FusionCore_Plugin::attributes('panel-heading'), FusionCore_Plugin::attributes('panel-title toggle'), FusionCore_Plugin::attributes('toggle-shortcode-data-toggle'), FusionCore_Plugin::attributes('toggle-shortcode-fa-icon'), FusionCore_Plugin::attributes('fusion-toggle-heading'), $title, FusionCore_Plugin::attributes('toggle-shortcode-collapse'), FusionCore_Plugin::attributes('panel-body toggle-content'), do_shortcode($content)); $this->collapse_counter++; return $html; }
/** * Render the shortcode * * @param array $args Shortcode paramters * @param string $content Content between shortcode * @return string HTML output */ function render($args, $content = '') { global $smof_data; $defaults = FusionCore_Plugin::set_shortcode_defaults(array('class' => '', 'id' => '', 'backgroundattachment' => 'scroll', 'backgroundcolor' => $smof_data['full_width_bg_color'], 'backgroundimage' => '', 'backgroundposition' => 'left top', 'backgroundrepeat' => 'no-repeat', 'bordercolor' => $smof_data['full_width_border_color'], 'bordersize' => $smof_data['full_width_border_size'], 'borderstyle' => 'solid', 'menu_anchor' => '', 'paddingbottom' => '20px', 'paddingtop' => '20px', 'paddingBottom' => '', 'paddingTop' => ''), $args); extract($defaults); self::$args = $defaults; $this->depracted_args(); if ($defaults['menu_anchor']) { $html = sprintf('<div id="%s"><div %s><div %s>%s</div></div></div>', $defaults['menu_anchor'], FusionCore_Plugin::attributes('fullwidth-shortcode'), FusionCore_Plugin::attributes('avada-row'), do_shortcode($content)); } else { $html = sprintf('<div %s><div %s>%s</div></div>', FusionCore_Plugin::attributes('fullwidth-shortcode'), FusionCore_Plugin::attributes('avada-row'), do_shortcode($content)); } return $html; }
/** * Render the shortcode * @param array $args Shortcode paramters * @param string $content Content between shortcode * @return string HTML output */ function render($args, $content = '') { $defaults = FusionCore_Plugin::set_shortcode_defaults(array('class' => '', 'api_params' => '', 'autoplay' => 'no', 'center' => 'no', 'height' => 360, 'id' => '', 'width' => 600), $args); extract($defaults); self::$args = $defaults; $protocol = is_ssl() ? 's' : ''; if ($autoplay == 'true' || $autoplay == 'yes') { $autoplay = '?autoplay=1'; } else { $autoplay = '?autoplay=0'; } $html = sprintf('<div %s><div %s><iframe src="http%s://player.vimeo.com/video/%s%s%s" width="%s" height="%s" frameborder="0"></iframe></div></div>', FusionCore_Plugin::attributes('vimeo-shortcode'), FusionCore_Plugin::attributes('vimeo-shortcode-video-sc'), $protocol, $id, $autoplay, $api_params, $width, $height); return $html; }
/** * Render the parent shortcode * @param array $args Shortcode paramters * @param string $content Content between shortcode * @return string HTML output */ function render($args, $content = '') { global $smof_data; $defaults = FusionCore_Plugin::set_shortcode_defaults(array('class' => '', 'id' => '', 'backgroundcolor' => strtolower($smof_data['sharing_box_bg_color']), 'description' => '', 'icon_colors' => strtolower($smof_data['sharing_social_links_icon_color']), 'box_colors' => strtolower($smof_data['sharing_social_links_box_color']), 'icons_boxed' => strtolower($smof_data['sharing_social_links_boxed']), 'icons_boxed_radius' => strtolower($smof_data['sharing_social_links_boxed_radius']), 'link' => '', 'pinterest_image' => '', 'social_networks' => $this->get_theme_options_settings(), 'tagline' => '', 'tagline_color' => strtolower($smof_data['sharing_box_tagline_text_color']), 'title' => '', 'tooltip_placement' => strtolower($smof_data['sharing_social_links_tooltip_placement'])), $args); extract($defaults); self::$args = $defaults; $social_networks = explode('|', $social_networks); $icon_colors = explode('|', $icon_colors); $num_of_icon_colors = count($icon_colors); $box_colors = explode('|', $box_colors); $num_of_box_colors = count($box_colors); $icons = ''; if (isset($smof_data['social_sorter']) && $smof_data['social_sorter']) { $order = $smof_data['social_sorter']; $ordered_array = explode(',', $order); if (isset($ordered_array) && $ordered_array && is_array($ordered_array)) { foreach ($social_networks as $reorder_social_network) { $social_networks_old[$reorder_social_network] = $reorder_social_network; } $social_networks = array(); foreach ($ordered_array as $key => $field_order) { $field_order_number = str_replace('social_sorter_', '', $field_order); $find_the_field = $smof_data['social_sorter_' . $field_order_number]; $field_name = str_replace('_link', '', $smof_data['social_sorter_' . $field_order_number]); if ($field_name == 'google') { $field_name = 'googleplus'; } elseif ($field_name == 'email') { $field_name = 'mail'; } if (!isset($social_networks_old[$field_name])) { continue; } $social_networks[] = $social_networks_old[$field_name]; } } } for ($i = 0; $i < count($social_networks); $i++) { if ($num_of_icon_colors == 1) { $icon_colors[$i] = $icon_colors[0]; } if ($num_of_box_colors == 1) { $box_colors[$i] = $box_colors[0]; } $icon_options = array('social_network' => $social_networks[$i], 'icon_color' => $i < count($icon_colors) ? $icon_colors[$i] : '', 'box_color' => $i < count($box_colors) ? $box_colors[$i] : ''); $icons .= sprintf('<a %s></a>', FusionCore_Plugin::attributes('sharingbox-shortcode-icon', $icon_options)); } $html = sprintf('<div %s><h4 %s>%s</h4><div %s>%s</div></div>', FusionCore_Plugin::attributes('sharingbox-shortcode'), FusionCore_Plugin::attributes('sharingbox-shortcode-tagline'), $tagline, FusionCore_Plugin::attributes('sharingbox-shortcode-social-networks'), $icons); return $html; }
function op_fusioncore_shortcodeJSFix() { $checkIfLEPage = get_post_meta(url_to_postid("http://" . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI']), '_optimizepress_pagebuilder', true); $pageBuilder = false; if (isset($_GET['page'])) { $pageBuilder = $_GET['page'] == 'optimizepress-page-builder' ? true : false; } $liveEditorAjaxInsert = false; if (isset($_REQUEST['action'])) { $liveEditorAjaxInsert = $_REQUEST['action'] == 'optimizepress-live-editor-parse' ? true : false; } if ($pageBuilder || $liveEditorAjaxInsert) { remove_filter('mce_external_plugins', array(FusionCore_Plugin::get_instance(), 'add_rich_plugins'), 10); } }
/** * Render the shortcode * @param array $args Shortcode paramters * @param string $content Content between shortcode * @return string HTML output */ function render($args, $content = '') { $defaults = FusionCore_Plugin::set_shortcode_defaults(array('class' => 'fusion-soundcloud', 'id' => '', 'auto_play' => 'no', 'color' => 'ff7700', 'comments' => 'yes', 'height' => '', 'layout' => 'classic', 'show_related' => 'no', 'show_reposts' => 'no', 'show_user' => 'yes', 'url' => '', 'width' => '100%'), $args); extract($defaults); self::$args = $defaults; if ($auto_play == 'yes') { $autoplay = 'true'; } else { $autoplay = 'false'; } if ($comments == 'yes') { $comments = 'true'; } else { $comments = 'false'; } if ($layout == 'visual') { $visual = 'true'; if (!$height) { $height = '450'; } } else { $visual = 'false'; if (!$height) { $height = '166'; } } $height = (int) $height; if ($show_related == 'yes') { $show_related = 'false'; } else { $show_related = 'true'; } if ($show_reposts == 'yes') { $show_reposts = 'true'; } else { $show_reposts = 'false'; } if ($show_user == 'yes') { $show_user = '******'; } else { $show_user = '******'; } if ($color) { $color = str_replace('#', '', $color); } $html = sprintf('<div %s><iframe scrolling="no" frameborder="no" width="%s" height="%s" src="https://w.soundcloud.com/player/?url=%s&auto_play=%s&hide_related=%s&show_comments=%s&show_user=%s&show_reposts=%s&visual=%s&color=%s"></iframe></div>', FusionCore_Plugin::attributes('soundcloud-shortcode'), $width, $height, $url, $autoplay, $show_related, $comments, $show_user, $show_reposts, $visual, $color); return $html; }
/** * Render the shortcode * @param array $args Shortcode paramters * @param string $content Content between shortcode * @return string HTML output */ function render($args, $sc_content = '') { global $smof_data; $defaults = FusionCore_Plugin::set_shortcode_defaults(array('class' => '', 'id' => '', 'animation' => false, 'content' => '', 'content_bg_color' => $smof_data['popover_content_bg_color'], 'delay' => '', 'placement' => strtolower($smof_data['popover_placement']), 'title' => '', 'title_bg_color' => $smof_data['popover_heading_bg_color'], 'bordercolor' => $smof_data['popover_border_color'], 'textcolor' => $smof_data['popover_text_color'], 'trigger' => 'click'), $args); extract($defaults); self::$args = $defaults; if ($placement == 'bottom') { $arrow_color = $title_bg_color; } else { $arrow_color = $content_bg_color; } $styles = sprintf('<style>.popover-%s.%s .arrow{border-%s-color:%s;}.popover-%s{border-color:%s;}.popover-%s .popover-title{background-color:%s;color:%s;border-color:%s;}.popover-%s .popover-content{background-color:%s;color:%s;}.popover-%s.%s .arrow:after{border-%s-color:%s;}</style>', $this->popover_counter, $placement, $placement, $bordercolor, $this->popover_counter, $bordercolor, $this->popover_counter, $title_bg_color, $textcolor, $bordercolor, $this->popover_counter, $content_bg_color, $textcolor, $this->popover_counter, $placement, $placement, $arrow_color); $html = sprintf('<span %s>%s%s</span>', FusionCore_Plugin::attributes('popover-shortcode'), $styles, do_shortcode($sc_content)); $this->popover_counter++; return $html; }
function attr() { $attr = array(); // FIXXXME had clearfix class; group mixin working? $attr['class'] = 'fusion-reading-box-container reading-box-container-' . $this->tagline_box_counter; if (self::$args['animation_type']) { $animations = FusionCore_Plugin::animations(array('type' => self::$args['animation_type'], 'direction' => self::$args['animation_direction'], 'speed' => self::$args['animation_speed'])); $attr = array_merge($attr, $animations); $attr['class'] .= ' ' . $attr['animation_class']; } if (self::$args['class']) { $attr['class'] .= ' ' . self::$args['class']; } if (self::$args['id']) { $attr['id'] = self::$args['id']; } return $attr; }
/** * Render the shortcode * @param array $args Shortcode paramters * @param string $content Content between shortcode * @return string HTML output */ function render($args, $content = '') { global $smof_data; $defaults = FusionCore_Plugin::set_shortcode_defaults(array('class' => '', 'id' => '', 'animated_stripes' => 'no', 'filledcolor' => '', 'percentage' => '70', 'striped' => 'no', 'textcolor' => '', 'unfilledcolor' => '', 'unit' => '', 'filledbordercolor' => $smof_data['progressbar_filled_border_color'], 'filledbordersize' => $smof_data['progressbar_filled_border_size']), $args); extract($defaults); self::$args = $defaults; if (!$filledcolor) { self::$args['filledcolor'] = $smof_data['progressbar_filled_color']; } if (!$textcolor) { self::$args['textcolor'] = $smof_data['progressbar_text_color']; } if (!$unfilledcolor) { self::$args['unfilledcolor'] = $smof_data['progressbar_unfilled_color']; } $html = sprintf('<div %s><div %s></div><span %s>%s %s%s</span></div>', FusionCore_Plugin::attributes('progressbar-shortcode'), FusionCore_Plugin::attributes('progressbar-shortcode-content'), FusionCore_Plugin::attributes('progressbar-shortcode-span'), $content, $percentage, $unit); return $html; }
function attr() { $attr['class'] = sprintf('fa fontawesome-icon %s circle-%s', FusionCore_Plugin::font_awesome_name_handler(self::$args['icon']), self::$args['circle']); $attr['style'] = ''; if (self::$args['circle'] == 'yes') { if (self::$args['circlebordercolor']) { $attr['style'] .= sprintf('border-color:%s;', self::$args['circlebordercolor']); } if (self::$args['circlecolor']) { $attr['style'] .= sprintf('background-color:%s;', self::$args['circlecolor']); } $attr['style'] .= sprintf('font-size:%spx;', self::$args['circle_yes_font_size']); $attr['style'] .= sprintf('line-height:%spx;height:%spx;width:%spx;', self::$args['line_height'], self::$args['line_height'], self::$args['line_height']); } else { $attr['style'] .= sprintf('font-size:%spx;', self::$args['font_size']); } if ('center' == self::$args['alignment']) { $attr['style'] .= 'margin-left:0;margin-right:0;'; } else { $attr['style'] .= sprintf('margin-%s:%spx;', self::$args['icon_margin_position'], self::$args['icon_margin']); } if (self::$args['iconcolor']) { $attr['style'] .= sprintf('color:%s;', self::$args['iconcolor']); } if (self::$args['rotate']) { $attr['class'] .= ' fa-rotate-' . self::$args['rotate']; } if (self::$args['spin'] == 'yes') { $attr['class'] .= ' fa-spin'; } if (self::$args['animation_type']) { $animations = FusionCore_Plugin::animations(array('type' => self::$args['animation_type'], 'direction' => self::$args['animation_direction'], 'speed' => self::$args['animation_speed'])); $attr = array_merge($attr, $animations); $attr['class'] .= ' ' . $attr['animation_class']; unset($attr['animation_class']); } if (self::$args['class']) { $attr['class'] .= ' ' . self::$args['class']; } if (self::$args['id']) { $attr['id'] = self::$args['id']; } return $attr; }
/** * Render the shortcode * * @param array $args Shortcode paramters * @param string $content Content between shortcode * * @return string HTML output */ public function render($args, $content = '') { $defaults = FusionCore_Plugin::set_shortcode_defaults(array('class' => '', 'id' => '', 'background_color' => '', 'name' => '', 'padding' => ''), $args); extract($defaults); self::$args = $defaults; $html = sprintf('<div %s>', FusionCore_Plugin::attributes('widget-shortcode')); $html .= self::get_styles(); ob_start(); if (function_exists('dynamic_sidebar') && dynamic_sidebar($name)) { // All is good, dynamic_sidebar() already called the rendering } $html .= ob_get_clean(); $html .= sprintf('<div %s>', FusionCore_Plugin::attributes('fusion-additional-widget-content')); $html .= do_shortcode($content); $html .= '</div>'; $html .= '</div>'; $this->widget_counter++; return $html; }
/** * Render the child shortcode * @param array $args Shortcode paramters * @param string $content Content between shortcode * @return string HTML output */ function render_child($args, $content = '') { $defaults = FusionCore_Plugin::set_shortcode_defaults(array('alt' => '', 'image' => '', 'link' => '', 'linktarget' => '_self'), $args); extract($defaults); self::$child_args = $defaults; $image_id = FusionCore_Plugin::get_attachment_id_from_url($image); if (!$alt && empty($alt) && $image_id) { self::$child_args['alt'] = $alt = get_post_meta($image_id, '_wp_attachment_image_alt', true); } if ($image_id) { self::$child_args['title_attr'] = get_post_field('post_excerpt', $image_id); } $output = sprintf('<img src="%s" alt="%s" />', $image, $alt); if ($link || self::$parent_args['lightbox'] == 'yes') { $output = sprintf('<a %s>%s</a>', FusionCore_Plugin::attributes('image-carousel-shortcode-slide-link'), $output); } $html = sprintf('<li><div %s>%s</div></li>', FusionCore_Plugin::attributes('image'), $output); return $html; }
/** * Render the shortcode * @param array $args Shortcode paramters * @param string $content Content between shortcode * @return string HTML output */ function render($args, $content = '') { $defaults = FusionCore_Plugin::set_shortcode_defaults(array('class' => '', 'id' => '', 'content_align' => 'left', 'sep_color' => '', 'size' => 1, 'style_type' => 'double'), $args); extract($defaults); self::$args = $defaults; if (!$style_type) { self::$args['style_type'] = $style_type = 'double'; } if (strpos($style_type, 'underline') === false) { if (self::$args['content_align'] == 'right') { $html = sprintf('<div %s><div %s><div %s></div></div><h%s %s>%s</h%s></div>', FusionCore_Plugin::attributes('title-shortcode'), FusionCore_Plugin::attributes('title-sep-container'), FusionCore_Plugin::attributes('title-shortcode-sep'), $size, FusionCore_Plugin::attributes('title-shortcode-heading'), do_shortcode($content), $size); } else { $html = sprintf('<div %s><h%s %s>%s</h%s><div %s><div %s></div></div></div>', FusionCore_Plugin::attributes('title-shortcode'), $size, FusionCore_Plugin::attributes('title-shortcode-heading'), do_shortcode($content), $size, FusionCore_Plugin::attributes('title-sep-container'), FusionCore_Plugin::attributes('title-shortcode-sep')); } } else { $html = sprintf('<div %s><h%s %s>%s</h%s></div>', FusionCore_Plugin::attributes('title-shortcode'), $size, FusionCore_Plugin::attributes('title-shortcode-heading'), do_shortcode($content), $size); } return $html; }