main.js
26 lines
| 1 | import * as captchaBlock from './captcha-container-block'; |
| 2 | import captchaPlugin from './captcha-plugin'; |
| 3 | |
| 4 | const { |
| 5 | addFilter, |
| 6 | } = wp.hooks; |
| 7 | |
| 8 | addFilter( |
| 9 | 'jet.fb.register.fields', |
| 10 | 'jet-form-builder/captcha', |
| 11 | function ( blocks ) { |
| 12 | blocks.push( captchaBlock ); |
| 13 | |
| 14 | return blocks; |
| 15 | }, |
| 16 | ); |
| 17 | |
| 18 | addFilter( |
| 19 | 'jet.fb.register.plugin.jf-validation-panel.after', |
| 20 | 'jet-form-builder/captcha', |
| 21 | function ( plugins ) { |
| 22 | plugins.push( captchaPlugin ); |
| 23 | |
| 24 | return plugins; |
| 25 | }, |
| 26 | ); |