xmlrpc_getposttitle()
xmlrpc_getposttitle( string $content ) 从xmlrpcxml检索文章标题…
xmlrpc_getposttitle( string $content )
从xmlrpcxml检索文章标题。
Retrieve post title from XMLRPC XML.
目录锚点:#说明#参数#源码
说明(Description)
如果title元素不是XML的一部分,那么将使用$post_default_title中的默认文章标题。
参数(Parameters)
| 参数 | 类型 | 说明 |
|---|---|---|
| $content | (string) | XMLRPC XML请求内容 |
源码(Source)
/**
* Retrieve post title from XMLRPC XML.
*
* If the title element is not part of the XML, then the default post title from
* the $post_default_title will be used instead.
*
* @since 0.71
*
* @global string $post_default_title Default XML-RPC post title.
*
* @param string $content XMLRPC XML Request content
* @return string Post title
*/
function xmlrpc_getposttitle( $content ) {
global $post_default_title;
if ( preg_match( '/(.+?)< itle="">/is', $content, $matchtitle ) ) {
$post_title = $matchtitle[1];
} else {
$post_title = $post_default_title;
}
return $post_title;
}
</>| 更新版本 | 源码位置 | 使用 | 被使用 |
|---|---|---|---|
| 0.71 | wp-includes/functions.php | 7 | 10 |
类别:WordPress 函数手册、
本文收集自互联网,转载请注明来源。
如有侵权,请联系 wper_net@163.com 删除。
还没有任何评论,赶紧来占个楼吧!