php - WordPress 自定义启用/禁用多站点的管理设置
问题描述
我有这个多站点设置,您可以在其中启用和禁用全局分类。但我不知道如何检索和保存数据。有谁能够帮我?
这将是视图
这是我的代码
function network_settings_screen() {
<div class="wrap">
<h1><?php esc_html_e( 'MCMultisite Distributor Global Settings', 'distributor' ); ?></h1>
<form action="" method="post">
<input type="hidden" name="dt_network_settings" value="1">
<table class="form-table">
<tbody>
<tr>
<th scope="row"><?php esc_html_e( 'Enable Multisite use one taxonomy db table.', 'distributor' ); ?></th>
</tr>
<tr>
<td>
<ul class="media-handling">
<li>
<label><input type="radio" value="enable" name="dt_settings[network_taxonomy]">
<?php esc_html_e( 'Enable (default).', 'distributor' ); ?>
</label>
</li>
<li>
<label><input type="radio" value="disable" name="dt_settings[network_taxonomy]">
<?php esc_html_e( 'Disable', 'distributor' ); ?>
</label>
</li>
</ul>
</td>
</tr>
</tbody>
</table>
<?php submit_button(); ?>
</form>
</div>
<?php
}
解决方案
推荐阅读
- apache-tika - TIKA Server 提取嵌入式资源
- event-handling - 在 Python 中订阅 wxWidgets 子类的事件
- angular - 角度:使用传单地图删除直线点
- node.js - 为什么我们在 nodejs 上的 javascript 中将 http 服务器传递给 websocket 实例?
- node.js - 将图像从反应上传到 nodejs express API
- authentication - 服务器端的 Next.js cookie
- laravel - 模块构建失败,Laravel 6 项目
- r - 在 R 上安装 rms 包时出错
- flutter - 如何在颤动中为布局元素设置背景颜色
- css - 我应该为详细列表(表格)使用 CSS 网格布局吗?