Files
wordpress-theme-aksrt/inc/classes/admin/schema/class-aksrt-admin-schema-tools-import-export.php
T

30 lines
1.1 KiB
PHP

<?php
/**
* AKSRT_Admin_Schema_Tools_Import_Export section schema.
*
* @package AKSRT
*/
defined('ABSPATH') || exit;
class AKSRT_Admin_Schema_Tools_Import_Export {
public static function build(): array {
return [
'key' => 'import-export',
'title' => '导入导出',
'version' => '1.0.0',
'option_key' => 'aksrt_settings',
'groups' => [
['key' => 'export', 'title' => '导出配置', 'fields' => [
['key' => 'export_settings', 'label' => '导出主题设置', 'type' => 'button', 'help' => '导出当前所有主题配置为 JSON 文件'],
['key' => 'export_options', 'label' => '导出 WordPress 选项', 'type' => 'button', 'help' => '导出 aksrt_settings 等选项'],
]],
['key' => 'import', 'title' => '导入配置', 'fields' => [
['key' => 'import_settings', 'label' => '导入主题设置', 'type' => 'file', 'accept' => '.json', 'help' => '导入主题配置文件(将覆盖当前设置)'],
]],
],
];
}
}