$fields =
apply_filters( 'xmlrpc_default_posttype_fields', array
( 'labels', 'cap', 'taxonomies'
), 'wp.getPostType'
);
} $user =
$this->
login( $username,
$password );
if ( !
$user ) { return $this->error;
} /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
do_action( 'xmlrpc_call', 'wp.getPostType',
$args,
$this );
if ( !
post_type_exists( $post_type_name ) ) { return new IXR_Error( 403,
__( 'Invalid post type.'
) );
} $post_type =
get_post_type_object( $post_type_name );
if ( !
current_user_can( $post_type->cap->edit_posts
) ) { return new IXR_Error( 401,
__( 'Sorry, you are not allowed to edit posts in this post type.'
) );
} return $this->
_prepare_post_type( $post_type,
$fields );
}