Switch language

wpseek.com
A WordPress-centric search engine for devs and theme authors




remove_meta_box [ WordPress Function ]

remove_meta_box ( $id, $screen, $context )
Parameters:
  • (string) $id String for use in the 'id' attribute of tags.
  • (string|object) $screen The screen on which to show the box (post, page, link).
  • (string) $context The context within the page where the boxes should show ('normal', 'advanced').
Defined at:



Remove a meta box from an edit form.

Source


<?php
function remove_meta_box($id$screen$context) {
    global 
$wp_meta_boxes;

    if ( empty( 
$screen ) )
        
$screen get_current_screen();
    elseif ( 
is_string$screen ) )
        
$screen convert_to_screen$screen );

    
$page $screen->id;

    if ( !isset(
$wp_meta_boxes) )
        
$wp_meta_boxes = array();
    if ( !isset(
$wp_meta_boxes[$page]) )
        
$wp_meta_boxes[$page] = array();
    if ( !isset(
$wp_meta_boxes[$page][$context]) )
        
$wp_meta_boxes[$page][$context] = array();

    foreach ( array(
'high''core''default''low') as $priority )
        
$wp_meta_boxes[$page][$context][$priority][$id] = false;
}
?>

Examples [ wp-snippets.com ]

Google Arama Sonuçlarý

Dahasý ...

0 User Note(s)

Henüz yok. Ýlk sen ol!

Yeni Ekle ...



HTML5 Powered with CSS3 / Styling, Performance & Integration, and Semantics