WP_Post_Type::register_taxonomies() WordPress Method

The WP_Post_Type::register_taxonomies() method is used to register taxonomies for a post type. This method should be called in the constructor for the post type.

WP_Post_Type::register_taxonomies() #

Registers the taxonomies for the post type.


Source

File: wp-includes/class-wp-post-type.php

	public function register_taxonomies() {
		foreach ( $this->taxonomies as $taxonomy ) {
			register_taxonomy_for_object_type( $taxonomy, $this->name );
		}
	}


Top ↑

Changelog

Changelog
VersionDescription
4.6.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.