src/class-extended-cpt.php
public function add_to_feed( array $vars ) : array {

		# If it's not a feed, we're not interested:
		if ( ! isset( $vars['feed'] ) ) {
			return $vars;
		}

		if ( ! isset( $vars['post_type'] ) ) {
			$vars['post_type'] = [
				'post',
				$this->post_type,
			];
		} elseif ( is_array( $vars['post_type'] ) && ( count( $vars['post_type'] ) > 1 ) ) {
			$vars['post_type'][] = $this->post_type;
		}

		return $vars;

	}
public function add_to_feed( array $vars ) : array {

		# If it's not a feed, we're not interested:
		if ( ! isset( $vars['feed'] ) ) {
			return $vars;
		}

		if ( ! isset( $vars['post_type'] ) ) {
			$vars['post_type'] = [
				'post',
				$this->post_type,
			];
		} elseif ( is_array( $vars['post_type'] ) && ( count( $vars['post_type'] ) > 1 ) ) {
			$vars['post_type'][] = $this->post_type;
		}

		return $vars;

	}
public function add_to_feed ( array $ vars ) : array { # If it's not a feed, we're not interested: if ( ! isset ( $ vars [ 'feed' ] ) ) { return $ vars ; } if ( ! isset ( $ vars [ 'post_type' ] ) ) { $ vars [ 'post_type' ] = [ 'post' , $ this -> post_type , ] ; } elseif ( is_array ( $ vars [ 'post_type' ] ) && ( count ( $ vars [ 'post_type' ] ) > 1 ) ) { $ vars [ 'post_type' ] [ ] = $ this -> post_type ; } return $ vars ; }
Add our post type to the feed.

@param  array $vars Request parameters.
@return array       Updated request parameters.
Add our post type to the feed .