| 1 |
<?php |
| 2 |
|
| 3 |
/** |
| 4 |
* All registered filter's handlers should be in app\Hooks\Handlers, |
| 5 |
* addFilter is similar to add_filter and addCustomFlter is just a |
| 6 |
* wrapper over add_filter which will add a prefix to the hook name |
| 7 |
* using the plugin slug to make it unique in all wordpress plugins, |
| 8 |
* ex: $app->addCustomFilter('foo', ['FooHandler', 'handleFoo']) is |
| 9 |
* equivalent to add_filter('slug-foo', ['FooHandler', 'handleFoo']). |
| 10 |
*/ |
| 11 |
|
| 12 |
/** |
| 13 |
* @var $app \FluentSupport\Framework\Foundation\Application; |
| 14 |
*/ |
| 15 |
|
| 16 |
|
| 17 |
add_filter('fluent_support/parse_smartcode_data', function ($string, $data) { |
| 18 |
return (new \FluentSupport\App\Services\Parser\Parser())->parse($string, $data); |
| 19 |
}, 10, 2); |
| 20 |
|