Retrieves all of the taxonomies that are registered for attachments.
Description
Handles mime-type-specific taxonomies such as attachment:image and attachment:video.
See also
Parameters
$output
stringoptional- The type of taxonomy output to return. Accepts
'names'
or'objects'
.
Default'names'
.Default:
'names'
Source
* @since 5.8.0
*
* @param bool $prev Optional. Whether to display the next (false) or previous (true) link. Default true.
* @param string|int[] $size Optional. Image size. Accepts any registered image size name, or an array
* of width and height values in pixels (in that order). Default 'thumbnail'.
* @param bool $text Optional. Link text. Default false.
* @return string Markup for image link.
*/
function get_adjacent_image_link( $prev = true, $size = 'thumbnail', $text = false ) {
$post = get_post();
$attachments = array_values(
get_children(
array(
'post_parent' => $post->post_parent,
'post_status' => 'inherit',
'post_type' => 'attachment',
'post_mime_type' => 'image',
'order' => 'ASC',
Changelog
Version | Description |
---|---|
3.5.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.