WordPress.org

Make WordPress Core

Ticket #18306: 18306.7.diff

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

     
    10911091        }
    10921092
    10931093        if ( false === strpos($permalink, '%postname%') && false === strpos($permalink, '%pagename%') ) {
     1094                if ( isset( $view_post ) )
     1095                        $permalink = '<a href="' . $permalink . '" title="' . esc_attr( $view_post ) . '" target="_blank">' . $permalink . '</a>';
    10941096                $return = '<strong>' . __('Permalink:') . "</strong>\n" . '<span id="sample-permalink" tabindex="-1">' . $permalink . "</span>\n";
    10951097                if ( '' == get_option( 'permalink_structure' ) && current_user_can( 'manage_options' ) && !( 'page' == get_option('show_on_front') && $id == get_option('page_on_front') ) )
    10961098                        $return .= '<span id="change-permalinks"><a href="options-permalink.php" class="button" target="_blank">' . __('Change Permalinks') . "</a></span>\n";
    1097                 if ( isset($view_post) )
    1098                         $return .= "<span id='view-post-btn'><a href='$permalink' class='button'>$view_post</a></span>\n";
    10991099
    11001100                $return = apply_filters('get_sample_permalink_html', $return, $id, $new_title, $new_slug);
    11011101
     
    11161116                }
    11171117        }
    11181118
    1119         $post_name_html = '<span id="editable-post-name" title="' . $title . '">' . $post_name_abridged . '</span>';
     1119        $post_name_html = '<span id="editable-post-name">' . $post_name_abridged . '</span>';
    11201120        $display_link = str_replace(array('%pagename%','%postname%'), $post_name_html, $permalink);
    11211121        $view_link = str_replace(array('%pagename%','%postname%'), $post_name, $permalink);
     1122        if ( isset( $view_post ) )
     1123                $display_link = '<a href="' . $view_link . '" title="' . esc_attr( $view_post ) . '" target="_blank">' . $display_link . '</a>';
    11221124        $return =  '<strong>' . __('Permalink:') . "</strong>\n";
    11231125        $return .= '<span id="sample-permalink" tabindex="-1">' . $display_link . "</span>\n";
    11241126        $return .= '&lrm;'; // Fix bi-directional text display defect in RTL languages.
    11251127        $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";
    11261128        $return .= '<span id="editable-post-name-full">' . $post_name . "</span>\n";
    1127         if ( isset($view_post) )
    1128                 $return .= "<span id='view-post-btn'><a href='$view_link' class='button'>$view_post</a></span>\n";
    11291129
    11301130        $return = apply_filters('get_sample_permalink_html', $return, $id, $new_title, $new_slug);
    11311131
  • wp-admin/js/post.dev.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/wp-admin.dev.css

     
    29322932        padding: 0 10px;
    29332933}
    29342934
     2935#sample-permalink a {
     2936        text-decoration: none;
     2937}
     2938
     2939#sample-permalink a:hover {
     2940        text-decoration: underline;
     2941}
     2942
    29352943#editable-post-name-full {
    29362944        display: none;
    29372945}
  • wp-admin/css/colors-classic.dev.css

     
    590590#media-upload a.del-link,
    591591#media-items a.delete,
    592592.plugins a.delete,
    593 .ui-tabs-nav a {
     593.ui-tabs-nav a,
     594#sample-permalink a:hover {
    594595        color: #21759b;
    595596}
    596597
     
    646647        background-image: linear-gradient(bottom, #e5f0f8, #fff); /* proposed W3C Markup */
    647648}
    648649
    649 #editable-post-name {
    650         background-color: #fffbcc;
    651 }
    652 
    653650#edit-slug-box strong,
    654651.tablenav .displaying-num,
    655652#submitted-on,
  • wp-admin/css/colors-fresh.dev.css

     
    581581#media-upload a.del-link,
    582582#media-items a.delete,
    583583.plugins a.delete,
    584 .ui-tabs-nav a {
     584.ui-tabs-nav a,
     585#sample-permalink a:hover {
    585586        color: #21759b;
    586587}
    587588
     
    627628        background-color: #ddd;
    628629}
    629630
    630 #editable-post-name {
    631         background-color: #fffbcc;
    632 }
    633 
    634631#edit-slug-box strong,
    635632.tablenav .displaying-num,
    636633#submitted-on,