/** * [testimonial] shortcode function. * * Example usage: [testimonial]Add testimonial here.[/testimonial] * * @todo This shortcode can probably be moved to the deprecated section. * * @since 0.1.0 */ public function testimonial_shortcode($atts, $content = NULL) { // Support self-closing, and enclosing shortcodes (but does not like mixed on the same page/post) extract(shortcode_atts(array('image' => '', 'name' => '', 'company' => ''), $atts)); if (!empty($image)) { $image = PC_Utility::validate_image_str($image); } if (empty($content)) { $content = __('Please add your testimonial in-between opening and closing tags: e.g. [testimonial]Your testimonial here..[/testimonial]', 'presscoders'); } if (!empty($name)) { $name = "<p class=\"testimonial-name\">{$name}</p>"; } if (!empty($company)) { $company = "<p class=\"testimonial-company\">{$company}</p>"; } return "<div class=\"testimonial\"><div class=\"quote\"><p>{$content}</p></div><div class=\"testimonial-meta\">{$image}{$name}{$company}</div></div>"; }