Files
zibll-plugin-demo/includes/admin-options.php
2026-01-29 19:18:33 +08:00

44 lines
1.2 KiB
PHP

<?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',
),
),
));
}