";
$gallery .= "
\n

\n";
$gallery .= "
";
$gallery .= "
$main_slide_caption
\n";
$gallery .= "
";
$gallery .= "

";
$gallery .= "
";
$gallery .= "
";
$is_first = true;
foreach ($slides as $slide) {
$thumbnailObj = wp_get_attachment_image_src($slide->ID, 'adwp_thumb');
$thumbnailURL = $thumbnailObj[0];
$thumb_css_class = ($is_first)?'current':'reg';
$slide_title = $slide -> post_excerpt;
$slide_alt = $slide -> post_content;
$slideObj = wp_get_attachment_image_src($slide->ID, 'adwp_full');
$slideURL = $slideObj[0];
$fullObj = wp_get_attachment_image_src($slide->ID, 'full');
$fullURL = $fullObj[0];
$gallery .= '
'.PHP_EOL;
$is_first = false;
}
$gallery .= "
\n";
$gallery .= "
\n";
$css_visibility = (count($slides) > 10)?'visible':'hidden';
$gallery .= "

";
$gallery .= "
\n";
$gallery .= "
\n";
return $gallery;
}
if (!is_admin()) {
add_action('wp_print_scripts', 'print_adwp_scripts');
add_action('wp_head', 'print_adwp_styles');
remove_shortcode('gallery');
add_shortcode('gallery', 'yas_gallery');
}
add_image_size( 'adwp_thumb', $adwp_thumb_width, $adwp_thumb_height, true );
add_image_size( 'adwp_full', $adwp_full_width, $adwp_full_height, false );
?>