LLMS_Post_Types::get_tax_caps( string|array $tax )

Retrieve taxonomy capabilities for custom taxonomies


Description Description


Parameters Parameters

$tax

(string|array) (Required) tax name/names (pass array of singular, plural to customize plural spelling)


Top ↑

Return Return

(array)


Top ↑

Source Source

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

	public static function get_tax_caps( $tax ) {

		if ( ! is_array( $tax ) ) {
			$singular = $tax;
			$plural = $tax . 's';
		} else {
			$singular = $tax[0];
			$plural = $tax[1];
		}

		return apply_filters( 'llms_get_' . $singular . '_tax_caps', array(
			'manage_terms' => sprintf( 'manage_%s', $plural ),
			'edit_terms' => sprintf( 'edit_%s', $plural ),
			'delete_terms' => sprintf( 'delete_%s', $plural ),
			'assign_terms' => sprintf( 'assign_%s', $plural ),
		) );

	}

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.





Permalink: