WordPress.org

Make WordPress Core

Ticket #18306: 18306.8.diff

File 18306.8.diff, 4.5 KB (added by SergeyBiryukov, 6 years ago)

Refreshed after [21592]

  • wp-admin/css/colors-classic.css

     
    639639#media-items a.delete,
    640640#media-items a.delete-permanently,
    641641.plugins a.delete,
    642 .ui-tabs-nav a {
     642.ui-tabs-nav a,
     643#sample-permalink a:hover {
    643644        color: #21759b;
    644645}
    645646
     
    683684        background-color: #ddd;
    684685}
    685686
    686 #editable-post-name {
    687         background-color: #fffbcc;
    688 }
    689 
    690687#edit-slug-box strong,
    691688.tablenav .displaying-num,
    692689#submitted-on,
  • wp-admin/css/colors-fresh.css

     
    630630#media-items a.delete,
    631631#media-items a.delete-permanently,
    632632.plugins a.delete,
    633 .ui-tabs-nav a {
     633.ui-tabs-nav a,
     634#sample-permalink a:hover {
    634635        color: #21759b;
    635636}
    636637
     
    674675        background-color: #ddd;
    675676}
    676677
    677 #editable-post-name {
    678         background-color: #fffbcc;
    679 }
    680 
    681678#edit-slug-box strong,
    682679.tablenav .displaying-num,
    683680#submitted-on,
  • wp-admin/css/wp-admin.css

     
    28552855        padding: 0 10px;
    28562856}
    28572857
     2858#sample-permalink a {
     2859        text-decoration: none;
     2860}
     2861
     2862#sample-permalink a:hover {
     2863        text-decoration: underline;
     2864}
     2865
    28582866#editable-post-name-full {
    28592867        display: none;
    28602868}
  • wp-admin/includes/post.php

     
    10921092        }
    10931093
    10941094        if ( false === strpos($permalink, '%postname%') && false === strpos($permalink, '%pagename%') ) {
     1095                if ( isset( $view_post ) )
     1096                        $permalink = '<a href="' . $permalink . '" title="' . esc_attr( $view_post ) . '" target="_blank">' . $permalink . '</a>';
    10951097                $return = '<strong>' . __('Permalink:') . "</strong>\n" . '<span id="sample-permalink" tabindex="-1">' . $permalink . "</span>\n";
    10961098                if ( '' == get_option( 'permalink_structure' ) && current_user_can( 'manage_options' ) && !( 'page' == get_option('show_on_front') && $id == get_option('page_on_front') ) )
    10971099                        $return .= '<span id="change-permalinks"><a href="options-permalink.php" class="button" target="_blank">' . __('Change Permalinks') . "</a></span>\n";
    1098                 if ( isset($view_post) )
    1099                         $return .= "<span id='view-post-btn'><a href='$permalink' class='button'>$view_post</a></span>\n";
    11001100
    11011101                $return = apply_filters('get_sample_permalink_html', $return, $id, $new_title, $new_slug);
    11021102
     
    11171117                }
    11181118        }
    11191119
    1120         $post_name_html = '<span id="editable-post-name" title="' . $title . '">' . $post_name_abridged . '</span>';
     1120        $post_name_html = '<span id="editable-post-name">' . $post_name_abridged . '</span>';
    11211121        $display_link = str_replace(array('%pagename%','%postname%'), $post_name_html, $permalink);
    11221122        $view_link = str_replace(array('%pagename%','%postname%'), $post_name, $permalink);
     1123        if ( isset( $view_post ) )
     1124                $display_link = '<a href="' . $view_link . '" title="' . esc_attr( $view_post ) . '" target="_blank">' . $display_link . '</a>';
    11231125        $return =  '<strong>' . __('Permalink:') . "</strong>\n";
    11241126        $return .= '<span id="sample-permalink" tabindex="-1">' . $display_link . "</span>\n";
    11251127        $return .= '&lrm;'; // Fix bi-directional text display defect in RTL languages.
    11261128        $return .= '<span id="edit-slug-buttons"><a href="#post_name" class="edit-slug button hide-if-no-js" onclick="editPermalink(' . $id . '); return false;">' . __('Edit') . "</a></span>\n";
    11271129        $return .= '<span id="editable-post-name-full">' . $post_name . "</span>\n";
    1128         if ( isset($view_post) )
    1129                 $return .= "<span id='view-post-btn'><a href='$view_link' class='button'>$view_post</a></span>\n";
    11301130
    11311131        $return = apply_filters('get_sample_permalink_html', $return, $id, $new_title, $new_slug);
    11321132
  • 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();