Preserves the initial JSON post_content passed to save into the post.
Description
This is needed to prevent KSES and other 'content_save_pre' filters from corrupting JSON data. Note that WP_Customize_Manager::validate_setting_values() have already run on the setting values being serialized as JSON into the post content so it is pre-sanitized. Also, the sanitization logic is re-run through the respective WP_Customize_Setting::sanitize() method when being read out of the changeset, via WP_Customize_Manager::post_value(), and this sanitized value will also be sent into WP_Customize_Setting::update() for persisting to the DB. Multiple users can collaborate on a single changeset, where one user may have the unfiltered_html capability but another may not. A user with unfiltered_html may add a script tag to some field which needs to be kept intact even when another user updates the changeset to modify another field when they do not have unfiltered_html.
Parameters
$dataarray
An array of slashed and processed post data.
$postarrarray
An array of sanitized (and slashed) but otherwise unmodified post data.
$unsanitized_postarrarray
An array of slashed yet <em>unsanitized</em> and unprocessed post data as originally passed to wp_insert_post().
Return
array
Filtered post data.
Uses · 1
get_post_type()Retrieves the post type of the current post or of a given post.
Signature, return type and hooks compared across 5 parsed releases.
About this page
Parsed data
Generated from the wordpress-develop 6.7.7 tag, from src/wp-includes/class-wp-customize-manager.php, 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.