Ticket #35095: 35095.diff
| File 35095.diff, 6.3 KB (added by , 10 years ago) |
|---|
-
wp-admin/edit-form-advanced.php
83 83 $messages = array(); 84 84 85 85 $preview_post_link_html = $scheduled_post_link_html = $view_post_link_html = ''; 86 $preview_page_link_html = $scheduled_page_link_html = $view_page_link_html = '';87 86 88 87 $preview_url = get_preview_post_link( $post ); 89 88 … … 94 93 // Preview post link. 95 94 $preview_post_link_html = sprintf( ' <a target="_blank" href="%1$s">%2$s</a>', 96 95 esc_url( $preview_url ), 97 __( 'Preview post')96 __( 'Preview ' . lcfirst( $post_type_object->labels->singular_name ) ) 98 97 ); 99 98 100 99 // Scheduled post preview link. 101 100 $scheduled_post_link_html = sprintf( ' <a target="_blank" href="%1$s">%2$s</a>', 102 101 esc_url( $permalink ), 103 __( 'Preview post')102 __( 'Preview ' . lcfirst( $post_type_object->labels->singular_name ) ) 104 103 ); 105 104 106 105 // View post link. 107 106 $view_post_link_html = sprintf( ' <a href="%1$s">%2$s</a>', 108 107 esc_url( $permalink ), 109 __( 'View post')108 __( 'View ' . lcfirst( $post_type_object->labels->singular_name ) ) 110 109 ); 111 110 112 // Preview page link.113 $preview_page_link_html = sprintf( ' <a target="_blank" href="%1$s">%2$s</a>',114 esc_url( $preview_url ),115 __( 'Preview page' )116 );117 118 // Scheduled page preview link.119 $scheduled_page_link_html = sprintf( ' <a target="_blank" href="%1$s">%2$s</a>',120 esc_url( $permalink ),121 __( 'Preview page' )122 );123 124 // View page link.125 $view_page_link_html = sprintf( ' <a href="%1$s">%2$s</a>',126 esc_url( $permalink ),127 __( 'View page' )128 );129 130 111 } 131 112 132 113 /* translators: Publish box date format, see http://php.net/date */ 133 114 $scheduled_date = date_i18n( __( 'M j, Y @ H:i' ), strtotime( $post->post_date ) ); 134 115 135 $messages[ 'post'] = array(116 $messages[ lcfirst( $post_type_object->labels->singular_name ) ] = array( 136 117 0 => '', // Unused. Messages start at index 1. 137 1 => __( 'Postupdated.' ) . $view_post_link_html,118 1 => __( $post_type_object->labels->singular_name . ' updated.' ) . $view_post_link_html, 138 119 2 => __( 'Custom field updated.' ), 139 120 3 => __( 'Custom field deleted.' ), 140 4 => __( 'Postupdated.' ),121 4 => __( $post_type_object->labels->singular_name . ' updated.' ), 141 122 /* translators: %s: date and time of the revision */ 142 5 => isset($_GET['revision']) ? sprintf( __( 'Postrestored to revision from %s.' ), wp_post_revision_title( (int) $_GET['revision'], false ) ) : false,143 6 => __( 'Postpublished.' ) . $view_post_link_html,144 7 => __( 'Postsaved.' ),145 8 => __( 'Postsubmitted.' ) . $preview_post_link_html,146 9 => sprintf( __( 'Postscheduled for: %s.' ), '<strong>' . $scheduled_date . '</strong>' ) . $scheduled_post_link_html,147 10 => __( 'Postdraft updated.' ) . $preview_post_link_html,123 5 => isset($_GET['revision']) ? sprintf( __( $post_type_object->labels->singular_name . ' restored to revision from %s.' ), wp_post_revision_title( (int) $_GET['revision'], false ) ) : false, 124 6 => __( $post_type_object->labels->singular_name . ' published.' ) . $view_post_link_html, 125 7 => __( $post_type_object->labels->singular_name . ' saved.' ), 126 8 => __( $post_type_object->labels->singular_name . ' submitted.' ) . $preview_post_link_html, 127 9 => sprintf( __( $post_type_object->labels->singular_name . ' scheduled for: %s.' ), '<strong>' . $scheduled_date . '</strong>' ) . $scheduled_post_link_html, 128 10 => __( $post_type_object->labels->singular_name . ' draft updated.' ) . $preview_post_link_html, 148 129 ); 149 $messages['page'] = array(150 0 => '', // Unused. Messages start at index 1.151 1 => __( 'Page updated.' ) . $view_page_link_html,152 2 => __( 'Custom field updated.' ),153 3 => __( 'Custom field deleted.' ),154 4 => __( 'Page updated.' ),155 /* translators: %s: date and time of the revision */156 5 => isset($_GET['revision']) ? sprintf( __( 'Page restored to revision from %s.' ), wp_post_revision_title( (int) $_GET['revision'], false ) ) : false,157 6 => __( 'Page published.' ) . $view_page_link_html,158 7 => __( 'Page saved.' ),159 8 => __( 'Page submitted.' ) . $preview_page_link_html,160 9 => sprintf( __( 'Page scheduled for: %s.' ), '<strong>' . $scheduled_date . '</strong>' ) . $scheduled_page_link_html,161 10 => __( 'Page draft updated.' ) . $preview_page_link_html,162 );163 130 $messages['attachment'] = array_fill( 1, 10, __( 'Media attachment updated.' ) ); // Hack, for now. 164 131 165 132 /** … … 176 143 $_GET['message'] = absint( $_GET['message'] ); 177 144 if ( isset($messages[$post_type][$_GET['message']]) ) 178 145 $message = $messages[$post_type][$_GET['message']]; 179 elseif ( !isset($messages[$post_type]) && isset($messages['post'][$_GET['message']]) )180 $message = $messages['post'][$_GET['message']];181 146 } 182 147 183 148 $notice = false; … … 429 394 if ( 'post' == $post_type ) { 430 395 $publish_box = '<p>' . __('Several boxes on this screen contain settings for how your content will be published, including:') . '</p>'; 431 396 $publish_box .= '<ul><li>' . 432 __( '<strong>Publish</strong> — You can set the terms of publishing your post in the Publish box. For Status, Visibility, and Publish (immediately), click on the Edit link to reveal more options. Visibility includes options for password-protecting a post or making it stay at the top of your blog indefinitely (sticky). The Password protected option allows you to set an arbitrary password for each post. The Private option hides the post from everyone except editors and administrators. Publish (immediately) allows you to set a future or past date and time, so you can schedule a post to be published in the future or backdate a post.' ) .397 __( '<strong>Publish</strong> — You can set the terms of publishing your post in the Publish box. For Status, Visibility, and Publish (immediately), click on the Edit link to reveal more options. Visibility includes options for password-protecting a post or making it stay at the top of your blog indefinitely (sticky). Publish (immediately) allows you to set a future or past date and time, so you can schedule a post to be published in the future or backdate a post. The Password protected option allows you to set an arbitrary password for each post. The Private option hides the post from everyone except editors and administrators.' ) . 433 398 '</li>'; 434 399 435 400 if ( current_theme_supports( 'post-formats' ) && post_type_supports( 'post', 'post-formats' ) ) {