apply_filters( ‘post_updated_messages’, array[] $messages )

Filters the post updated messages.

Parameters

$messagesarray[]
Post updated messages. For defaults see $messages declarations above.

Source

$messages = apply_filters( 'post_updated_messages', $messages );

Changelog

VersionDescription
3.0.0Introduced.

User Contributed Notes

  1. Skip to note 2 content

    This is the $messages declaration mentioned in the notes above:

    $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.' ), wp_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.' ), wp_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.

You must log in before being able to contribute a note or feedback.