WP_Post_Type::add_supports()

In this article

Sets the features support for the post type.

Source

public function add_supports() {
	if ( ! empty( $this->supports ) ) {
		foreach ( $this->supports as $feature => $args ) {
			if ( is_array( $args ) ) {
				add_post_type_support( $this->name, $feature, $args );
			} else {
				add_post_type_support( $this->name, $args );
			}
		}
		unset( $this->supports );
	} elseif ( false !== $this->supports ) {
		// Add default features.
		add_post_type_support( $this->name, array( 'title', 'editor' ) );
	}
}

Changelog

VersionDescription
4.6.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.