wppaste
WordPress

apply_filters( 'xmlrpc_wp_insert_post_data', array $post_data, array $content_struct )

Since
3.4.0
Filters post data array to be inserted via XML-RPC.

Compatibility

WordPress
since 3.4.0
  • 6.7.7
  • 6.8.8
  • 6.9.7
  • 7.0.4
  • 7.1.0

Present in every tracked release (6.7.7 to 7.1.0).

Parameters

$post_dataarray
Parsed array of post data.
$content_structarray
Post data array.

Where this hook fires · 1

  • wp-includes/class-wp-xmlrpc-server.php:1704wp_xmlrpc_server::_insert_post()

Source code

		 *		 * @since 3.4.0		 *		 * @param array $post_data      Parsed array of post data.		 * @param array $content_struct Post data array.		 */		$post_data = apply_filters( 'xmlrpc_wp_insert_post_data', $post_data, $content_struct ); 		// Remove all null values to allow for using the insert/update post default values for those keys instead.		$post_data = array_filter(			$post_data,			static function ( $value ) {				return null !== $value;

Changelog

Introduced in 3.4.0. Unchanged from 6.7.7 through 7.1.0.

  1. 6.7.7
  2. 6.8.8
  3. 6.9.7
  4. 7.0.4
  5. 7.1.0

Signature, return type and hooks compared across 5 parsed releases.

About this page

Parsed data
Generated from the wordpress-develop 7.1.0 tag, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.