xmlrpc_getpostcategory
函数
xmlrpc_getpostcategory ( $content )
- 参数
-
-
(string)
$content
XMLRPC XML Request content- Required: 是
-
(string)
- 返回值
-
- (string|array) List of categories or category name.
- 定义位置
-
-
wp-includes/functions.php
, line 795
-
wp-includes/functions.php
- 引入
- 0.71
- 弃用
- –
Retrieves 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.
function xmlrpc_getpostcategory( $content ) { global $post_default_category; if ( preg_match( '/(.+?) /is', $content, $matchcat ) ) { $post_category = trim( $matchcat[1], ',' ); $post_category = explode( ',', $post_category ); } else { $post_category = $post_default_category; } return $post_category; }
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。