Adds slashes to a string or recursively adds slashes to strings within an array.
Description
This should be used when preparing data for core API that expects slashed data.This should not be used to escape data going directly into an SQL query.
_wp_expand_nav_menu_post_data()If a JSON blob of navigation menu data is in POST data, expand it and inject it into `$_POST` to avoid PHP `max_input_vars` limitations. See #14134.
Signature, return type and hooks compared across 5 parsed releases.
5.5.0
Non-string values are left untouched.from the docblock
3.6.0
Introduced.from the docblock
About this page
Parsed data
Generated from the wordpress-develop 6.8.8 tag, from src/wp-includes/formatting.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.