| 1 |
<?php |
| 2 |
|
| 3 |
namespace RadiusTheme\SB\Models; |
| 4 |
|
| 5 |
// Do not allow directly accessing this file. |
| 6 |
if ( ! defined( 'ABSPATH' ) ) { |
| 7 |
exit( 'This script cannot be accessed directly.' ); |
| 8 |
} |
| 9 |
|
| 10 |
use RadiusTheme\SB\Traits\SingletonTrait; |
| 11 |
|
| 12 |
class Settings { |
| 13 |
|
| 14 |
use SingletonTrait; |
| 15 |
|
| 16 |
/** |
| 17 |
* Public function store. |
| 18 |
* store data for post |
| 19 |
* |
| 20 |
* @since 1.0.0 |
| 21 |
*/ |
| 22 |
public function get_sections() { |
| 23 |
|
| 24 |
$sections = [ |
| 25 |
'general' => GeneralList::instance()->get_section(), |
| 26 |
'elements' => ElementList::instance()->get_section(), |
| 27 |
'modules' => ModuleList::instance()->get_section(), |
| 28 |
]; |
| 29 |
|
| 30 |
return apply_filters( 'rtsb/core/settings/sections', $sections ); |
| 31 |
} |
| 32 |
|
| 33 |
/** |
| 34 |
* Public function store. |
| 35 |
* store data for post |
| 36 |
* |
| 37 |
* @since 1.0.0 |
| 38 |
*/ |
| 39 |
public function get_data() { |
| 40 |
|
| 41 |
$data = [ |
| 42 |
'widgets' => [], |
| 43 |
'modules' => ModuleList::instance()->get_data(), |
| 44 |
]; |
| 45 |
|
| 46 |
return apply_filters( 'rtsb/core/settings/data', $data ); |
| 47 |
} |
| 48 |
} |
| 49 |
|