xmlrpc_removepostdata() WordPress Function

The xmlrpc_removepostdata() function is used to remove post data for a specified XML-RPC method. This function is typically used to clean up data before it is passed to the XML-RPC method for processing.

xmlrpc_removepostdata( string $content ) #

XMLRPC XML content without title and category elements.


Parameters

$content

(string)(Required)XML-RPC XML Request content.


Top ↑

Return

(string) XMLRPC XML Request content without title and category elements.


Top ↑

Source

File: wp-includes/functions.php

function xmlrpc_removepostdata( $content ) {
	$content = preg_replace( '/<title>(.+?)<\/title>/si', '', $content );
	$content = preg_replace( '/<category>(.+?)<\/category>/si', '', $content );
	$content = trim( $content );
	return $content;
}


Top ↑

Changelog

Changelog
VersionDescription
0.71Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More
Show More