You appear to be a bot. Output may be restricted
Description
Return an array suitable for passing to image functions to determine the size
Usage
$array = bw_get_image_size( $size );
Parameters
- $size
- ( mixed ) optional default: 100 – string representing the size. if a single integer then make the array square otherwise it's widthxheight or width,height or some other way of specifying width and height so we split at the non numeric value(s) and take the first two integer bits
Returns
array containing width and heightSource
File name: oik/includes/bw_images.incLines:
1 to 12 of 12
function bw_get_image_size( $size=100 ) { $pattern = "/([\d]+)/"; preg_match_all( $pattern, $size, $thumbnail ); //bw_trace2( $thumbnail ); if ( count( $thumbnail[0] ) < 2 ) $thumbnail[0][1] = $thumbnail[0][0]; $size = array( $thumbnail[0][0], $thumbnail[0][1] ); // bw_trace( $size, __FUNCTION__, __LINE__, __FILE__, "size" ); return( $size ); }View on GitHub View on Trac