| 1 |
<?php |
| 2 |
/** |
| 3 |
* @package FireBox |
| 4 |
* @version 1.0.4 Free |
| 5 |
* |
| 6 |
* @author FirePlugins <info@fireplugins.com> |
| 7 |
* @link https://www.fireplugins.com |
| 8 |
* @copyright Copyright © 2021 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\FireBox; |
| 13 |
|
| 14 |
if (!defined('ABSPATH')) |
| 15 |
{ |
| 16 |
exit; // Exit if accessed directly. |
| 17 |
} |
| 18 |
|
| 19 |
use FireBox\Core\Helpers\BoxHelper; |
| 20 |
|
| 21 |
class Actions |
| 22 |
{ |
| 23 |
/** |
| 24 |
* Holds the Actions Settings |
| 25 |
* |
| 26 |
* @return array |
| 27 |
*/ |
| 28 |
public function getSettings() |
| 29 |
{ |
| 30 |
$boxes = BoxHelper::getAllMirrorBoxesExceptID(get_the_ID()); |
| 31 |
|
| 32 |
// if we are editing a box, replace its name in the list with `This Box` |
| 33 |
if (isset($_GET['post'])) |
| 34 |
{ |
| 35 |
$popup = \intval($_GET['post']); |
| 36 |
$boxes[$popup] = firebox()->_('FB_THIS_BOX') . '(' . $popup . ')'; |
| 37 |
} |
| 38 |
|
| 39 |
return [ |
| 40 |
'title' => 'FB_METABOX_ACTIONS', |
| 41 |
'content' => [ |
| 42 |
'actions' => [ |
| 43 |
'wrapper' => [ |
| 44 |
'class' => ['grid-x', 'grid-margin-y'] |
| 45 |
], |
| 46 |
'fields' => [ |
| 47 |
[ |
| 48 |
'type' => 'Alert', |
| 49 |
'class' => ['margin-bottom-0'], |
| 50 |
'input_class' => ['primary', 'flex-container'], |
| 51 |
'right_action' => '<a href="https://www.fireplugins.com/docs/firebox/the-popup-editor/working-with-actions"><i class="dashicons dashicons-info"></i>' . fpframework()->_('FPF_HELP') . '</a>', |
| 52 |
'text' => 'FB_ACTIONS_ALERT_DESC' |
| 53 |
], |
| 54 |
|
| 55 |
|
| 56 |
[ |
| 57 |
'type' => 'Pro', |
| 58 |
'feature_label' => 'FB_METABOX_ACTIONS', |
| 59 |
'class' => [ 'text-center', 'margin-top-1' ] |
| 60 |
], |
| 61 |
|
| 62 |
] |
| 63 |
] |
| 64 |
] |
| 65 |
]; |
| 66 |
} |
| 67 |
} |