get_taxonomies_for_attachments

Advertisement

Summery Summery

Retrieves all of the taxonomies that are registered for attachments.

Syntax Syntax

get_taxonomies_for_attachments( string $output = 'names' )

Description Description

Handles mime-type-specific taxonomies such as attachment:image and attachment:video.

Parameters Parameters

$output

(string) (Optional) The type of taxonomy output to return. Accepts 'names' or 'objects'.

Default value: 'names'

Return Return

(string[]|WP_Taxonomy[]) Array of names or objects of registered taxonomies for attachments.

Source Source

File: wp-includes/media.php

		if ( empty( $videos ) ) {
			return;
		}

		$video       = reset( $videos );
		$atts['src'] = wp_get_attachment_url( $video->ID );
		if ( empty( $atts['src'] ) ) {
			return;
		}

		array_unshift( $default_types, 'src' );
	}

	/**
	 * Filters the media library used for the video shortcode.
	 *
	 * @since 3.6.0
	 *

Advertisement

Changelog Changelog

Changelog
Version Description
3.5.0 Introduced.

See also See also

Advertisement

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.