next_image_link

Displays next image link that has the same post parent.

Description

next_image_link( (string) $size = 'thumbnail', (bool) $text = false ); 

Parameters (2)

0. $size — Optional. (string) => 'thumbnail'
Image size. Accepts any valid image size, an array of width and height values in pixels (in that order), 0, or none.. 0 or none. will default to post_title or $text. Default thumbnail.
1. $text — Optional. (bool) => false
Link text. Default false.

Usage

  1. if ( !function_exists( 'next_image_link' ) ) { 
  2. require_once ABSPATH . WPINC . '/media.php'; 
  3. $size = 'thumbnail'; 
  4.  
  5. // Optional. Link text. Default false. 
  6. $text = false; 
  7.  
  8. // NOTICE! Understand what this does before running. 
  9. $result = next_image_link($size, $text); 
  10.  

Defined (1)

The function is defined in the following location(s).

/wp-includes/media.php  
  1. function next_image_link( $size = 'thumbnail', $text = false ) { 
  2. adjacent_image_link(false, $size, $text);