| 97 | | // Scheduled preview link. |
| 98 | | $scheduled_link_html = sprintf( ' <a target="_blank" href="%s">%s</a>', |
| 99 | | esc_url( $permalink ), |
| 100 | | __( 'Preview post' ) |
| | 90 | if ( $viewable ) { |
| | 91 | $messages['post'] = array( |
| | 92 | 1 => sprintf( __( 'Post updated. <a href="%s">View post</a>' ), esc_url( $permalink ) ), |
| | 93 | 2 => __( 'Custom field updated.' ), |
| | 94 | 3 => __( 'Custom field deleted.' ), |
| | 95 | 4 => __( 'Post updated.' ), |
| | 96 | /* translators: %s: date and time of the revision */ |
| | 97 | 5 => isset($_GET['revision']) ? sprintf( __( 'Post restored to revision from %s' ), wp_post_revision_title( (int) $_GET['revision'], false ) ) : false, |
| | 98 | 6 => sprintf( __( 'Post published. <a href="%s">View post</a>' ), esc_url( $permalink ) ), |
| | 99 | 7 => __( 'Post saved.' ), |
| | 100 | 8 => sprintf( __( 'Post submitted. <a target="_blank" href="%s">Preview post</a>' ), esc_url( $post_preview_url ) ), |
| | 101 | 9 => sprintf( __( 'Post scheduled for: <strong>%1$s</strong>. <a target="_blank" href="%2$s">Preview post</a>' ), $scheduled_date, esc_url( $permalink ) ), |
| | 102 | 10 => sprintf( __( 'Post draft updated. <a target="_blank" href="%s">Preview post</a>' ), esc_url( $post_preview_url ) ), |
| 102 | | |
| 103 | | // View post link. |
| 104 | | $view_post_html = sprintf( ' <a href="%s">%s</a>', |
| 105 | | esc_url( $permalink ), |
| 106 | | __( 'View post' ) |
| | 104 | } else { |
| | 105 | $messages['post'] = array( |
| | 106 | 1 => __( 'Post updated.' ), |
| | 107 | 2 => __( 'Custom field updated.' ), |
| | 108 | 3 => __( 'Custom field deleted.' ), |
| | 109 | 4 => __( 'Post updated.' ), |
| | 110 | /* translators: %s: date and time of the revision */ |
| | 111 | 5 => isset($_GET['revision']) ? sprintf( __( 'Post restored to revision from %s' ), wp_post_revision_title( (int) $_GET['revision'], false ) ) : false, |
| | 112 | 6 => __( 'Post published.' ), |
| | 113 | 7 => __( 'Post saved.' ), |
| | 114 | 8 => __( 'Post submitted.' ), |
| | 115 | 9 => sprintf( __( 'Post scheduled for: <strong>%1$s</strong>.' ), $scheduled_date ), |
| | 116 | 10 => __( 'Post draft updated.' ), |
| 110 | | /* translators: Publish box date format, see http://php.net/date */ |
| 111 | | $scheduled_date = date_i18n( __( 'M j, Y @ H:i' ), strtotime( $post->post_date ) ); |
| 112 | | $messages['post'] = array( |
| 113 | | 0 => '', // Unused. Messages start at index 1. |
| 114 | | 1 => __( 'Post updated.' ) . $view_post_html, |
| 115 | | 2 => __('Custom field updated.'), |
| 116 | | 3 => __('Custom field deleted.'), |
| 117 | | 4 => __('Post updated.'), |
| 118 | | /* translators: %s: date and time of the revision */ |
| 119 | | 5 => isset($_GET['revision']) ? sprintf( __('Post restored to revision from %s'), wp_post_revision_title( (int) $_GET['revision'], false ) ) : false, |
| 120 | | 6 => __( 'Post published.' ) . $view_post_html, |
| 121 | | 7 => __('Post saved.'), |
| 122 | | 8 => __( 'Post submitted.' ) . $preview_link_html, |
| 123 | | 9 => sprintf( __( 'Post scheduled for: <strong>%1$s</strong>' ), $scheduled_date ) . $scheduled_link_html, |
| 124 | | 10 => __( 'Post draft updated.' ) . $preview_link_html, |
| 125 | | ); |
| 126 | | |