xmlrpc_getposttitle

The timeline below displays how wordpress function xmlrpc_getposttitle has changed across different WordPress versions. If a version is not listed, refer to the next available version below.

WordPress Version: 6.1

/**
 * Retrieves 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('/<title>(.+?)<\/title>/is', $content, $matchtitle)) {
        $post_title = $matchtitle[1];
    } else {
        $post_title = $post_default_title;
    }
    return $post_title;
}

WordPress Version: 4.0

/**
 * 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('/<title>(.+?)<\/title>/is', $content, $matchtitle)) {
        $post_title = $matchtitle[1];
    } else {
        $post_title = $post_default_title;
    }
    return $post_title;
}

WordPress Version: 3.9

/**
 * 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 XMLRPC post title.
 *
 * @param string $content XMLRPC XML Request content
 * @return string Post title
 */
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;
}

WordPress Version: 3.7

/**
 * 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.
 *
 * @package WordPress
 * @subpackage XMLRPC
 * @since 0.71
 *
 * @global string $post_default_title Default XMLRPC post title.
 *
 * @param string $content XMLRPC XML Request content
 * @return string Post title
 */
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;
}