lib/Post_Type_Labels.php
public function add_post_updated_messages( $messages ) {
		global $post_id;

		$preview_url = get_preview_post_link( $post_id );
		$permalink   = get_permalink( $post_id );

		// Preview post link.
		$preview_post_link_html = is_post_type_viewable( $this->post_type )
			? sprintf( ' <a target="_blank" href="%1$s">%2$s</a>',
				esc_url( $preview_url ),
				/* translators: %s: Singular post type name */
				sprintf( __( 'Preview %s', 'mind/types' ), $this->name_singular )
			)
			: '';

		// View post link.
		$view_post_link_html = is_post_type_viewable( $this->post_type )
			? sprintf( ' <a href="%1$s">%2$s</a>',
				esc_url( $permalink ),
				/* translators: %s: Singular post type name */
				sprintf( __( 'View %s', 'mind/types' ), $this->name_singular )
			)
			: '';

		/**
		 * Message indices 2, 3, 5 and 9 are not handled, because they are edge cases or they would be too difficult
		 * to reproduce.
		 */
		$messages[ $this->post_type ] = [
			/* translators: %s: Singular post type name */
			1  => sprintf( __( '%s updated.', 'mind/types' ), $this->name_singular ) . $view_post_link_html,
			/* translators: %s: Singular post type name */
			4  => sprintf( __( '%s updated.', 'mind/types' ), $this->name_singular ),
			/* translators: %s: Singular post type name */
			6  => sprintf( __( '%s published.', 'mind/types' ), $this->name_singular ) . $view_post_link_html,
			/* translators: %s: Singular post type name */
			7  => sprintf( __( '%s saved.', 'mind/types' ), $this->name_singular ),
			/* translators: %s: Singular post type name */
			8  => sprintf( __( '%s submitted.', 'mind/types' ), $this->name_singular ) . $preview_post_link_html,
			/* translators: %s: Singular post type name */
			10 => sprintf( __( '%s draft updated.', 'mind/types' ), $this->name_singular ) . $preview_post_link_html,
		];

		return $messages;
	}
public function add_post_updated_messages( $messages ) {
		global $post_id;

		$preview_url = get_preview_post_link( $post_id );
		$permalink   = get_permalink( $post_id );

		// Preview post link.
		$preview_post_link_html = is_post_type_viewable( $this->post_type )
			? sprintf( ' <a target="_blank" href="%1$s">%2$s</a>',
				esc_url( $preview_url ),
				/* translators: %s: Singular post type name */
				sprintf( __( 'Preview %s', 'mind/types' ), $this->name_singular )
			)
			: '';

		// View post link.
		$view_post_link_html = is_post_type_viewable( $this->post_type )
			? sprintf( ' <a href="%1$s">%2$s</a>',
				esc_url( $permalink ),
				/* translators: %s: Singular post type name */
				sprintf( __( 'View %s', 'mind/types' ), $this->name_singular )
			)
			: '';

		/**
		 * Message indices 2, 3, 5 and 9 are not handled, because they are edge cases or they would be too difficult
		 * to reproduce.
		 */
		$messages[ $this->post_type ] = [
			/* translators: %s: Singular post type name */
			1  => sprintf( __( '%s updated.', 'mind/types' ), $this->name_singular ) . $view_post_link_html,
			/* translators: %s: Singular post type name */
			4  => sprintf( __( '%s updated.', 'mind/types' ), $this->name_singular ),
			/* translators: %s: Singular post type name */
			6  => sprintf( __( '%s published.', 'mind/types' ), $this->name_singular ) . $view_post_link_html,
			/* translators: %s: Singular post type name */
			7  => sprintf( __( '%s saved.', 'mind/types' ), $this->name_singular ),
			/* translators: %s: Singular post type name */
			8  => sprintf( __( '%s submitted.', 'mind/types' ), $this->name_singular ) . $preview_post_link_html,
			/* translators: %s: Singular post type name */
			10 => sprintf( __( '%s draft updated.', 'mind/types' ), $this->name_singular ) . $preview_post_link_html,
		];

		return $messages;
	}
public function add_post_updated_messages ( $ messages ) { global $ post_id ; $ preview_url = get_preview_post_link ( $ post_id ) ; $ permalink = get_permalink ( $ post_id ) ; // Preview post link. $ preview_post_link_html = is_post_type_viewable ( $ this -> post_type ) ? sprintf ( ' <a target="_blank" href="%1$s">%2$s</a>' , esc_url ( $ preview_url ) , /* translators: %s: Singular post type name */ sprintf ( __ ( 'Preview %s' , 'mind/types' ) , $ this -> name_singular ) ) : '' ; // View post link. $ view_post_link_html = is_post_type_viewable ( $ this -> post_type ) ? sprintf ( ' <a href="%1$s">%2$s</a>' , esc_url ( $ permalink ) , /* translators: %s: Singular post type name */ sprintf ( __ ( 'View %s' , 'mind/types' ) , $ this -> name_singular ) ) : '' ; /**
		 * Message indices 2, 3, 5 and 9 are not handled, because they are edge cases or they would be too difficult
		 * to reproduce.
		 */ $ messages [ $ this -> post_type ] = [ /* translators: %s: Singular post type name */ 1 => sprintf ( __ ( '%s updated.' , 'mind/types' ) , $ this -> name_singular ) . $ view_post_link_html , /* translators: %s: Singular post type name */ 4 => sprintf ( __ ( '%s updated.' , 'mind/types' ) , $ this -> name_singular ) , /* translators: %s: Singular post type name */ 6 => sprintf ( __ ( '%s published.' , 'mind/types' ) , $ this -> name_singular ) . $ view_post_link_html , /* translators: %s: Singular post type name */ 7 => sprintf ( __ ( '%s saved.' , 'mind/types' ) , $ this -> name_singular ) , /* translators: %s: Singular post type name */ 8 => sprintf ( __ ( '%s submitted.' , 'mind/types' ) , $ this -> name_singular ) . $ preview_post_link_html , /* translators: %s: Singular post type name */ 10 => sprintf ( __ ( '%s draft updated.' , 'mind/types' ) , $ this -> name_singular ) . $ preview_post_link_html , ] ; return $ messages ; }
Sets post updated messages for custom post types.

Check out the `post_updated_messages` in wp-admin/edit-form-advanced.php.

@param array $messages An associative array of post types and their messages.

@return array The filtered messages.
Sets post updated messages for custom post types .