bbp_code_trick( string $content = '' )
Filter the topic or reply content and output code and pre tags
Description Description
Parameters Parameters
- $content
-
(Optional) Topic and reply content
Default value: ''
Return Return
(string) Partially encoded content
Source Source
File: includes/common/formatting.php
function bbp_code_trick( $content = '' ) { $content = str_replace( array( "\r\n", "\r" ), "\n", $content ); $content = preg_replace_callback( "|(`)(.*?)`|", 'bbp_encode_callback', $content ); $content = preg_replace_callback( "!(^|\n)`(.*?)`!s", 'bbp_encode_callback', $content ); return $content; }
Changelog Changelog
Version | Description |
---|---|
2.3.0 | Introduced. |