WordPress.org

Make WordPress Core

Ticket #41488: 41488.diff

File 41488.diff, 838 bytes (added by dlh, 4 years ago)
  • src/wp-includes/class-wp-customize-nav-menus.php

     
    12101210                        ! empty( $args['echo'] )
    12111211                        &&
    12121212                        // ...and if the fallback_cb can be serialized to JSON, since it will be included in the placement context data,
    1213                         ( empty( $args['fallback_cb'] ) || is_string( $args['fallback_cb'] ) )
     1213                        ( empty( $args['fallback_cb'] ) || ( is_string( $args['fallback_cb'] ) && false === strpos( $args['fallback_cb'], '\\' ) ) )
    12141214                        &&
    12151215                        // ...and if the walker can also be serialized to JSON, since it will be included in the placement context data as well,
    12161216                        ( empty( $args['walker'] ) || is_string( $args['walker'] ) )