/** * Render the parent shortcode * @param array $args Shortcode paramters * @param string $content Content between shortcode * @return string HTML output */ function render_parent($args, $content = '') { global $smof_data; $defaults = FusionCore_Plugin::set_shortcode_defaults(array('class' => '', 'id' => '', 'backgroundcolor' => strtolower($smof_data['testimonial_bg_color']), 'textcolor' => strtolower($smof_data['testimonial_text_color'])), $args); extract($defaults); self::$parent_args = $defaults; $styles = "<style type='text/css'>\n\t\t.fusion-testimonials.fusion-testimonials-{$this->testimonials_counter} .author:after{border-top-color:{$backgroundcolor} !important;}\n\t\t</style>\n\t\t"; $html = sprintf('<div %s>%s<div %s>%s</div></div>', FusionCore_Plugin::attributes('testimonials-shortcode'), $styles, FusionCore_Plugin::attributes('testimonials-shortcode-testimonials'), do_shortcode($content)); $this->testimonials_counter++; return $html; }
/** * Render the parent shortcode * @param array $args Shortcode paramters * @param string $content Content between shortcode * @return string HTML output */ function render_parent($args, $content = '') { global $smof_data; $defaults = FusionCore_Plugin::set_shortcode_defaults(array('class' => '', 'id' => '', 'backgroundcolor' => strtolower($smof_data['testimonial_bg_color']), 'design' => 'classic', 'textcolor' => strtolower($smof_data['testimonial_text_color'])), $args); extract($defaults); self::$parent_args = $defaults; $styles = sprintf("<style type='text/css'>\n\t\t#fusion-testimonials-%s a{border-color: {$textcolor};}#fusion-testimonials-%s a:hover, #fusion-testimonials-%s .activeSlide{background-color: {$textcolor};}\n\t\t.fusion-testimonials.%s.fusion-testimonials-%s .author:after{border-top-color:{$backgroundcolor} !important;}</style>", $this->testimonials_counter, $this->testimonials_counter, $this->testimonials_counter, $design, $this->testimonials_counter); $pagination = ''; if (self::$parent_args['design'] == 'clean') { $pagination = sprintf('<div %s></div>', FusionCore_Plugin::attributes('testimonials-shortcode-pagination')); } $html = sprintf('<div %s>%s<div %s>%s</div>%s</div>', FusionCore_Plugin::attributes('testimonials-shortcode'), $styles, FusionCore_Plugin::attributes('testimonials-shortcode-testimonials'), do_shortcode($content), $pagination); $this->testimonials_counter++; return $html; }