Reference › Functions _wp_filter_post_meta_footnotes ( string $footnotes ): string
Since 6.3.2
Source wp-includes/blocks.php:3219Description Parameters Return Uses Source History Strips all HTML from the content of footnotes, and sanitizes the ID.
Description This function expects slashed data on the footnotes content.
Return
string Filtered content without any HTML on the footnote content and with the sanitized ID. Uses · 5 sanitize_key() Sanitizes a string key. wp_unslash() Removes slashes from a string or recursively removes slashes from strings within an array. wp_filter_post_kses() Sanitizes content for allowed HTML tags for post content. wp_slash() Adds slashes to a string or recursively adds slashes to strings within an array. wp_json_encode() Encodes a variable into JSON, with some confidence checks. Source View on Trac ↗ View on GitHub ↗
3219 function _wp_filter_post_meta_footnotes ( $footnotes ) { 3220 $footnotes_decoded = json_decode ( $footnotes , true ) ; 3221 if ( ! is_array ( $footnotes_decoded ) ) { 3222 return '' ; 3223 } 3224 $footnotes_sanitized = array ( ) ; 3225 foreach ( $footnotes_decoded as $footnote ) { 3226 if ( ! empty ( $footnote [ 'content' ] ) && ! empty ( $footnote [ 'id' ] ) ) { 3227 $footnotes_sanitized [ ] = array ( 3228 'id' => sanitize_key ( $footnote [ 'id' ] ) , 3229 'content' => wp_unslash ( wp_filter_post_kses ( wp_slash ( $footnote [ 'content' ] ) ) ) , 3230 ) ; 3231 } 3232 } 3233 return wp_json_encode ( $footnotes_sanitized ) ; 3234 } History Introduced in 6.3.2 . Unchanged from 6.7.7 through 7.1.0.
6.7.7 6.8.8 6.9.7 7.0.4 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, from src/wp-includes/blocks.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.