本文整理汇总了PHP中remove_meta_box函数的典型用法代码示例。如果您正苦于以下问题:PHP remove_meta_box函数的具体用法?PHP remove_meta_box怎么用?PHP remove_meta_box使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了remove_meta_box函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: bac_modify_dashboard
/**
* Modify the Dashboard
*/
function bac_modify_dashboard()
{
// Remove the "Quick Draft" widget
remove_meta_box('dashboard_quick_press', 'dashboard', 'side');
// Remove the "WordPress News" widget
remove_meta_box('dashboard_primary', 'dashboard', 'side');
}
示例2: remove_person_meta_box
/**
* Remove the Person metabox from all post types.
*/
function remove_person_meta_box()
{
$post_types = get_post_types('', 'names');
foreach ($post_types as $post_type) {
remove_meta_box('tagsdiv-person', '' . $post_type . '', 'side');
}
}
示例3: cx_admin_menu
/**
* Setup the Admin menu in WordPress
*
* @return void
*/
function cx_admin_menu()
{
global $wp_version, $CX;
// Add old style custom icon for before WP 3.8
$old_ico = version_compare($wp_version, '3.8', '<') ? CX_URL . '/assets/img/cx-ico-16.png' : '';
/**
* Menu for Admins
*/
if (current_user_can('manage_options')) {
add_menu_page($CX->meta['Name'], 'Chat X', 'manage_options', 'chat_x', 'cx_console_template', $old_ico, '50.9874');
/**
* Menu for Operators
*/
} else {
if (current_user_can('answer_visitors')) {
add_menu_page($CX->meta['Name'], 'Chat X', 'cx_op', 'chat_x', 'cx_console_template', $old_ico, '50.9874');
}
}
/**
* Add submenus
*/
// Chat Logs
add_submenu_page('chat_x', __('Chat Logs', 'cx'), __('Chat Logs', 'cx'), 'manage_options', 'cx_chat_logs', 'cx_render_chat_logs');
// Offline Messages
add_submenu_page('chat_x', __('Offline messages', 'cx'), __('Offline messages', 'cx'), 'manage_options', 'edit.php?post_type=cx_offline_msg');
/*add_submenu_page(
'chat_x',
__( 'Predefined messages', 'cx' ),
__( 'Predefined messages', 'cx' ),
'manage_options',
'edit.php?post_type=cx_predefined_msg'
);*/
// Remove publish box some post types
remove_meta_box('submitdiv', 'cx_offline_msg', 'side');
}
示例4: remove_dashboard_widgets
/**
* Remove unnecessary dashboard widgets
*
* @link http://www.deluxeblogtips.com/2011/01/remove-dashboard-widgets-in-wordpress.html
*/
function remove_dashboard_widgets()
{
remove_meta_box('dashboard_incoming_links', 'dashboard', 'normal');
remove_meta_box('dashboard_plugins', 'dashboard', 'normal');
remove_meta_box('dashboard_primary', 'dashboard', 'normal');
remove_meta_box('dashboard_secondary', 'dashboard', 'normal');
}
示例5: rename_comments_meta_box
/**
* Rename the 'Comments' meta box to 'User Contributed Notes' for reference-editing screens.
*
* @param string $post_type Post type.
* @param WP_Post $post WP_Post object for the current post.
*/
function rename_comments_meta_box($post_type, $post)
{
if (is_parsed_post_type($post_type)) {
remove_meta_box('commentsdiv', $post_type, 'normal');
add_meta_box('commentsdiv', __('User Contributed Notes', 'wporg'), 'post_comment_meta_box', $post_type, 'normal', 'high');
}
}
示例6: remove_meta_boxes
/**
* Remove bloat
*/
public function remove_meta_boxes()
{
remove_meta_box('commentsdiv', 'wc_crm_accounts', 'normal');
remove_meta_box('woothemes-settings', 'wc_crm_accounts', 'normal');
remove_meta_box('commentstatusdiv', 'wc_crm_accounts', 'normal');
remove_meta_box('slugdiv', 'wc_crm_accounts', 'normal');
}
示例7: product_listing_remove_wpseo
/**
* Removes the WPSEO metabox from product listing edit screen
* The title and description is managed from WPSEO settings
*/
function product_listing_remove_wpseo()
{
$id = get_product_listing_id();
if (is_admin() && isset($_GET['post']) && $_GET['post'] == $id) {
remove_meta_box('wpseo_meta', 'page', 'normal');
}
}
示例8: removeDefaultCustomFields
/**
* Remove the default Custom Fields meta box
*/
function removeDefaultCustomFields($type, $context, $post)
{
foreach (array('normal', 'advanced', 'side') as $context) {
remove_meta_box('postcustom', 'post', $context);
remove_meta_box('pagecustomdiv', 'page', $context);
}
}
示例9: cp_setup_meta_box
/**
* Removes unnecessary metaboxes.
*
* @return void
*/
function cp_setup_meta_box()
{
$remove_boxes = array('authordiv', 'postexcerpt', 'revisionsdiv', 'trackbacksdiv');
foreach ($remove_boxes as $id) {
remove_meta_box($id, APP_POST_TYPE, 'normal');
}
}
示例10: doModifyAdminWidgets
function doModifyAdminWidgets()
{
// Remove Wordpress Welcome
remove_action('welcome_panel', 'wp_welcome_panel');
// Normal Widgets (Left Side)
remove_meta_box('dashboard_incoming_links', 'dashboard', 'normal');
// Not sure
remove_meta_box('dashboard_plugins', 'dashboard', 'normal');
// Plugins Widget?
remove_meta_box('dashboard_secondary', 'dashboard', 'normal');
// Not sure
remove_meta_box('dashboard_recent_comments', 'dashboard', 'normal');
// Removes Comments Widget?
remove_meta_box('dashboard_right_now', 'dashboard', 'normal');
// Removes At a Glance
remove_meta_box('dashboard_activity', 'dashboard', 'normal');
// Removes Activity
remove_meta_box('woocommerce_dashboard_recent_reviews', 'dashboard', 'normal');
// Remove WooCommerce Recent Reviews
// Side Widgets (Right Side)
remove_meta_box('dashboard_primary', 'dashboard', 'side');
// Remove WordPress News
remove_meta_box('dashboard_quick_press', 'dashboard', 'side');
// Remove Quick Draft
remove_meta_box('dashboard_recent_drafts', 'dashboard', 'side');
// Not sure
}
示例11: mdjm_remove_event_meta_boxes
/**
* Remove unwanted metaboxes to for the mdjm-event post type.
* Apply the `mdjm_event_remove_metaboxes` filter to allow for filtering of metaboxes to be removed.
*
* @since 1.3
* @param
* @return
*/
function mdjm_remove_event_meta_boxes()
{
$metaboxes = apply_filters('mdjm_event_remove_metaboxes', array(array('submitdiv', 'mdjm-event', 'side'), array('event-typesdiv', 'mdjm-event', 'side'), array('tagsdiv-enquiry-source', 'mdjm-event', 'side')));
foreach ($metaboxes as $metabox) {
remove_meta_box($metabox[0], $metabox[1], $metabox[2]);
}
}
示例12: appthemes_remove_orders_meta_boxes
/**
* Removes Wordpress default metaboxes from the page
* @return void
*/
function appthemes_remove_orders_meta_boxes()
{
remove_meta_box('submitdiv', APPTHEMES_ORDER_PTYPE, 'side');
remove_meta_box('postcustom', APPTHEMES_ORDER_PTYPE, 'normal');
remove_meta_box('slugdiv', APPTHEMES_ORDER_PTYPE, 'normal');
remove_meta_box('authordiv', APPTHEMES_ORDER_PTYPE, 'normal');
}
示例13: removeDefaultCustomFields
/**
* Remove the default Custom Fields meta box
*/
function removeDefaultCustomFields( $type, $context, $post ) {
foreach ( array( 'normal', 'advanced', 'side' ) as $context ) {
foreach ( $this->postTypes as $postType ) {
remove_meta_box( 'postcustom', $postType, $context );
}
}
}
示例14: admin_menu
/**
* Register the menu and submenus for the admin area.
*/
public function admin_menu()
{
if (isset($_GET['post_type']) && $_GET['post_type'] == 'beer') {
remove_meta_box('postcustom', 'beer', 'normal');
}
if (isset($_GET['post_type']) && $_GET['post_type'] == 'review') {
remove_action('media_buttons', 'media_buttons');
remove_meta_box('postcustom', 'review', 'normal');
}
/*add_menu_page(
'Main',
'NWM Catalog',
'manage_options',
'nwm-catalog',
array($this->controller, 'main'),
'dashicons-book',
'23.56'
);
add_submenu_page(
'nwm-catalog',
'Categories',
'Categories CRUD',
'manage_options',
'nwm-catalog-categories',
array($this->controller, 'categories')
)
; add_submenu_page(
'nwm-catalog',
'About',
'About',
'manage_options',
'nwm-catalog-about',
array($this->controller, 'about')
);*/
}
示例15: mdjm_remove_communication_meta_boxes
/**
* Remove unwanted metaboxes to for the mdjm_communication post type.
* Apply the `mdjm_communication_remove_metaboxes` filter to allow for filtering of metaboxes to be removed.
*
* @since 1.3
* @param
* @return
*/
function mdjm_remove_communication_meta_boxes()
{
$metaboxes = apply_filters('mdjm_communication_remove_metaboxes', array(array('submitdiv', 'mdjm_communication', 'side')));
foreach ($metaboxes as $metabox) {
remove_meta_box($metabox[0], $metabox[1], $metabox[2]);
}
}