scripts_admin.js
28 lines
| 1 | /** |
| 2 | * Created by jules on 7/17/2015. |
| 3 | */ |
| 4 | |
| 5 | var old_compose = _wpcf7.taggen.compose; |
| 6 | |
| 7 | (function($) { |
| 8 | |
| 9 | // ...before overwriting the jQuery extension point |
| 10 | _wpcf7.taggen.compose = function(tagType, $form) |
| 11 | { |
| 12 | |
| 13 | $('#tag-generator-panel-group-style-hidden').val($('#tag-generator-panel-group-style').val()); |
| 14 | |
| 15 | // original behavior - use function.apply to preserve context |
| 16 | var ret = old_compose.apply(this, arguments); |
| 17 | //tagType = arguments[0]; |
| 18 | //$form = arguments[1]; |
| 19 | |
| 20 | // START: code here will be executed after the _wpcf7.taggen.update function |
| 21 | if (tagType== 'group') ret += "[/group]"; |
| 22 | // END |
| 23 | |
| 24 | return ret; |
| 25 | }; |
| 26 | |
| 27 | })( jQuery ); |
| 28 |