post_updated_messages
最后更新于:2021-11-27 18:02:20
apply_filters( ‘post_updated_messages’, array[] $messages )
Filters the post updated messages.
参数
- $messages
-
(array[])
Post updated messages. For defaults see$messages
declarations above.
源文件
文件: gc-admin/edit-form-advanced.php
$messages['post'] = array( 0 => '', // Unused. Messages start at index 1. 1 => __( 'Post updated.' ) . $view_post_link_html, 2 => __( 'Custom field updated.' ), 3 => __( 'Custom field deleted.' ), 4 => __( 'Post updated.' ), /* translators: %s: date and time of the revision */ 5 => isset( $_GET['revision'] ) ? sprintf( __( 'Post restored to revision from %s.' ), gc_post_revision_title( (int) $_GET['revision'], false ) ) : false, 6 => __( 'Post published.' ) . $view_post_link_html, 7 => __( 'Post saved.' ), 8 => __( 'Post submitted.' ) . $preview_post_link_html, 9 => sprintf( __( 'Post scheduled for: %s.' ), '<strong>' . $scheduled_date . '</strong>' ) . $scheduled_post_link_html, 10 => __( 'Post draft updated.' ) . $preview_post_link_html, ); $messages['page'] = array( 0 => '', // Unused. Messages start at index 1. 1 => __( 'Page updated.' ) . $view_page_link_html, 2 => __( 'Custom field updated.' ), 3 => __( 'Custom field deleted.' ), 4 => __( 'Page updated.' ), /* translators: %s: date and time of the revision */ 5 => isset( $_GET['revision'] ) ? sprintf( __( 'Page restored to revision from %s.' ), gc_post_revision_title( (int) $_GET['revision'], false ) ) : false, 6 => __( 'Page published.' ) . $view_page_link_html, 7 => __( 'Page saved.' ), 8 => __( 'Page submitted.' ) . $preview_page_link_html, 9 => sprintf( __( 'Page scheduled for: %s.' ), '<strong>' . $scheduled_date . '</strong>' ) . $scheduled_page_link_html, 10 => __( 'Page draft updated.' ) . $preview_page_link_html, ); $messages['attachment'] = array_fill( 1, 10, __( 'Media file updated.' ) ); // Hack, for now.