function getPost($args) { $post = self::_get_post($args); if (!is_array($post)) { return $post; } // filter out unneeded post fields $scribe_post = array(); $scribe_fields = array('post_id', 'post_status', 'post_title', 'post_content', 'post_date', 'post_date_gmt', 'post_modified', 'post_modified_gmt', 'post_type'); foreach ($scribe_fields as $key) { $scribe_post[$key] = $post[$key]; } // add scribe post fields $scribe_elements = array('post_url' => $post['link']); if (!isset($args[5]) || $args[5]) { $scribe_elements['seo_title'] = Scribe_SEO::get_post_meta_title($scribe_post['post_id']); $scribe_elements['seo_description'] = Scribe_SEO::get_post_meta_description($scribe_post['post_id']); } return apply_filters('scribe_xmlrpc_post_detail', array_merge($scribe_post, $scribe_elements)); }