xmlrpc_getposttitle

Definition:
function xmlrpc_getposttitle( $content ) {}

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.

Parameters

  • string $content: XMLRPC XML Request content

Return values

returns:Post title

Source code

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;

}

4285

Advertisements

No comments yet... Be the first to leave a reply!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: