xmlrpc_getposttitle
Retrieve post title from XMLRPC XML.
Description
(string) xmlrpc_getposttitle( (string) $content );
If the title element is not part of the XML, then the default post title from the $post_default_title
will be used instead.
Returns (string)
Post title
Parameters (1)
- 0. $content (string)
- XMLRPC XML Request content
Usage
if ( !function_exists( 'xmlrpc_getposttitle' ) ) { require_once ABSPATH . WPINC . '/functions.php'; } // XMLRPC XML Request content $content = ''; // NOTICE! Understand what this does before running. $result = xmlrpc_getposttitle($content);
Defined (1)
The function is defined in the following location(s).
- /wp-includes/functions.php
- 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;
- }