diff --git a/wp-admin/edit-form-advanced.php b/wp-admin/edit-form-advanced.php
index a4127fae4a..25345e41c1 100644
--- a/wp-admin/edit-form-advanced.php
+++ b/wp-admin/edit-form-advanced.php
@@ -35,35 +35,37 @@ $action = isset($action) ? $action : '';
$messages = array();
$messages['post'] = array(
- '',
- sprintf( __('Post updated. View post'), esc_url( get_permalink($post_ID) ) ),
- __('Custom field updated.'),
- __('Custom field deleted.'),
- __('Post updated.'),
+ 0 => '', // Unused. Messages start at index 1.
+ 1 => sprintf( __('Post updated. View post'), esc_url( get_permalink($post_ID) ) ),
+ 2 => __('Custom field updated.'),
+ 3 => __('Custom field deleted.'),
+ 4 => __('Post updated.'),
/* translators: %s: date and time of the revision */
- isset($_GET['revision']) ? sprintf( __('Post restored to revision from %s'), wp_post_revision_title( (int) $_GET['revision'], false ) ) : false,
- sprintf( __('Post published. View post'), esc_url( get_permalink($post_ID) ) ),
- __('Post saved.'),
- sprintf( __('Post submitted. Preview post'), esc_url( add_query_arg( 'preview', 'true', get_permalink($post_ID) ) ) ),
- sprintf( __('Post scheduled for: %1$s. Preview post'),
+ 5 => isset($_GET['revision']) ? sprintf( __('Post restored to revision from %s'), wp_post_revision_title( (int) $_GET['revision'], false ) ) : false,
+ 6 => sprintf( __('Post published. View post'), esc_url( get_permalink($post_ID) ) ),
+ 7 => __('Post saved.'),
+ 8 => sprintf( __('Post submitted. Preview post'), esc_url( add_query_arg( 'preview', 'true', get_permalink($post_ID) ) ) ),
+ 9 => sprintf( __('Post scheduled for: %1$s. Preview post'),
// translators: Publish box date format, see http://php.net/date
date_i18n( __( 'M j, Y @ G:i' ), strtotime( $post->post_date ) ), esc_url( get_permalink($post_ID) ) ),
- sprintf( __('Post draft updated. Preview post'), esc_url( add_query_arg( 'preview', 'true', get_permalink($post_ID) ) ) ),
+ 10 => sprintf( __('Post draft updated. Preview post'), esc_url( add_query_arg( 'preview', 'true', get_permalink($post_ID) ) ) ),
);
$messages['page'] = array(
- '',
- sprintf( __('Page updated. View page'), esc_url( get_permalink($post_ID) ) ),
- __('Custom field updated.'),
- __('Custom field deleted.'),
- __('Page updated.'),
- isset($_GET['revision']) ? sprintf( __('Page restored to revision from %s'), wp_post_revision_title( (int) $_GET['revision'], false ) ) : false,
- sprintf( __('Page published. View page'), esc_url( get_permalink($post_ID) ) ),
- __('Page saved.'),
- sprintf( __('Page submitted. Preview page'), esc_url( add_query_arg( 'preview', 'true', get_permalink($post_ID) ) ) ),
- sprintf( __('Page scheduled for: %1$s. Preview page'), date_i18n( __( 'M j, Y @ G:i' ), strtotime( $post->post_date ) ), esc_url( get_permalink($post_ID) ) ),
- sprintf( __('Page draft updated. Preview page'), esc_url( add_query_arg( 'preview', 'true', get_permalink($post_ID) ) ) ),
+ 0 => '', // Unused. Messages start at index 1.
+ 1 => sprintf( __('Page updated. View page'), esc_url( get_permalink($post_ID) ) ),
+ 2 => __('Custom field updated.'),
+ 3 => __('Custom field deleted.'),
+ 4 => __('Page updated.'),
+ 5 => isset($_GET['revision']) ? sprintf( __('Page restored to revision from %s'), wp_post_revision_title( (int) $_GET['revision'], false ) ) : false,
+ 6 => sprintf( __('Page published. View page'), esc_url( get_permalink($post_ID) ) ),
+ 7 => __('Page saved.'),
+ 8 => sprintf( __('Page submitted. Preview page'), esc_url( add_query_arg( 'preview', 'true', get_permalink($post_ID) ) ) ),
+ 9 => sprintf( __('Page scheduled for: %1$s. Preview page'), date_i18n( __( 'M j, Y @ G:i' ), strtotime( $post->post_date ) ), esc_url( get_permalink($post_ID) ) ),
+ 10 => sprintf( __('Page draft updated. Preview page'), esc_url( add_query_arg( 'preview', 'true', get_permalink($post_ID) ) ) ),
);
+$messages = apply_filters( 'post_updated_messages', $messages );
+
$message = false;
if ( isset($_GET['message']) ) {
$_GET['message'] = absint( $_GET['message'] );