LLMS_Post_Types::register_taxonomy( string $name, string|array $object, array $data )

Register a custom post type taxonomy Automatically checks for duplicates and filters data


Parameters Parameters

$name

(string) (Required) Taxonomy name.

$object

(string|array) (Required) Post type object(s) to associate the taxonomy with.

$data

(array) (Required) Taxonomy data.


Top ↑

Return Return

(void)


Top ↑

Source Source

File: includes/class.llms.post-types.php

	public static function register_taxonomy( $name, $object, $data ) {

		if ( ! taxonomy_exists( $name ) ) {
			$filter_name = str_replace( 'llms_', '', $name );
			register_taxonomy(
				$name,
				apply_filters( 'lifterlms_register_taxonomy_objects_' . $filter_name, $object ),
				apply_filters( 'lifterlms_register_taxonomy_args_' . $filter_name, $data )
			);
		}

	}


Top ↑

Changelog Changelog

Changelog
Version Description
3.13.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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