BBP_Replies_Admin::updated_messages( array $messages )
Custom user feedback messages for reply post type
Description Description
Parameters Parameters
- $messages
-
(Required)
Return Return
(array)
Source Source
File: includes/admin/replies.php
public function updated_messages( $messages ) { global $post_ID; // URL for the current topic $topic_url = bbp_get_topic_permalink( bbp_get_reply_topic_id( $post_ID ) ); // Current reply's post_date $post_date = bbp_get_global_post_field( 'post_date', 'raw' ); // Messages array $messages[ $this->post_type ] = array( 0 => '', // Left empty on purpose // Updated 1 => sprintf( '%1$s <a href="%2$s">%3$s</a>', esc_html__( 'Reply updated.', 'bbpress' ), $topic_url, esc_html__( 'View topic', 'bbpress' ) ), // Custom field updated 2 => esc_html__( 'Custom field updated.', 'bbpress' ), // Custom field deleted 3 => esc_html__( 'Custom field deleted.', 'bbpress' ), // Reply updated 4 => esc_html__( 'Reply updated.', 'bbpress' ), // Restored from revision // translators: %s: date and time of the revision 5 => isset( $_GET['revision'] ) ? sprintf( esc_html__( 'Reply restored to revision from %s', 'bbpress' ), wp_post_revision_title( (int) $_GET['revision'], false ) ) : false, // Reply created 6 => sprintf( '%1$s <a href="%2$s">%3$s</a>', esc_html__( 'Reply created.', 'bbpress' ), $topic_url, esc_html__( 'View topic', 'bbpress' ) ), // Reply saved 7 => esc_html__( 'Reply saved.', 'bbpress' ), // Reply submitted 8 => sprintf( '%1$s <a href="%2$s" target="_blank">%3$s</a>', esc_html__( 'Reply submitted.', 'bbpress' ), esc_url( add_query_arg( 'preview', 'true', $topic_url ) ), esc_html__( 'Preview topic', 'bbpress' ) ), // Reply scheduled 9 => sprintf( '%1$s <a target="_blank" href="%2$s">%3$s</a>', sprintf( esc_html__( 'Reply scheduled for: %s.', 'bbpress' ), // translators: Publish box date format, see http://php.net/date '<strong>' . date_i18n( __( 'M j, Y @ G:i', 'bbpress' ), strtotime( $post_date ) ) . '</strong>' ), $topic_url, esc_html__( 'Preview topic', 'bbpress' ) ), // Reply draft updated 10 => sprintf( '%1$s <a href="%2$s" target="_blank">%3$s</a>', esc_html__( 'Reply draft updated.', 'bbpress' ), esc_url( add_query_arg( 'preview', 'true', $topic_url ) ), esc_html__( 'Preview topic', 'bbpress' ) ), ); return $messages; }
Changelog Changelog
Version | Description |
---|---|
2.0.0 | Introduced. |