You appear to be a bot. Output may be restricted
Description
Returns only allowed post data fields
Usage
$array|WP_Error = _wp_get_allowed_postdata( $post_data );
Parameters
- $post_data
- ( array ) optional – Array of post data. Defaults to the contents of $_POST.
Returns
array|WP_Error Array of post data on success, WP_Error on failure.
Source
File name: wordpress/wp-admin/includes/post.php
Lines:
1 to 12 of 12
function _wp_get_allowed_postdata( $post_data = null ) { if ( empty( $post_data ) ) { $post_data = $_POST; } // Pass through errors. if ( is_wp_error( $post_data ) ) { return $post_data; } return array_diff_key( $post_data, array_flip( array( 'meta_input', 'file', 'guid' ) ) ); }