开发者 |
tsunoa
rubengc |
---|---|
更新时间 | 2017年6月2日 00:21 |
捐献地址: | 去捐款 |
PHP版本: | 4.0 及以上 |
WordPress版本: | 4.8 |
版权: | GPLv2 or later |
版权网址: | 版权信息 |
wp-content/plugins/
folder locallywp-admin/plugins.php
on your site (your WP Admin plugin page)First of all you need add a filter to changes how tabs are rendered, and at this point you could add, change or move tabs.
This is the structure for a tab:
$tab = array( 'tab-identifier' => array( 'label' => 'My tab', 'selectors' => array( '#my-meta-box', '.group-of-meta-boxes', ) ) );
This is an example of tab customization:
`function custom_download_tabs( $tabs ) {
// Adding a meta box to general tab
$tabs['general']['selectors'][] = '#my-meta-box';
// Moving a tab
$temp_tab = $tabs['price-files'];
unset($tabs['price-files']);
$tabs['price-files'] = $temp_tab;
// Removing a tab
unset($tabs['feedback']);
return $tabs;
}
add_filter( 'edd_admin_tabs_download_tabs', 'custom_download_tabs');`
Note: Meta boxes that are not in a tab will be kept always visible, such as submit meta box