image_shortcode

Image.

Description

image_shortcode( $atts ); 

Parameters (1)

0. $atts
The atts.

Usage

  1. if ( !function_exists( 'image_shortcode' ) ) { 
  2. require_once '/functions/shortcodes.php'; 
  3.  
  4. // The atts. 
  5. $atts = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = image_shortcode($atts); 
  9.  

Defined (1)

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

/functions/shortcodes.php  
  1. function image_shortcode($atts) { 
  2. extract(shortcode_atts(array(  
  3. "url" => "",  
  4. "img" => "",  
  5. "alt" => "",  
  6. "align" => "",  
  7. "border" => "",  
  8. "lightbox" => 'false' 
  9. ), $atts)); 
  10.  
  11. if ( $img == '' ) 
  12. return NULL; 
  13.  
  14. if( $lightbox == 'true' ) 
  15. $img_rel = 'rel="zoombox"'; 
  16.  
  17. if( $url != '' ) { 
  18. $output .= "\n" . '<a href="' . $url . '" title="' . $alt . '" ' . $img_rel . '><img src="' . $img . '" class="' . $align . ' ' . $border . '" alt="' . $alt . '" title="' . $alt . '" ' . $class . '/></a>'; 
  19. } else { 
  20. $output .= "\n" . '<img src="' . $img . '" alt="' . $alt . '" title="' . $alt . '" class="' . $align . ' ' . $border . '"/>'; 
  21.  
  22. return $output;