WordPress.org

Make WordPress Core

Ticket #35203: 35203.1.diff

File 35203.1.diff, 680 bytes (added by celloexpressions, 4 years ago)

Reuse wp_setup_nav_menu_items hook directly.

  • src/wp-includes/customize/class-wp-customize-nav-menu-item-setting.php

     
    570570                /** This filter is documented in wp-includes/nav-menu.php */
    571571                $post->description = apply_filters( 'nav_menu_description', wp_trim_words( $post->description, 200 ) );
    572572
    573                 return $post;
     573                /** This filter is documented in wp-includes/nav-menu.php */
     574                return apply_filters( 'wp_setup_nav_menu_item', $post );
    574575        }
    575576
    576577        /**