";
$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, 'alwp_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, 'alwp_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_alwp_scripts');
add_action('wp_head', 'print_alwp_styles');
remove_shortcode('gallery');
add_shortcode('gallery', 'yas_gallery');
}
add_image_size( 'alwp_thumb', $alwp_thumb_width, $alwp_thumb_height, true );
add_image_size( 'alwp_full', $alwp_full_width, $alwp_full_height, false );
?>