advantage_thumbnail_size

The Advantage advantage thumbnail size function.

Description

advantage_thumbnail_size( $option, (int) $x = 96, (int) $y = 96 ); 

Parameters (3)

0. $option
The option.
1. $x — Optional. (int) => 96
The x.
2. $y — Optional. (int) => 96
The y.

Usage

  1. if ( !function_exists( 'advantage_thumbnail_size' ) ) { 
  2. require_once '/inc/lib-functions.php'; 
  3.  
  4. // The option. 
  5. $option = null; 
  6.  
  7. // The x. 
  8. $x = 96; 
  9.  
  10. // The y. 
  11. $y = 96; 
  12.  
  13. // NOTICE! Understand what this does before running. 
  14. $result = advantage_thumbnail_size($option, $x, $y); 
  15.  

Defined (1)

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

/inc/lib-functions.php  
  1. function advantage_thumbnail_size( $option, $x = 96, $y = 96 ) { 
  2.  
  3. if ( empty( $option ) ) 
  4. return 'thumbnail'; 
  5. elseif ( 'custom' == $option ) { 
  6. if (($x > 0) && ($y > 0) ) 
  7. return array( $x, $y); 
  8. else 
  9. return 'thumbnail';  
  10. else  
  11. return $option;