xmlrpc_getposttitle()
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 |
xmlrpc_getposttitle() 为WP2原创文章,链接:https://www.wp2.cn/functions/xmlrpc_getposttitle/