wpseek.com
Uma área de pesquisa sobre o WordPress para devs e autores do tema



xmlrpc_getposttitle › WordPress Function

Desde0.71
Obsoleton/a
› xmlrpc_getposttitle ( $content )
Parâmetros:
  • (string) $content XML-RPC XML Request content.
    Required: Yes
Retorna:
  • (string) Post title.
Definido em:
Codex:

Retrieves post title from XML-RPC XML.

If the title element is not found in the XML, the default post title from the $post_default_title global will be used instead.


Fonte

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;
}