Make WordPress Core

Ticket #18306: 18306.4.diff

File 18306.4.diff, 3.5 KB (added by nacin, 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

     
    610610                makeSlugeditClickable = function() {
    611611                        $('#editable-post-name').click(function() {
    612612                                $('#edit-slug-buttons').children('.edit-slug').click();
     613                                return false;
    613614                        });
    614615                }
    615616                makeSlugeditClickable();
  • wp-admin/css/wp-admin.dev.css

     
    28142814        padding: 0 10px;
    28152815}
    28162816
     2817#sample-permalink a {
     2818        text-decoration: none;
     2819}
     2820
    28172821#editable-post-name-full {
    28182822        display: none;
    28192823}
  • wp-admin/css/colors-fresh.dev.css

     
    311311.howto,
    312312.nonessential,
    313313#edit-slug-box,
     314#editable-post-name,
    314315.form-input-tip,
    315316.subsubsub {
    316317        color: #666;