How does WordPress convert raw data from the database to a readable format in the_content function?
I’ve noticed that it applies the_content filter, but what does the_content filter do?
How does WordPress convert raw data from the database to a readable format in the_content function?
I’ve noticed that it applies the_content filter, but what does the_content filter do?
the default filters are set in /wp-includes/default-filters.php;
for ‘the_content’ this is from line 135:
add_filter( 'the_content', 'wptexturize' );
add_filter( 'the_content', 'convert_smilies' );
add_filter( 'the_content', 'convert_chars' );
add_filter( 'the_content', 'wpautop' );
add_filter( 'the_content', 'shortcode_unautop' );
add_filter( 'the_content', 'prepend_attachment' );
to trace the individual functions, you could try and use http://phpxref.ftwr.co.uk/wordpress/nav.html?_functions/index.html
then follow the links…
Missed one (wp-includes/default-filters.php
, line 102):
// Format WordPress
foreach ( array( 'the_content', 'the_title' ) as $filter )
add_filter( $filter, 'capital_P_dangit', 11 );