Retrieves post title from XML-RPC XML.
Description
If the title element is not found in the XML, the default post title from the $post_default_title global will be used instead.
Parameters
$contentstringrequired- XML-RPC XML Request content.
Source
function xmlrpc_getposttitle( $content ) {
global $post_default_title;
if ( preg_match( '/<title>(.+?)<\/title>/is', $content, $matchtitle ) ) {
$post_title = $matchtitle[1];
} else {
$post_title = $post_default_title;
}
return $post_title;
}
Changelog
| Version | Description |
|---|---|
| 0.71 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.