Make WordPress Core

Ticket #23805: 23805.2.diff

File 23805.2.diff, 657 bytes (added by GaryJ, 8 years ago)

Updated for 4.7-dev

  • src/wp-admin/includes/ajax-actions.php

    diff --git src/wp-admin/includes/ajax-actions.php src/wp-admin/includes/ajax-actions.php
    index ecbe467..8ac62af 100644
    function wp_ajax_add_menu_item() { 
    11711171        foreach ( (array) $_POST['menu-item'] as $menu_item_data ) {
    11721172                if (
    11731173                        ! empty( $menu_item_data['menu-item-type'] ) &&
    1174                         'custom' != $menu_item_data['menu-item-type'] &&
     1174                        in_array( $menu_item_data['menu-item-type'], array( 'post_type', 'post_type_archive', 'taxonomy' ) ) &&
    11751175                        ! empty( $menu_item_data['menu-item-object-id'] )
    11761176                ) {
    11771177                        switch( $menu_item_data['menu-item-type'] ) {