Make WordPress Core


Ignore:
Timestamp:
07/06/2015 05:52:59 AM (8 years ago)
Author:
westonruter
Message:

Customizer: Ensure that a newly-added nav menu item gets the Original link populated in its control.

Props valendesigns.
Fixes #32858.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/customize/nav-menus.php

    r33043 r33089  
    9898            $expected = array(
    9999                'id'         => 'post-' . $post_id,
     100                'title'      => html_entity_decode( get_the_title( $post_id ) ),
    100101                'type'       => 'post_type',
    101102                'type_label' => get_post_type_object( 'post' )->labels->singular_name,
    102103                'object'     => 'post',
    103104                'object_id'  => intval( $post_id ),
    104                 'title'      => html_entity_decode( get_the_title( $post_id ) ),
     105                'url'        => get_permalink( intval( $post_id ) ),
    105106            );
    106107            wp_set_object_terms( $post_id, $term_ids, 'category' );
     
    116117            $expected = array(
    117118                'id'         => 'term-' . $term_id,
     119                'title'      => $term->name,
    118120                'type'       => 'taxonomy',
    119121                'type_label' => get_taxonomy( 'category' )->labels->singular_name,
    120122                'object'     => 'category',
    121123                'object_id'  => intval( $term_id ),
    122                 'title'      => $term->name,
     124                'url'        => get_term_link( intval( $term_id ), 'category' ),
    123125            );
    124126            $s = sanitize_text_field( wp_unslash( $term->name ) );
Note: See TracChangeset for help on using the changeset viewer.