Beispiel #1
0
 function editPost($args)
 {
     global $wp_xmlrpc_server;
     $post = self::_get_post($args);
     if (!is_array($post)) {
         return $post;
     }
     $edit_args = array_slice($args, 0, 4);
     $edit_args[4] = array('post_title' => isset($args[4]) ? $args[4] : '', 'post_content' => isset($args[5]) ? $args[5] : '');
     $result = $wp_xmlrpc_server->wp_editPost($edit_args);
     if ($result === true && class_exists('Scribe_SEO')) {
         Scribe_SEO::set_post_meta_title($post['post_id'], isset($args[6]) ? $args[6] : '');
         Scribe_SEO::set_post_meta_description($post['post_id'], isset($args[7]) ? $args[7] : '');
     }
     return $result;
 }