Make WordPress Core

Ticket #37417: 37417.9.diff

File 37417.9.diff, 2.5 KB (added by celloexpressions, 9 years ago)
  • src/wp-admin/css/customize-nav-menus.css

     
    4141        margin-right: 0;
    4242}
    4343
     44.wp-customizer .item-title .view-link:before {
     45        content: "\f177";
     46        font: 20px/11px dashicons;
     47        color: #555;
     48        top: 4px;
     49        position: relative;
     50        margin-left: 4px;
     51}
     52
     53.wp-customizer .item-title .view-link:hover:before,
     54.wp-customizer .item-title .view-link:focus:before {
     55        color: #0073aa;
     56}
     57
    4458.wp-customizer .menu-item-handle .item-type {
    4559        padding: 1px 21px 0 5px;
    4660        float: right;
  • src/wp-admin/js/customize-nav-menus.js

     
    10711071                        var control = this;
    10721072
    10731073                        this.container.find( '.menu-item-handle' ).on( 'click', function( e ) {
     1074                                if ( $( e.target ).hasClass( 'view-link' ) ) {
     1075                                        return;
     1076                                }
    10741077                                e.preventDefault();
    10751078                                e.stopPropagation();
    10761079                                var menuControl = control.getMenuControl();
     
    12461249                _setupLinksUI: function() {
    12471250                        var $origBtn;
    12481251
    1249                         // Configure original link.
    1250                         $origBtn = this.container.find( 'a.original-link' );
     1252                        // Configure original link and view links.
     1253                        $origBtn = this.container.find( 'a.original-link, a.view-link' );
    12511254
    12521255                        $origBtn.on( 'click', function( e ) {
    12531256                                e.preventDefault();
  • src/wp-includes/customize/class-wp-customize-nav-menu-item-control.php

     
    7070                                <span class="item-title" aria-hidden="true">
    7171                                        <span class="spinner"></span>
    7272                                        <span class="menu-item-title<# if ( ! data.title ) { #> no-title<# } #>">{{ data.title || wp.customize.Menus.data.l10n.untitled }}</span>
     73                                        <# if ( 'post_type' === data.item_type || 'taxonomy' === data.item_type ) { #>
     74                                                <a class="view-link" href="{{ data.url }}"><span class="screen-reader-text"><?php printf( __( 'Preview %s' ), '{{ data.original_title }}' ); ?></span></a>
     75                                        <# } #>
    7376                                </span>
    7477                                <span class="item-controls">
    7578                                        <button type="button" class="button-link item-edit" aria-expanded="false"><span class="screen-reader-text"><?php