protected function content($atts, $content = null) { $this->content_has_container = false; extract(shortcode_atts(array('title' => '', 'el_class' => '', 'author' => '', 'author_url' => '', 'image' => '', 'image_caption' => '', 'alignment' => 'left', 'img_border_shape' => '', 'bg_color' => '', 'css_animation' => '', 'css' => '', 'css_extra_class' => ''), $atts)); // Get the anchor link $link_start = $this->get_link_start($author_url); $link_end = $this->get_link_end($author_url); // Build the CSS $css_class = $this->build_outer_css($atts, $content); // Ensure there is a <p> tag on the author if ($author) { $author = "<p>" . $author . "</p>"; } // Get the link url $author_url = $this->get_link_url($author_url); // Wrap the content $content = "<p>" . $content . "</p>"; // Get the quote html $text = ac_quote_render($image, $content, $author, '', $img_border_shape, $image_caption, $alignment, $bg_color); // Extra CSS $css_class .= ' ' . $css_extra_class . ' '; // Build the output $output = "\n\t" . $this->get_title($title); $output .= $link_start; $output .= "\n\t" . '<div class="' . esc_attr($css_class) . '">'; $output .= "\n\t\t" . '<div class="wpb_wrapper">'; $output .= "\n\t\t\t" . $text; $output .= "\n\t\t" . '</div> ' . $this->endBlockComment('.wpb_wrapper'); $output .= "\n\t" . '</div> ' . $this->endBlockComment($this->settings['base']); $output .= $link_end; return $output; }
function ac_testimonial_render($testimonial_id, $show_image = true, $excerpt_length = -1) { // Get the post $post = get_post($testimonial_id); // Show the image? Tiles don't show the image inline if ($show_image) { // Get the thumbnail id $thumb_id = get_post_thumbnail_id($testimonial_id); } else { $thumb_id = false; } // Get the excerpt $excerpt = ac_get_excerpt($post, $excerpt_length, false, false); // Author $author = ac_get_meta('author', null, $testimonial_id); $author_url = ac_get_meta('author_url', null, $testimonial_id); return ac_quote_render($thumb_id, $excerpt, $author, $author_url); }