File "customizing-parsing-behavior.md"
Full Path: /var/www/html/wordpress/wp-content/plugins/wp-optimize/vendor/simplehtmldom/simplehtmldom/docs/examples/customizing-parsing-behavior.md
File size: 355 bytes
MIME-type: text/plain
Charset: utf-8
```php
// Write a function with parameter "$element"
function my_callback($element) {
// Hide all <b> tags
if ($element->tag === 'b')
$element->outertext = '';
}
// Register the callback function with its function name
$html->set_callback('my_callback');
// Callback function will be invoked while dumping
echo $html;
```