How to use the filter?
How to use the filter, before WordPress converts !--nextpage--
?
The following construction does not work:
add_filter ( "the_content", function( $content ) {
$content = preg_replace( "/(\\!--nextpage--\)/miu", htmlspecialchars( $1, ENT_QUOTES, 'UTF-8', false ), $content );
return $content;
});
Code just for example.