Switch language

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




wp_nav_menu_item_link_meta_box [ WordPress Function ]

wp_nav_menu_item_link_meta_box ( No parameters )
Defined at:



Displays a metabox for the custom links menu item.

Source


<?php
function wp_nav_menu_item_link_meta_box() {
    global 
$_nav_menu_placeholder$nav_menu_selected_id;
    
$_nav_menu_placeholder $_nav_menu_placeholder $_nav_menu_placeholder : -1;

    
$current_tab 'create';
    if ( isset( 
$_REQUEST['customlink-tab'] ) && in_array$_REQUEST['customlink-tab'], array('create''all') ) ) {
        
$current_tab $_REQUEST['customlink-tab'];
    }

    
$removed_args = array(
        
'action',
        
'customlink-tab',
        
'edit-menu-item',
        
'menu-item',
        
'page-tab',
        
'_wpnonce',
    );

    
?>
    <div class="customlinkdiv" id="customlinkdiv">

            <input type="hidden" value="custom" name="menu-item[<?php echo $_nav_menu_placeholder?>][menu-item-type]" />
            <p id="menu-item-url-wrap">
                <label class="howto" for="custom-menu-item-url">
                    <span><?php _e('URL'); ?></span>
                    <input id="custom-menu-item-url" name="menu-item[<?php echo $_nav_menu_placeholder?>][menu-item-url]" type="text" class="code menu-item-textbox" value="http://" />
                </label>
            </p>

            <p id="menu-item-name-wrap">
                <label class="howto" for="custom-menu-item-name">
                    <span><?php _e('Label'); ?></span>
                    <input id="custom-menu-item-name" name="menu-item[<?php echo $_nav_menu_placeholder?>][menu-item-title]" type="text" class="regular-text menu-item-textbox input-with-default-title" title="<?php esc_attr_e('Menu Item'); ?>" />
                </label>
            </p>

        <p class="button-controls">
            <span class="add-to-menu">
                <img class="waiting" src="<?php echo esc_urladmin_url'images/wpspin_light.gif' ) ); ?>" alt="" />
                <input type="submit"<?php disabled$nav_menu_selected_id); ?> class="button-secondary submit-add-to-menu" value="<?php esc_attr_e('Add to Menu'); ?>" name="add-custom-menu-item" id="submit-customlinkdiv" />
            </span>
        </p>

    </div><!-- /.customlinkdiv -->
    <?php
}
?>

Examples [ wp-snippets.com ]

Top Google zoekresultaten

Meer ...

Gebruikersdiscussies [ wordpress.org ]

0 User Note(s)

Nog geen één. Wees de eerste!

Nieuw toevoegen ...



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