Make WordPress Core

Ticket #18306: 18306.5.diff

File 18306.5.diff, 4.4 KB (added by helenyhou, 13 years ago)
  • wp-admin/includes/post.php

     
    10891089        }
    10901090
    10911091        if ( false === strpos($permalink, '%postname%') && false === strpos($permalink, '%pagename%') ) {
     1092                if ( isset( $view_post ) )
     1093                        $permalink = '<a href="' . $permalink . '" title="' . esc_attr( $view_post ) . '" target="_blank">' . $permalink . '</a>';
    10921094                $return = '<strong>' . __('Permalink:') . "</strong>\n" . '<span id="sample-permalink">' . $permalink . "</span>\n";
    10931095                if ( '' == get_option( 'permalink_structure' ) && current_user_can( 'manage_options' ) && !( 'page' == get_option('show_on_front') && $id == get_option('page_on_front') ) )
    10941096                        $return .= '<span id="change-permalinks"><a href="options-permalink.php" class="button" target="_blank">' . __('Change Permalinks') . "</a></span>\n";
    1095                 if ( isset($view_post) )
    1096                         $return .= "<span id='view-post-btn'><a href='$permalink' class='button' target='_blank'>$view_post</a></span>\n";
    10971097
    10981098                $return = apply_filters('get_sample_permalink_html', $return, $id, $new_title, $new_slug);
    10991099
     
    11141114                }
    11151115        }
    11161116
    1117         $post_name_html = '<span id="editable-post-name" title="' . $title . '">' . $post_name_abridged . '</span>';
     1117        $post_name_html = '<span id="editable-post-name">' . $post_name_abridged . '</span>';
    11181118        $display_link = str_replace(array('%pagename%','%postname%'), $post_name_html, $permalink);
    11191119        $view_link = str_replace(array('%pagename%','%postname%'), $post_name, $permalink);
     1120        if ( isset( $view_post ) )
     1121                $display_link = '<a href="' . $view_link . '" title="' . esc_attr( $view_post ) . '" target="_blank">' . $display_link . '</a>';
    11201122        $return =  '<strong>' . __('Permalink:') . "</strong>\n";
    11211123        $return .= '<span id="sample-permalink">' . $display_link . "</span>\n";
    11221124        $return .= '&lrm;'; // Fix bi-directional text display defect in RTL languages.
    11231125        $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";
    11241126        $return .= '<span id="editable-post-name-full">' . $post_name . "</span>\n";
    1125         if ( isset($view_post) )
    1126                 $return .= "<span id='view-post-btn'><a href='$view_link' class='button' target='_blank'>$view_post</a></span>\n";
    11271127
    11281128        $return = apply_filters('get_sample_permalink_html', $return, $id, $new_title, $new_slug);
    11291129
  • 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/css/wp-admin.dev.css

     
    28142814        padding: 0 10px;
    28152815}
    28162816
     2817#sample-permalink a {
     2818        text-decoration: none;
     2819}
     2820
     2821#sample-permalink a:hover {
     2822        text-decoration: underline;
     2823}
     2824
    28172825#editable-post-name-full {
    28182826        display: none;
    28192827}
    28202828
     2829#editable-post-name:hover {
     2830        cursor: text;
     2831}
     2832
    28212833#editable-post-name input {
    28222834        width: 16em;
    28232835}
  • wp-admin/css/colors-classic.dev.css

     
    305305.howto,
    306306.nonessential,
    307307#edit-slug-box,
     308#editable-post-name,
    308309.form-input-tip,
    309310.subsubsub {
    310311        color: #666;
     
    560561#media-upload a.del-link,
    561562#media-items a.delete,
    562563.plugins a.delete,
    563 .ui-tabs-nav a {
     564.ui-tabs-nav a,
     565#sample-permalink a:hover {
    564566        color: #21759b;
    565567}
    566568
  • wp-admin/css/colors-fresh.dev.css

     
    312312.howto,
    313313.nonessential,
    314314#edit-slug-box,
     315#editable-post-name,
    315316.form-input-tip,
    316317.subsubsub {
    317318        color: #666;
     
    567568#media-upload a.del-link,
    568569#media-items a.delete,
    569570.plugins a.delete,
    570 .ui-tabs-nav a {
     571.ui-tabs-nav a,
     572#sample-permalink a:hover {
    571573        color: #21759b;
    572574}
    573575