Ticket #18306: 18306.9.diff

File 18306.9.diff, 4.5 KB (added by lessbloat, 8 months ago)
Line 
1Index: wp-admin/includes/post.php
2===================================================================
3--- wp-admin/includes/post.php  (revision 21914)
4+++ wp-admin/includes/post.php  (working copy)
5@@ -1069,11 +1069,11 @@
6        }
7 
8        if ( false === strpos($permalink, '%postname%') && false === strpos($permalink, '%pagename%') ) {
9+               if ( isset( $view_post ) )
10+                       $permalink = '<a href="' . $permalink . '" title="' . esc_attr( $view_post ) . '" target="_blank">' . $permalink . '</a>';
11                $return = '<strong>' . __('Permalink:') . "</strong>\n" . '<span id="sample-permalink" tabindex="-1">' . $permalink . "</span>\n";
12                if ( '' == get_option( 'permalink_structure' ) && current_user_can( 'manage_options' ) && !( 'page' == get_option('show_on_front') && $id == get_option('page_on_front') ) )
13                        $return .= '<span id="change-permalinks"><a href="options-permalink.php" class="button button-tiny" target="_blank">' . __('Change Permalinks') . "</a></span>\n";
14-               if ( isset($view_post) )
15-                       $return .= "<span id='view-post-btn'><a href='$permalink' class='button button-tiny'>$view_post</a></span>\n";
16 
17                $return = apply_filters('get_sample_permalink_html', $return, $id, $new_title, $new_slug);
18 
19@@ -1094,16 +1094,16 @@
20                }
21        }
22 
23-       $post_name_html = '<span id="editable-post-name" title="' . $title . '">' . $post_name_abridged . '</span>';
24+       $post_name_html = '<span id="editable-post-name">' . $post_name_abridged . '</span>';
25        $display_link = str_replace(array('%pagename%','%postname%'), $post_name_html, $permalink);
26        $view_link = str_replace(array('%pagename%','%postname%'), $post_name, $permalink);
27+       if ( isset( $view_post ) )
28+               $display_link = '<a href="' . $view_link . '" title="' . esc_attr( $view_post ) . '" target="_blank">' . $display_link . '</a>';
29        $return =  '<strong>' . __('Permalink:') . "</strong>\n";
30        $return .= '<span id="sample-permalink" tabindex="-1">' . $display_link . "</span>\n";
31        $return .= '&lrm;'; // Fix bi-directional text display defect in RTL languages.
32        $return .= '<span id="edit-slug-buttons"><a href="#post_name" class="edit-slug button button-tiny hide-if-no-js" onclick="editPermalink(' . $id . '); return false;">' . __('Edit') . "</a></span>\n";
33        $return .= '<span id="editable-post-name-full">' . $post_name . "</span>\n";
34-       if ( isset($view_post) )
35-               $return .= "<span id='view-post-btn'><a href='$view_link' class='button button-tiny'>$view_post</a></span>\n";
36 
37        $return = apply_filters('get_sample_permalink_html', $return, $id, $new_title, $new_slug);
38 
39Index: wp-admin/js/post.js
40===================================================================
41--- wp-admin/js/post.js (revision 21914)
42+++ wp-admin/js/post.js (working copy)
43@@ -611,7 +611,12 @@
44 
45                makeSlugeditClickable = function() {
46                        $('#editable-post-name').click(function() {
47-                               $('#edit-slug-buttons').children('.edit-slug').click();
48+                               var newSlugField = $('#new-post-slug');
49+                               
50+                               if (newSlugField.length != 0) {
51+                                       newSlugField.focus();
52+                                       return false;
53+                               }
54                        });
55                }
56                makeSlugeditClickable();
57Index: wp-admin/css/colors-fresh.css
58===================================================================
59--- wp-admin/css/colors-fresh.css       (revision 21914)
60+++ wp-admin/css/colors-fresh.css       (working copy)
61@@ -706,7 +706,8 @@
62 #media-items a.delete,
63 #media-items a.delete-permanently,
64 .plugins a.delete,
65-.ui-tabs-nav a {
66+.ui-tabs-nav a,
67+#sample-permalink a:hover {
68        color: #21759b;
69 }
70 
71@@ -750,10 +751,6 @@
72        background-color: #ddd;
73 }
74 
75-#editable-post-name {
76-       background-color: #fffbcc;
77-}
78-
79 #edit-slug-box strong,
80 .tablenav .displaying-num,
81 #submitted-on,
82Index: wp-admin/css/wp-admin.css
83===================================================================
84--- wp-admin/css/wp-admin.css   (revision 21914)
85+++ wp-admin/css/wp-admin.css   (working copy)
86@@ -2873,6 +2873,18 @@
87        font-size: 11px;
88 }
89 
90+#editable-post-name {
91+       font-weight: bold;
92+}
93+
94+#sample-permalink a {
95+       text-decoration: none;
96+}
97+
98+#sample-permalink a:hover {
99+       text-decoration: underline;
100+}
101+
102 #editable-post-name-full {
103        display: none;
104 }
105Index: wp-admin/css/colors-classic.css
106===================================================================
107--- wp-admin/css/colors-classic.css     (revision 21914)
108+++ wp-admin/css/colors-classic.css     (working copy)
109@@ -712,7 +712,8 @@
110 #media-items a.delete,
111 #media-items a.delete-permanently,
112 .plugins a.delete,
113-.ui-tabs-nav a {
114+.ui-tabs-nav a,
115+#sample-permalink a:hover {
116        color: #21759b;
117 }
118 
119@@ -756,10 +757,6 @@
120        background-color: #ddd;
121 }
122 
123-#editable-post-name {
124-       background-color: #fffbcc;
125-}
126-
127 #edit-slug-box strong,
128 .tablenav .displaying-num,
129 #submitted-on,