| 1 |
<?php |
| 2 |
|
| 3 |
use ElementorPro\Modules\ThemeBuilder\Documents\Archive; |
| 4 |
|
| 5 |
if (!defined('ABSPATH')) { |
| 6 |
exit; // Exit if accessed directly |
| 7 |
} |
| 8 |
|
| 9 |
class Betterdocs_Doc_Archive extends Archive |
| 10 |
{ |
| 11 |
public static function get_properties() |
| 12 |
{ |
| 13 |
$properties = parent::get_properties(); |
| 14 |
|
| 15 |
$properties['location'] = 'archive'; |
| 16 |
$properties['condition_type'] = 'doc_archive'; |
| 17 |
|
| 18 |
return $properties; |
| 19 |
} |
| 20 |
|
| 21 |
protected static function get_site_editor_type() |
| 22 |
{ |
| 23 |
return 'doc-archive'; |
| 24 |
} |
| 25 |
|
| 26 |
public static function get_title() |
| 27 |
{ |
| 28 |
return __('Docs Archive', 'betterdocs'); |
| 29 |
} |
| 30 |
|
| 31 |
protected static function get_editor_panel_categories() |
| 32 |
{ |
| 33 |
$categories = [ |
| 34 |
'docs-archive' => [ |
| 35 |
'title' => __('Docs Archive', 'betterdocs'), |
| 36 |
], |
| 37 |
]; |
| 38 |
$categories += parent::get_editor_panel_categories(); |
| 39 |
unset($categories['theme-elements-archive']); |
| 40 |
return $categories; |
| 41 |
} |
| 42 |
|
| 43 |
public static function get_editor_panel_config() |
| 44 |
{ |
| 45 |
$config = parent::get_editor_panel_config(); |
| 46 |
$config['widgets_settings']['theme-archive-title']['categories'][] = 'docs-archive'; |
| 47 |
return $config; |
| 48 |
} |
| 49 |
|
| 50 |
protected function get_remote_library_config() |
| 51 |
{ |
| 52 |
$config = parent::get_remote_library_config(); |
| 53 |
|
| 54 |
$config['category'] = 'Docs Archive'; |
| 55 |
|
| 56 |
return $config; |
| 57 |
} |
| 58 |
} |
| 59 |
|