Make WordPress Core


Ignore:
Timestamp:
07/06/2015 05:52:59 AM (11 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/src/wp-includes/class-wp-customize-nav-menus.php

    r33074 r33089  
    121121                                        'type_label' => get_post_type_object( $post->post_type )->labels->singular_name,
    122122                                        'object'     => $post->post_type,
    123                                         'object_id'  => (int) $post->ID,
     123                                        'object_id'  => intval( $post->ID ),
     124                                        'url'        => get_permalink( intval( $post->ID ) ),
    124125                                );
    125126                        }
     
    148149                                        'type_label' => get_taxonomy( $term->taxonomy )->labels->singular_name,
    149150                                        'object'     => $term->taxonomy,
    150                                         'object_id'  => $term->term_id,
     151                                        'object_id'  => intval( $term->term_id ),
     152                                        'url'        => get_term_link( intval( $term->term_id ), $term->taxonomy ),
    151153                                );
    152154                        }
     
    229231                                $results[] = array(
    230232                                        'id'         => 'post-' . $post->ID,
     233                                        'title'      => html_entity_decode( $post_title, ENT_QUOTES, get_bloginfo( 'charset' ) ),
    231234                                        'type'       => 'post_type',
    232235                                        'type_label' => $post_type_objects[ $post->post_type ]->labels->singular_name,
    233236                                        'object'     => $post->post_type,
    234237                                        'object_id'  => intval( $post->ID ),
    235                                         'title'      => html_entity_decode( $post_title, ENT_QUOTES, get_bloginfo( 'charset' ) ),
     238                                        'url'        => get_permalink( intval( $post->ID ) ),
    236239                                );
    237240                        }
     
    251254                                $results[] = array(
    252255                                        'id'         => 'term-' . $term->term_id,
     256                                        'title'      => html_entity_decode( $term->name, ENT_QUOTES, get_bloginfo( 'charset' ) ),
    253257                                        'type'       => 'taxonomy',
    254258                                        'type_label' => get_taxonomy( $term->taxonomy )->labels->singular_name,
    255259                                        'object'     => $term->taxonomy,
    256260                                        'object_id'  => intval( $term->term_id ),
    257                                         'title'      => html_entity_decode( $term->name, ENT_QUOTES, get_bloginfo( 'charset' ) ),
     261                                        'url'        => get_term_link( intval( $term->term_id ), $term->taxonomy ),
    258262                                );
    259263                        }
Note: See TracChangeset for help on using the changeset viewer.