Index: media.php
===================================================================
--- media.php	(revision 29814)
+++ media.php	(working copy)
@@ -1091,6 +1091,14 @@
 	$output .= "
 		</div>\n";
 
+	/**
+	 * Filter the gallery shortcode output.
+	 *
+	 * @param string $output Output of the gallery shortcode.
+	 * @param array  $attr   Attributes of the gallery shortcode.
+	 */
+	$output = apply_filters( 'gallery_content', $output, $attr );
+
 	return $output;
 }
 
