Ok, got it. Just added ‘crop’ into
extract( shortcode_atts( array(
'order' => 'ASC',
'orderby' => 'menu_order ID',
'id' => $post->ID,
'itemtag' => 'dl',
'icontag' => 'dt',
'captiontag' => 'dd',
'columns' => 5,
'size' => 'gallery',
'exclude' => '',
'include' => '',
'ids' => '',
'crop' => ''
), $attr ) );
then
$crop = tag_escape($crop);
and at the end
if ( $crop == "yes" )
$img_src = crop function
else
$img_src = normal resize
But now I have to manually add ‘crop=”yes”‘ to the shortcode in the post editor. Is there a way to implement simple dropdown select with only two options ‘Crop Yes/No’ into Gallery editor?