/** * Process related posts shortcode */ public function process_related_posts_sc($args) { $defaults = apply_filters('pf_related_posts_default_args', array('posts_per_page' => 4, 'orderby' => 'post_date', 'order' => 'DESC', 'include' => '', 'exclude' => '', 'post_type' => array('post'), 'post_status' => 'publish', 'thumb' => true, 'show_author' => false, 'posted' => false, 'template' => 'template-1', 'method' => 'tag', 'cat' => array(), 'tag__not_in' => array(), 'title' => __('Related Posts', PF_DOMAIN), 'widget' => false)); $args = wp_parse_args($args, $defaults); $posts = $this->_related_posts->get_related_posts($args); return PF_TEMPLATE::use_template($posts->posts, $args['template'], 'recent_posts', $args); }