wpseek.com
Un motore di ricerca WordPress per sviluppatori e autori di temi
_wp_filter_post_meta_footnotes is private and should not be used in themes or plugins directly.
_wp_filter_post_meta_footnotes › WordPress Function
Da6.3.2
Deprecaton/a
› _wp_filter_post_meta_footnotes ( $footnotes )
Accedi: |
|
Parametri: |
|
Ritorna: |
|
Definito a: |
|
Codex: |
Strips all HTML from the content of footnotes, and sanitizes the ID.
This function expects slashed data on the footnotes content.Funzioni correlate: wp_filter_post_kses, wp_filter_out_block_nodes, _wp_delete_post_menu_item, wp_filter_comment, _wp_filter_taxonomy_base
Sorgenti
function _wp_filter_post_meta_footnotes( $footnotes ) { $footnotes_decoded = json_decode( $footnotes, true ); if ( ! is_array( $footnotes_decoded ) ) { return ''; } $footnotes_sanitized = array(); foreach ( $footnotes_decoded as $footnote ) { if ( ! empty( $footnote['content'] ) && ! empty( $footnote['id'] ) ) { $footnotes_sanitized[] = array( 'id' => sanitize_key( $footnote['id'] ), 'content' => wp_unslash( wp_filter_post_kses( wp_slash( $footnote['content'] ) ) ), ); } } return wp_json_encode( $footnotes_sanitized ); }