first commit
This commit is contained in:
43
includes/admin-options.php
Normal file
43
includes/admin-options.php
Normal file
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
if (!defined('ABSPATH')) {
|
||||
die;
|
||||
}
|
||||
|
||||
if (class_exists('CSF'))
|
||||
{
|
||||
$prefix = 'zib_plugin_demo';
|
||||
|
||||
//开始构建
|
||||
CSF::createOptions($prefix, array(
|
||||
'menu_title' => '演示插件',
|
||||
'menu_slug' => 'zib_plugin_demo',
|
||||
'framework_title' => '演示插件',
|
||||
'show_in_customizer' => true,
|
||||
'footer_text' => '由李初一开发的演示插件',
|
||||
'footer_credit' => '<i class="fa fa-fw fa-heart-o" aria-hidden="true"></i> ',
|
||||
'theme' => 'light',
|
||||
));
|
||||
|
||||
CSF::createSection($prefix, array(
|
||||
'id' => 'add',
|
||||
'title' => '测试功能',
|
||||
'icon' => 'fa fa-gitlab',
|
||||
'fields' => array(
|
||||
array(
|
||||
'title' => ' ',
|
||||
'id' => 'demo_func',
|
||||
'default' => false,
|
||||
'subtitle' => __('网站全局变灰', 'zib_language'),
|
||||
'type' => 'switcher',
|
||||
),
|
||||
array(
|
||||
'dependency' => array('demo_func', '!=', ''),
|
||||
'content' => '测试保存和功能拦截,就算已保存删除链接后同样不生效',
|
||||
'style' => 'danger',
|
||||
'type' => 'submessage',
|
||||
),
|
||||
),
|
||||
));
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user