wpseek.com
Bazujące na WordPress narzędzie wyszukiwania dla deweloperów i twórców motywów.



xmlrpc_getposttitle › WordPress Function

Od0.71
Przestarzałyn/a
xmlrpc_getposttitle ( $content )
Parametry:
  • (string) $content XMLRPC XML Request content
    Wymagane: Tak
Powrót:
  • (string) Post title
Zdefiniowane na:
Codex:

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.


Źródło

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