| 1 |
<?php |
| 2 |
/** |
| 3 |
* @package FireBox |
| 4 |
* @version 2.1.14 Free |
| 5 |
* |
| 6 |
* @author FirePlugins <info@fireplugins.com> |
| 7 |
* @link https://www.fireplugins.com |
| 8 |
* @copyright Copyright © 2024 FirePlugins All Rights Reserved |
| 9 |
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later |
| 10 |
*/ |
| 11 |
|
| 12 |
namespace FireBox\Core\Admin\Forms; |
| 13 |
|
| 14 |
if (!defined('ABSPATH')) |
| 15 |
{ |
| 16 |
exit; // Exit if accessed directly. |
| 17 |
} |
| 18 |
|
| 19 |
class Import |
| 20 |
{ |
| 21 |
/** |
| 22 |
* All Settings for the FireBox Import Page |
| 23 |
* |
| 24 |
* @return array |
| 25 |
*/ |
| 26 |
public static function getSettings() |
| 27 |
{ |
| 28 |
$settings = [ |
| 29 |
'data' => [ |
| 30 |
'import' => self::getImportSettings() |
| 31 |
] |
| 32 |
]; |
| 33 |
|
| 34 |
return apply_filters('firebox/forms/import/edit', $settings); |
| 35 |
} |
| 36 |
|
| 37 |
/** |
| 38 |
* Holds the Import Settings |
| 39 |
* |
| 40 |
* @retun array |
| 41 |
*/ |
| 42 |
private static function getImportSettings() |
| 43 |
{ |
| 44 |
return [ |
| 45 |
'title' => 'FPF_IMPORT', |
| 46 |
'content' => [ |
| 47 |
'import' => [ |
| 48 |
'wrapper' => [ |
| 49 |
'class' => ['grid-x', 'grid-margin-y'] |
| 50 |
], |
| 51 |
'fields' => [ |
| 52 |
[ |
| 53 |
'type' => 'Heading', |
| 54 |
'title' => firebox()->_('FB_IMPORT_CAMPAIGNS') |
| 55 |
], |
| 56 |
[ |
| 57 |
'name' => 'file', |
| 58 |
'name_clean' => true, |
| 59 |
'type' => 'File', |
| 60 |
'label' => 'FPF_SELECT_IMPORT_FILE' |
| 61 |
], |
| 62 |
[ |
| 63 |
'name' => 'publish_all', |
| 64 |
'type' => 'Dropdown', |
| 65 |
'label' => firebox()->_('FB_PUBLISH_CAMPAIGNS'), |
| 66 |
'default' => 2, |
| 67 |
'choices' => [ |
| 68 |
0 => 'FPF_NO', |
| 69 |
1 => 'FPF_YES', |
| 70 |
2 => 'FPF_AS_EXPORTED' |
| 71 |
] |
| 72 |
] |
| 73 |
] |
| 74 |
] |
| 75 |
] |
| 76 |
]; |
| 77 |
} |
| 78 |
} |