期待交付一个轻量、可自由扩展、高性能、低耦合的WordPress开发框架,第一阶段计划包含设置和路由模块。
Setting::create_options( 'wenpai_framework_example', array(
'menu_title' => '文派开发框架',
'menu_slug' => 'wenpai_framework'
) );
Setting::create_section( 'wenpai_framework_example', array(
array(
'id' => 'one',
'title' => '选项卡一',
'fields' => array(
array(
'id' => 'text',
'type' => 'text',
'title' => '文本框',
),
)
), array(
'id' => 'two',
'title' => '选项卡二',
'fields' => array(
array(
'id' => 'text',
'type' => 'text',
'title' => '文本框',
),
)
)
) );
Route::permission([Middleware::class, 'restApiPermission'])->type(RouteType::API)->get([
'wcy/v1' => [
'plugins' => [new Plugins(), 'get_items'],
'themes' => [new Themes(), 'get_items']
]
]);
此框架设计过程中参考了Laravel、WordPress Settings Api Class、codestarframework