index.js
31 lines
| 1 | /** |
| 2 | * WordPress dependencies |
| 3 | */ |
| 4 | import { |
| 5 | applyFilters, |
| 6 | } from '@wordpress/hooks'; |
| 7 | |
| 8 | import { |
| 9 | Component, |
| 10 | } from '@wordpress/element'; |
| 11 | |
| 12 | /** |
| 13 | * Component Class |
| 14 | */ |
| 15 | export default class ApplyFilters extends Component { |
| 16 | render() { |
| 17 | const { |
| 18 | name, |
| 19 | children, |
| 20 | } = this.props; |
| 21 | |
| 22 | return ( |
| 23 | applyFilters( |
| 24 | name, |
| 25 | children || '', |
| 26 | this.props, |
| 27 | ) |
| 28 | ); |
| 29 | } |
| 30 | } |
| 31 |