WordPress.org

Make WordPress Core

Ticket #18306: 18306.6.diff

File 18306.6.diff, 4.4 KB (added by sabreuse, 3 years ago)
  • wp-admin/js/post.dev.js

     
    612612                makeSlugeditClickable = function() { 
    613613                        $('#editable-post-name').click(function() { 
    614614                                $('#edit-slug-buttons').children('.edit-slug').click(); 
     615                                return false; 
    615616                        }); 
    616617                } 
    617618                makeSlugeditClickable(); 
  • 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/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} 
    29382946 
     2947#editable-post-name:hover { 
     2948        cursor: text; 
     2949} 
     2950 
    29392951#editable-post-name input { 
    29402952        width: 16em; 
    29412953} 
  • wp-admin/css/colors-fresh.dev.css

     
    317317.howto, 
    318318.nonessential, 
    319319#edit-slug-box, 
     320#editable-post-name, 
    320321.form-input-tip, 
    321322.subsubsub { 
    322323        color: #666; 
     
    581582#media-upload a.del-link, 
    582583#media-items a.delete, 
    583584.plugins a.delete, 
    584 .ui-tabs-nav a { 
     585.ui-tabs-nav a, 
     586#sample-permalink a:hover { 
    585587        color: #21759b; 
    586588} 
    587589 
  • wp-admin/css/colors-classic.dev.css

     
    326326.howto, 
    327327.nonessential, 
    328328#edit-slug-box, 
     329#editable-post-name, 
    329330.form-input-tip, 
    330331.subsubsub { 
    331332        color: #666; 
     
    590591#media-upload a.del-link, 
    591592#media-items a.delete, 
    592593.plugins a.delete, 
    593 .ui-tabs-nav a { 
     594.ui-tabs-nav a, 
     595#sample-permalink a:hover { 
    594596        color: #21759b; 
    595597} 
    596598