Function: xmlrpc_getpostcategory

xmlrpc_getpostcategory( string $content )

Retrieve the post category or categories from XMLRPC XML.

Shortcut: xg

You can use above key combination to trigger the associated snippet for this function in the WordPress Snippets for Visual Studio Code extension. You can also use this shortcut to search for this function on this website.

If the category element is not found, then the default post category will be used. The return type then would be what $post_default_category. If the category is found, then it will always be an array.


Name Type(s) Default Value Description
$content string

XMLRPC XML Request content


string | array

List of categories or category name.

WordPress Developer Newsletter

Stay informed of new chapter releases, important WordPress API updates and more.