bbp_encode_empty_callback( string $content = '', string $key = '', string $preg = '' )
Callback to replace empty HTML tags in a content string
Description
Parameters
- $content
-
(Optional)
Default value: ''
- $key
-
(Optional) Not used
Default value: ''
- $preg
-
(Optional)
Default value: ''
Source
File: bp-forums/common/formatting.php
function bbp_encode_empty_callback( &$content = '', $key = '', $preg = '' ) { if ( strpos( $content, '`' ) !== 0 ) { $content = preg_replace( "|<({$preg})\s*?/*?>|i", '<$1 />', $content ); } }
Changelog
Version | Description |
---|---|
bbPress (r4641) | Introduced. |
Questions?
We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.