View Single Post
Old 05-10-2013, 11:26 AM  
fris
Too lazy to set a custom title
 
fris's Avatar
 
Industry Role:
Join Date: Aug 2002
Posts: 55,602
you can make it default to the url of the image

Code:
add_filter( 'attachment_link', 'direct_image_urls_for_galleries', 10, 2 );

function direct_image_urls_for_galleries( $link, $id ) {
	if ( is_admin() ) return $link;

	$mimetypes = array( 'image/jpeg', 'image/png', 'image/gif' );

	$post = get_post( $id );

	if ( in_array( $post->post_mime_type, $mimetypes ) )
		return wp_get_attachment_url( $id );
	else
		return $link;
}
not sure if thats what you want.
__________________
Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.


My Cam Feeds Script / Gallery Scraper / WPXXX Theme / Free Templates
fris is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote