forms-export.php
| 1 | <?php |
| 2 | |
| 3 | if(!defined('ABSPATH')) |
| 4 | exit; |
| 5 | |
| 6 | // Check setting |
| 7 | if(!acf_get_setting('acfe/modules/forms')) |
| 8 | return; |
| 9 | |
| 10 | if(!class_exists('acfe_dynamic_forms_export')): |
| 11 | |
| 12 | class acfe_dynamic_forms_export extends acfe_module_export{ |
| 13 | |
| 14 | function initialize(){ |
| 15 | |
| 16 | // vars |
| 17 | $this->name = 'acfe_dynamic_forms_export'; |
| 18 | $this->title = __('Export Forms'); |
| 19 | $this->description = __('Export Forms'); |
| 20 | $this->select = __('Select Forms'); |
| 21 | $this->default_action = 'json'; |
| 22 | $this->allowed_actions = array('json'); |
| 23 | $this->instance = acf_get_instance('acfe_dynamic_forms'); |
| 24 | $this->file = 'form'; |
| 25 | $this->files = 'forms'; |
| 26 | $this->messages = array( |
| 27 | 'not_found' => __('No form available.'), |
| 28 | 'not_selected' => __('No forms selected'), |
| 29 | 'success_single' => '1 form exported', |
| 30 | 'success_multiple' => '%s forms exported', |
| 31 | ); |
| 32 | |
| 33 | } |
| 34 | |
| 35 | } |
| 36 | |
| 37 | acf_register_admin_tool('acfe_dynamic_forms_export'); |
| 38 | |
| 39 | endif; |