xmlrpc_getpostcategory [ WordPress Function ]
| Parameters: |
|
| Returns: |
|
| Defined at: |
|
Retrieve the post category or categories from XMLRPC XML.
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.
Source
<?php
function xmlrpc_getpostcategory( $content ) {
global $post_default_category;
if ( preg_match( '/<category>(.+?)<\/category>/is', $content, $matchcat ) ) {
$post_category = trim( $matchcat[1], ',' );
$post_category = explode( ',', $post_category );
} else {
$post_category = $post_default_category;
}
return $post_category;
}
?>
Examples [ wp-snippets.com ]
Google Arama Sonuçlarý
- Function Reference/xmlrpc getpostcategory « WordPress Codex
Description. Retrieve the post category or categories from XMLRPC XML. If the category element is not found, then the default post category will be used.
codex.wordpress.org - 常用函数-xmlrpc_getpostcategory() | WordPress啦!
<?php xmlrpc_getpostcategory( $content ) ?> ... xmlrpc_getpostcategory()位于wp -includes/functions.php中。 ‹ 常用函数-wpdb类 向上 常用 ...
www.wordpress.la - WordPress 3.4-beta1 » WordPress\XMLRPC
Apr 5, 2012 ... xmlrpc_getpostcategory; Retrieve post title from XMLRPC XML. xmlrpc_getposttitle; XMLRPC XML content without title and category elements.
docs.garyjones.co.uk - b2evolution :: View topic - Default category for blogger-API clients
... or it uses global $default_category if xmlrpc_getpostcategory($content) returns false. However, it looks that $default_category may not work.
forums.b2evolution.net