* @link https://www.fireplugins.com * @copyright Copyright © 2021 FirePlugins All Rights Reserved * @license GNU GPLv3 or later */ namespace FireBox\Core\Admin\Forms; if (!defined('ABSPATH')) { exit; // Exit if accessed directly. } use FireBox\Core\Helpers\BoxHelper; class FireBox { /** * All Settings for the FireBox Metabox * * @return array */ public static function getSettings() { $settings = [ 'id' => 'FireBoxMetaTabs', 'vertical' => true, 'tabs_menu_sticky' => true, 'mobile_menu' => true, 'show_tab_title' => true, 'data' => [ 'design' => (new FireBox\Design())->getSettings(), 'behavior' => (new FireBox\Behavior())->getSettings(), 'publishing_assignments' => (new FireBox\Assignments())->getSettings(), 'actions' => (new FireBox\Actions())->getSettings(), 'advanced' => (new FireBox\Advanced())->getSettings() ] ]; return apply_filters('firebox/box/settings/edit', $settings); } /** * Gets default data to pass to form * * @return array */ public static function getBindData() { // get box meta from a template $box = BoxHelper::getBoxFromTemplate(); if (!empty($box)) { return $box->params; } // get box meta from existing item $meta = firebox()->box::getMeta(get_the_ID()); if (empty($meta)) { return []; } return $meta; } }