当前位置: 首页>>代码示例>>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;未经允许,请勿转载。