WordPress.org

Make WordPress Core

Ticket #18306: 18306.9.diff

File 18306.9.diff, 4.5 KB (added by lessbloat, 6 years ago)
  • wp-admin/includes/post.php

     
    10691069        }
    10701070
    10711071        if ( false === strpos($permalink, '%postname%') && false === strpos($permalink, '%pagename%') ) {
     1072                if ( isset( $view_post ) )
     1073                        $permalink = '<a href="' . $permalink . '" title="' . esc_attr( $view_post ) . '" target="_blank">' . $permalink . '</a>';
    10721074                $return = '<strong>' . __('Permalink:') . "</strong>\n" . '<span id="sample-permalink" tabindex="-1">' . $permalink . "</span>\n";
    10731075                if ( '' == get_option( 'permalink_structure' ) && current_user_can( 'manage_options' ) && !( 'page' == get_option('show_on_front') && $id == get_option('page_on_front') ) )
    10741076                        $return .= '<span id="change-permalinks"><a href="options-permalink.php" class="button button-tiny" target="_blank">' . __('Change Permalinks') . "</a></span>\n";
    1075                 if ( isset($view_post) )
    1076                         $return .= "<span id='view-post-btn'><a href='$permalink' class='button button-tiny'>$view_post</a></span>\n";
    10771077
    10781078                $return = apply_filters('get_sample_permalink_html', $return, $id, $new_title, $new_slug);
    10791079
     
    10941094                }
    10951095        }
    10961096
    1097         $post_name_html = '<span id="editable-post-name" title="' . $title . '">' . $post_name_abridged . '</span>';
     1097        $post_name_html = '<span id="editable-post-name">' . $post_name_abridged . '</span>';
    10981098        $display_link = str_replace(array('%pagename%','%postname%'), $post_name_html, $permalink);
    10991099        $view_link = str_replace(array('%pagename%','%postname%'), $post_name, $permalink);
     1100        if ( isset( $view_post ) )
     1101                $display_link = '<a href="' . $view_link . '" title="' . esc_attr( $view_post ) . '" target="_blank">' . $display_link . '</a>';
    11001102        $return =  '<strong>' . __('Permalink:') . "</strong>\n";
    11011103        $return .= '<span id="sample-permalink" tabindex="-1">' . $display_link . "</span>\n";
    11021104        $return .= '&lrm;'; // Fix bi-directional text display defect in RTL languages.
    11031105        $return .= '<span id="edit-slug-buttons"><a href="#post_name" class="edit-slug button button-tiny hide-if-no-js" onclick="editPermalink(' . $id . '); return false;">' . __('Edit') . "</a></span>\n";
    11041106        $return .= '<span id="editable-post-name-full">' . $post_name . "</span>\n";
    1105         if ( isset($view_post) )
    1106                 $return .= "<span id='view-post-btn'><a href='$view_link' class='button button-tiny'>$view_post</a></span>\n";
    11071107
    11081108        $return = apply_filters('get_sample_permalink_html', $return, $id, $new_title, $new_slug);
    11091109
  • wp-admin/js/post.js

     
    611611
    612612                makeSlugeditClickable = function() {
    613613                        $('#editable-post-name').click(function() {
    614                                 $('#edit-slug-buttons').children('.edit-slug').click();
     614                                var newSlugField = $('#new-post-slug');
     615                               
     616                                if (newSlugField.length != 0) {
     617                                        newSlugField.focus();
     618                                        return false;
     619                                }
    615620                        });
    616621                }
    617622                makeSlugeditClickable();
  • wp-admin/css/colors-fresh.css

     
    706706#media-items a.delete,
    707707#media-items a.delete-permanently,
    708708.plugins a.delete,
    709 .ui-tabs-nav a {
     709.ui-tabs-nav a,
     710#sample-permalink a:hover {
    710711        color: #21759b;
    711712}
    712713
     
    750751        background-color: #ddd;
    751752}
    752753
    753 #editable-post-name {
    754         background-color: #fffbcc;
    755 }
    756 
    757754#edit-slug-box strong,
    758755.tablenav .displaying-num,
    759756#submitted-on,
  • wp-admin/css/wp-admin.css

     
    28732873        font-size: 11px;
    28742874}
    28752875
     2876#editable-post-name {
     2877        font-weight: bold;
     2878}
     2879
     2880#sample-permalink a {
     2881        text-decoration: none;
     2882}
     2883
     2884#sample-permalink a:hover {
     2885        text-decoration: underline;
     2886}
     2887
    28762888#editable-post-name-full {
    28772889        display: none;
    28782890}
  • wp-admin/css/colors-classic.css

     
    712712#media-items a.delete,
    713713#media-items a.delete-permanently,
    714714.plugins a.delete,
    715 .ui-tabs-nav a {
     715.ui-tabs-nav a,
     716#sample-permalink a:hover {
    716717        color: #21759b;
    717718}
    718719
     
    756757        background-color: #ddd;
    757758}
    758759
    759 #editable-post-name {
    760         background-color: #fffbcc;
    761 }
    762 
    763760#edit-slug-box strong,
    764761.tablenav .displaying-num,
    765762#submitted-on,