Index: query.php
===================================================================
--- query.php	(revision 9125)
+++ query.php	(working copy)
@@ -871,6 +871,15 @@
 	var $is_preview = false;
 
 	/**
+	 * Set if query is a sticky post.
+	 *
+	 * @since 2.7.0
+	 * @access public
+	 * @var bool
+	 */
+	var $is_sticky = false;
+
+	/**
 	 * Set if query returns a page.
 	 *
 	 * @since 1.5.0
@@ -1089,6 +1098,7 @@
 	 */
 	function init_query_flags() {
 		$this->is_single = false;
+		$this->is_sticky = false;
 		$this->is_page = false;
 		$this->is_archive = false;
 		$this->is_date = false;
@@ -2304,6 +2314,9 @@
 			// Loop over posts and relocate stickies to the front.
 			for ( $i = 0; $i < $num_posts; $i++ ) {
 				if ( in_array($this->posts[$i]->ID, $sticky_posts) ) {
+					// Mark it 'sticky' so is_sticky() returns true
+					$this->posts[$i]->is_sticky = true;
+					// Gather the data for the sticky post
 					$sticky_post = $this->posts[$i];
 					// Remove sticky from current position
 					array_splice($this->posts, $i, 1);
@@ -2382,6 +2395,26 @@
 	}
 
 	/**
+	 * Return if the post is stickyed or not.
+	 *
+	 * Returns true if post is considered sticky, false if not.
+	 *
+	 * @since 2.7.0
+	 * @access public
+	 * @uses $post
+	 * @uses do_action() Calls 'sticky_post'.
+	 */
+	function is_sticky() {
+		global $post;
+		if ( $post->is_sticky == 1 ) {
+			do_action('sticky_post');
+			return true;
+		} else {
+			return false;
+		}
+	}
+
+	/**
 	 * Whether there are more posts available in the loop.
 	 *
 	 * Calls action 'loop_end', when the loop is complete.
