Index: wp-includes/media.php
===================================================================
--- wp-includes/media.php	(revision 24236)
+++ wp-includes/media.php	(working copy)
@@ -2342,9 +2342,10 @@
 function get_post_galleries( $post_id = 0, $html = true ) {
 	$post = empty( $post_id ) ? clone get_post() : get_post( $post_id );
 	if ( empty( $post ) || ! has_shortcode( $post->post_content, 'gallery' )  )
-		return array();
+		return apply_filters( 'get_post_galleries', array(), $post_id, $html );
 
-	return get_content_galleries( $post->post_content, $html );
+	$galleries = get_content_galleries( $post->post_content, $html );
+	return apply_filters( 'get_post_galleries', $galleries, $post_id, $html );
 }
 
 /**
@@ -2377,10 +2378,11 @@
 function get_post_gallery( $post_id = 0, $html = true ) {
 	$post = empty( $post_id ) ? clone get_post() : get_post( $post_id );
 	if ( empty( $post ) || ! has_shortcode( $post->post_content, 'gallery' ) )
-		return array();
-
+		return apply_filters( 'get_post_gallery', array(), $post_id, $html );
+	
 	$data = get_content_galleries( $post->post_content, $html, false, 1 );
-	return reset( $data );
+	$gallery = reset( $data );
+	return apply_filters( 'get_post_gallery', $gallery, $post_id, $html );
 }
 
 /**
