By default, WordPress uses messages of normal posts for the custom post types. We need to provide our own custom messages to improve the user experience. Customization of messages can be done with the existing filter called post_updated_messages. First, we have to update the constructor of the WPWAF_Model_Topic class with the following filter hook:
add_filter('post_updated_messages', array($this,'generate_topic_messages'));
This filter enables us to add new messages to the existing messages array, as well as alternating the existing messages to suit our requirements. This is another section with duplicate codes, and hence, we will be using a common function to display the messages for all post types. ...