wpscholar/wp-taxonomy-radio-group
最新稳定版本:1.1.2
Composer 安装命令:
composer require wpscholar/wp-taxonomy-radio-group
包简介
A WordPress walker class and function for rendering a taxonomy radio group.
README 文档
README
A WordPress walker class and function for rendering a taxonomy radio group.
Getting Started
The anticipated use case for this is removing the normal hierarchical taxonomy metabox from the WordPress admin and replacing with a custom metabox with radio buttons (as opposed to the normal checkboxes).
For example, here is how to replace the standard categories metabox on the post edit screen with our own custom one:
<?php add_action( 'admin_menu', function () { $taxonomy = get_taxonomy( 'category' ); add_meta_box( "{$taxonomy->name}div", $taxonomy->label, function () use ( $taxonomy ) { echo wp_tax_radio_group( $taxonomy->name ); }, 'post', 'side' ); } );
统计信息
- 总下载量: 5.33k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 4
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: GPL-2.0
- 更新时间: 2017-11-27