";
$i = 0;
foreach ( $attachments as $id => $attachment ) {
$image = wp_get_attachment_image_src($id, $size=$image_size, $icon = false);
$thumb = wp_get_attachment_image_src($id, $size='thumbnail', $icon = false);
$title = wptexturize(trim($attachment->post_title));
$alt = wptexturize(trim($attachment->post_excerpt));
//My added line
$link = wptexturize(trim($attachment->post_content));
if (($image_link == 'yes') && (substr($link,0,7) == 'http://')) {
$output .= '
';
} else {
` $output .= '
';
}
// End my if statement change
if ( $columns > 0 && ++$i % $columns == 0 ){
$output .= '
';
}
}
if ( $columns > 0 && $i % $columns != 0 ) {
$output .= '
';
}
if( $ignore_columns == 'yes' ) {
$output .= '
';
}
$output .= "
\n";
return $output;
}
// //var polaroid_gallery_image_str = '". __('Image') ."';
function polaroid_gallery_head() {
global $polaroid_gallery_plugin_prefix;
$custom_text = get_option('custom_text', 'no');
$custom_text_value = get_option('custom_text_value', 'Image');
$thumbnail_option = get_option('thumbnail_option', 'none');
$image_option = get_option('image_option', 'title3');
$text2image = __('Image');
if($custom_text == 'yes') {
$text2image = $custom_text_value;
}
$polaroid_gallery_script = "
\n";
print $polaroid_gallery_script;
}
add_action('wp_head', 'polaroid_gallery_head');
add_filter('post_gallery', 'polaroid_gallery_shortcode', 10, 2);
?>