當前位置: 首頁>>代碼示例>>PHP>>正文


PHP remove_meta_box函數代碼示例

本文整理匯總了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');
}
開發者ID:bermanco,項目名稱:bac-cpt,代碼行數:10,代碼來源:admin.php

示例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');
    }
}
開發者ID:amprog,項目名稱:cap-byline,代碼行數:10,代碼來源:cap-byline.php

示例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');
}
開發者ID:baden03,項目名稱:access48,代碼行數:40,代碼來源:fn.admin.php

示例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');
}
開發者ID:fluxinetwork,項目名稱:fluxi_wp_start,代碼行數:12,代碼來源:admin.php

示例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');
    }
}
開發者ID:lkwdwrd,項目名稱:wp-doc-highlighter,代碼行數:13,代碼來源:init.php

示例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');
 }
開發者ID:sajidshah,項目名稱:le-dolci,代碼行數:10,代碼來源:wc_crm_post-types.php

示例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');
    }
}
開發者ID:nanookYs,項目名稱:orientreizen,代碼行數:11,代碼來源:wpseo.php

示例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);
     }
 }
開發者ID:xiaoxiaoleo,項目名稱:yihe,代碼行數:10,代碼來源:custom_form_2.php

示例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');
    }
}
開發者ID:kalushta,項目名稱:darom,代碼行數:12,代碼來源:listing-single.php

示例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
}
開發者ID:Hitman007,項目名稱:ArcticColdCapsMods,代碼行數:27,代碼來源:doModifyAdminWidgets.php

示例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]);
    }
}
開發者ID:mdjm,項目名稱:mobile-dj-manager,代碼行數:15,代碼來源:metaboxes.php

示例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');
}
開發者ID:TopLineMediaTeam,項目名稱:horseshow,代碼行數:11,代碼來源:order-single.php

示例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 );
				}
			}
		}
開發者ID:JoeyButler,項目名稱:starkers,代碼行數:10,代碼來源:custom_fields.php

示例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')
             );*/
 }
開發者ID:mauricioabisay,項目名稱:nwm-loc,代碼行數:38,代碼來源:class-plugin-name-admin.php

示例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]);
    }
}
開發者ID:mdjm,項目名稱:mobile-dj-manager,代碼行數:15,代碼來源:metaboxes.php


注:本文中的remove_meta_box函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。