BBP_Forums_Admin::updated_messages( array $messages )
Custom user feedback messages for forum post type
Description Description
Parameters Parameters
- $messages
-
(Required)
Return Return
(array)
Source Source
File: includes/admin/forums.php
public function updated_messages( $messages ) { global $post_ID; // URL for the current forum $forum_url = bbp_get_forum_permalink( $post_ID ); // Current forum'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__( 'Forum updated.', 'bbpress' ), $forum_url, esc_html__( 'View forum', 'bbpress' ) ), // Custom field updated 2 => esc_html__( 'Custom field updated.', 'bbpress' ), // Custom field deleted 3 => esc_html__( 'Custom field deleted.', 'bbpress' ), // Forum updated 4 => esc_html__( 'Forum updated.', 'bbpress' ), // Restored from revision // translators: %s: date and time of the revision 5 => isset( $_GET['revision'] ) ? sprintf( esc_html__( 'Forum restored to revision from %s', 'bbpress' ), wp_post_revision_title( (int) $_GET['revision'], false ) ) : false, // Forum created 6 => sprintf( '%1$s <a href="%2$s">%3$s</a>', esc_html__( 'Forum created.', 'bbpress' ), $forum_url, esc_html__( 'View forum', 'bbpress' ) ), // Forum saved 7 => esc_html__( 'Forum saved.', 'bbpress' ), // Forum submitted 8 => sprintf( '%1$s <a href="%2$s" target="_blank">%3$s</a>', esc_html__( 'Forum submitted.', 'bbpress' ), esc_url( add_query_arg( 'preview', 'true', $forum_url ) ), esc_html__( 'Preview forum', 'bbpress' ) ), // Forum scheduled 9 => sprintf( '%1$s <a target="_blank" href="%2$s">%3$s</a>', sprintf( esc_html__( 'Forum 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>' ), $forum_url, __( 'Preview forum', 'bbpress' ) ), // Forum draft updated 10 => sprintf( '%1$s <a href="%2$s" target="_blank">%3$s</a>', esc_html__( 'Forum draft updated.', 'bbpress' ), esc_url( add_query_arg( 'preview', 'true', $forum_url ) ), esc_html__( 'Preview forum', 'bbpress' ) ), ); return $messages; }
Changelog Changelog
Version | Description |
---|---|
2.0.0 | Introduced. |