Index: wp-includes/author-template.php
===================================================================
--- wp-includes/author-template.php	(revision 6446)
+++ wp-includes/author-template.php	(working copy)
@@ -24,9 +24,16 @@
 /**
  * the_author() - Echo the name of the author of the current post in the Loop.
  *
+ * The behavior of this function is based off of old functionality predating get_the_author().
+ * This function is not deprecated, but is designed to echo the value from get_the_author()
+ * and as an result of any old theme that might still use the old behavior will also
+ * pass the value from get_the_author().
+ *
+ * The normal, expected behavior of this function is to echo the author and not return it.
+ * However, backwards compatiability has to be maintained.
+ *
  * @since 0.71
  * @see get_the_author()
- * @deprecated Use get_the_author()
  *
  * @param string $deprecated Deprecated.
  * @param string $deprecated_echo Echo the string or return it. Deprecated, use get_the_author().
Index: wp-includes/bookmark.php
===================================================================
--- wp-includes/bookmark.php	(revision 6446)
+++ wp-includes/bookmark.php	(working copy)
@@ -37,6 +37,7 @@
 
 // Deprecate
 function get_link($bookmark_id, $output = OBJECT) {
+	wp_mark_deprecated(__FUNCTION__, 'get_bookmark()');
 	return get_bookmark($bookmark_id, $output);
 }
 
Index: wp-includes/deprecated.php
===================================================================
--- wp-includes/deprecated.php	(revision 6446)
+++ wp-includes/deprecated.php	(working copy)
@@ -86,6 +86,8 @@
  * @return array
  */
 function get_postdata($postid) {
+	wp_mark_deprecated(__FUNCTION__, 'get_post()');
+
 	$post = &get_post($postid);
 
 	$postdata = array (
@@ -118,6 +120,8 @@
 function start_wp() {
 	global $wp_query, $post;
 
+	wp_mark_deprecated(__FUNCTION__, __('new WordPress Loop') );
+
 	// Since the old style loop is being used, advance the query iterator here.
 	$wp_query->next_post();
 
@@ -135,6 +139,8 @@
  * @return null|int
  */
 function the_category_ID($echo = true) {
+	wp_mark_deprecated(__FUNCTION__, 'get_the_category()');
+
 	// Grab the first cat in the list.
 	$categories = get_the_category();
 	$cat = $categories[0]->term_id;
@@ -157,6 +163,9 @@
  */
 function the_category_head($before='', $after='') {
 	global $currentcat, $previouscat;
+
+	wp_mark_deprecated(__FUNCTION__, 'get_the_category_by_ID()');
+
 	// Grab the first cat in the list.
 	$categories = get_the_category();
 	$currentcat = $categories[0]->category_id;
@@ -184,6 +193,8 @@
  */
 function previous_post($format='%', $previous='previous post: ', $title='yes', $in_same_cat='no', $limitprev=1, $excluded_categories='') {
 
+	wp_mark_deprecated(__FUNCTION__, 'previous_post_link()');
+
 	if ( empty($in_same_cat) || 'no' == $in_same_cat )
 		$in_same_cat = false;
 	else
@@ -217,6 +228,7 @@
  * @param string $excluded_categories
  */
 function next_post($format='%', $next='next post: ', $title='yes', $in_same_cat='no', $limitnext=1, $excluded_categories='') {
+	wp_mark_deprecated(__FUNCTION__, 'next_post_link()');
 
 	if ( empty($in_same_cat) || 'no' == $in_same_cat )
 		$in_same_cat = false;
@@ -249,6 +261,8 @@
  * @return bool
  */
 function user_can_create_post($user_id, $blog_id = 1, $category_id = 'None') {
+	wp_mark_deprecated(__FUNCTION__, 'current_user_can()');
+
 	$author_data = get_userdata($user_id);
 	return ($author_data->user_level > 1);
 }
@@ -266,6 +280,8 @@
  * @return bool
  */
 function user_can_create_draft($user_id, $blog_id = 1, $category_id = 'None') {
+	wp_mark_deprecated(__FUNCTION__, 'current_user_can()');
+
 	$author_data = get_userdata($user_id);
 	return ($author_data->user_level >= 1);
 }
@@ -283,6 +299,8 @@
  * @return bool
  */
 function user_can_edit_post($user_id, $post_id, $blog_id = 1) {
+	wp_mark_deprecated(__FUNCTION__, 'current_user_can()');
+
 	$author_data = get_userdata($user_id);
 	$post = get_post($post_id);
 	$post_author_data = get_userdata($post->post_author);
@@ -309,6 +327,8 @@
  * @return bool
  */
 function user_can_delete_post($user_id, $post_id, $blog_id = 1) {
+	wp_mark_deprecated(__FUNCTION__, 'current_user_can()');
+
 	// right now if one can edit, one can delete
 	return user_can_edit_post($user_id, $post_id, $blog_id);
 }
@@ -326,6 +346,8 @@
  * @return bool
  */
 function user_can_set_post_date($user_id, $blog_id = 1, $category_id = 'None') {
+	wp_mark_deprecated(__FUNCTION__, 'current_user_can()');
+
 	$author_data = get_userdata($user_id);
 	return (($author_data->user_level > 4) && user_can_create_post($user_id, $blog_id, $category_id));
 }
@@ -344,6 +366,8 @@
  * @return bool
  */
 function user_can_edit_post_date($user_id, $post_id, $blog_id = 1) {
+	wp_mark_deprecated(__FUNCTION__, 'current_user_can()');
+
 	$author_data = get_userdata($user_id);
 	return (($author_data->user_level > 4) && user_can_edit_post($user_id, $post_id, $blog_id));
 }
@@ -362,6 +386,8 @@
  * @return bool
  */
 function user_can_edit_post_comments($user_id, $post_id, $blog_id = 1) {
+	wp_mark_deprecated(__FUNCTION__, 'current_user_can()');
+
 	// right now if one can edit a post, one can edit comments made on it
 	return user_can_edit_post($user_id, $post_id, $blog_id);
 }
@@ -380,6 +406,8 @@
  * @return bool
  */
 function user_can_delete_post_comments($user_id, $post_id, $blog_id = 1) {
+	wp_mark_deprecated(__FUNCTION__, 'current_user_can()');
+
 	// right now if one can edit comments, one can delete comments
 	return user_can_edit_post_comments($user_id, $post_id, $blog_id);
 }
@@ -396,6 +424,8 @@
  * @return bool
  */
 function user_can_edit_user($user_id, $other_user) {
+	wp_mark_deprecated(__FUNCTION__, 'current_user_can()');
+
 	$user  = get_userdata($user_id);
 	$other = get_userdata($other_user);
 	if ( $user->user_level > $other->user_level || $user->user_level > 8 || $user->ID == $other->ID )
@@ -427,6 +457,8 @@
 function get_linksbyname($cat_name = "noname", $before = '', $after = '<br />', $between = " ", $show_images = true, $orderby = 'id',
 						 $show_description = true, $show_rating = false,
 						 $limit = -1, $show_updated = 0) {
+	wp_mark_deprecated(__FUNCTION__, 'get_links()');
+
 	$cat_id = -1;
 	$cat = get_term_by('name', $cat_name, 'link_category');
 	if ( $cat )
@@ -447,6 +479,8 @@
  * @return bool|null
  */
 function wp_get_linksbyname($category, $args = '') {
+	wp_mark_deprecated(__FUNCTION__, 'wp_get_links()');
+
 	$cat = get_term_by('name', $category, 'link_category');
 	if ( !$cat )
 		return false;
@@ -478,6 +512,8 @@
  * @return unknown
  */
 function get_linkobjectsbyname($cat_name = "noname" , $orderby = 'name', $limit = -1) {
+	wp_mark_deprecated(__FUNCTION__, 'get_linkobjects()');
+
 	$cat_id = -1;
 	$cat = get_term_by('name', $cat_name, 'link_category');
 	if ( $cat )
@@ -529,6 +565,8 @@
  * @return unknown
  */
 function get_linkobjects($category = 0, $orderby = 'name', $limit = 0) {
+	wp_mark_deprecated(__FUNCTION__, 'get_bookmarks()');
+
 	$links = get_bookmarks("category=$category&orderby=$orderby&limit=$limit");
 
 	$links_array = array();
@@ -560,6 +598,7 @@
  */
 function get_linksbyname_withrating($cat_name = "noname", $before = '', $after = '<br />', $between = " ",
 									$show_images = true, $orderby = 'id', $show_description = true, $limit = -1, $show_updated = 0) {
+	wp_mark_deprecated(__FUNCTION__, 'get_bookmarks()');
 
 	get_linksbyname($cat_name, $before, $after, $between, $show_images, $orderby, $show_description, true, $limit, $show_updated);
 }
@@ -586,6 +625,7 @@
  */
 function get_links_withrating($category = -1, $before = '', $after = '<br />', $between = " ", $show_images = true,
 							  $orderby = 'id', $show_description = true, $limit = -1, $show_updated = 0) {
+	wp_mark_deprecated(__FUNCTION__, 'get_bookmarks()');
 
 	get_links($category, $before, $after, $between, $show_images, $orderby, $show_description, true, $limit, $show_updated);
 }
@@ -600,6 +640,7 @@
  * @return int Only returns 0.
  */
 function get_autotoggle($id = 0) {
+	wp_mark_deprecated( __FUNCTION__ );
 	return 0;
 }
 
@@ -631,6 +672,8 @@
 function list_cats($optionall = 1, $all = 'All', $sort_column = 'ID', $sort_order = 'asc', $file = '', $list = true, $optiondates = 0, 
 				   $optioncount = 0, $hide_empty = 1, $use_desc_for_title = 1, $children=false, $child_of=0, $categories=0, 
 				   $recurse=0, $feed = '', $feed_image = '', $exclude = '', $hierarchical=false) {
+	wp_mark_deprecated(__FUNCTION__, 'wp_list_categories()');
+
 	$query = compact('optionall', 'all', 'sort_column', 'sort_order', 'file', 'list', 'optiondates', 'optioncount', 'hide_empty', 'use_desc_for_title', 'children',
 		'child_of', 'categories', 'recurse', 'feed', 'feed_image', 'exclude', 'hierarchical');
 	return wp_list_cats($query);
@@ -645,6 +688,8 @@
  * @return unknown
  */
 function wp_list_cats($args = '') {
+	wp_mark_deprecated(__FUNCTION__, 'wp_list_categories()');
+
 	$r = wp_parse_args( $args );
 
 	// Map to new names.
@@ -685,6 +730,7 @@
 function dropdown_cats($optionall = 1, $all = 'All', $orderby = 'ID', $order = 'asc',
 		$show_last_update = 0, $show_count = 0, $hide_empty = 1, $optionnone = false,
 		$selected = 0, $exclude = 0) {
+	wp_mark_deprecated(__FUNCTION__, 'wp_dropdown_categories()');
 
 	$show_option_all = '';
 	if ( $optionall )
@@ -707,6 +753,8 @@
  * @see WP_Scripts
  */
 function tinymce_include() {
+	wp_mark_deprecated(__FUNCTION__, 'wp_print_scripts()/WP_Scripts');
+
 	wp_print_script('wp_tiny_mce');
 }
 
@@ -724,6 +772,8 @@
  * @return unknown
  */
 function list_authors($optioncount = false, $exclude_admin = true, $show_fullname = false, $hide_empty = true, $feed = '', $feed_image = '') {
+	wp_mark_deprecated(__FUNCTION__, 'wp_list_authors()');
+
 	$args = compact('optioncount', 'exclude_admin', 'show_fullname', 'hide_empty', 'feed', 'feed_image');
 	return wp_list_authors($args);
 }
@@ -738,6 +788,7 @@
  * @return unknown
  */
 function wp_get_post_cats($blogid = '1', $post_ID = 0) {
+	wp_mark_deprecated(__FUNCTION__, 'wp_get_post_categories()');
 	return wp_get_post_categories($post_ID);
 }
 
@@ -754,6 +805,7 @@
  * @return unknown
  */
 function wp_set_post_cats($blogid = '1', $post_ID = 0, $post_categories = array()) {
+	wp_mark_deprecated(__FUNCTION__, 'wp_set_post_categories()');
 	return wp_set_post_categories($post_ID, $post_categories);
 }
 
@@ -771,6 +823,7 @@
  * @return unknown
  */
 function get_archives($type='', $limit='', $format='html', $before = '', $after = '', $show_post_count = false) {
+	wp_mark_deprecated(__FUNCTION__, 'wp_get_archives()');
 	$args = compact('type', 'limit', 'format', 'before', 'after', 'show_post_count');
 	return wp_get_archives($args);
 }
@@ -788,6 +841,8 @@
  * @return string|null
  */
 function get_author_link($echo = false, $author_id, $author_nicename = '') {
+	wp_mark_deprecated(__FUNCTION__, 'get_author_posts_url()');
+
 	$link = get_author_posts_url($author_id, $author_nicename);
 
 	if ( $echo )
@@ -813,6 +868,8 @@
  */
 function link_pages($before='<br />', $after='<br />', $next_or_number='number', $nextpagelink='next page', $previouspagelink='previous page', 
 					$pagelink='%', $more_file='') {
+	wp_mark_deprecated(__FUNCTION__, 'wp_link_pages()');
+
 	$args = compact('before', 'after', 'next_or_number', 'nextpagelink', 'previouspagelink', 'pagelink', 'more_file');
 	return wp_link_pages($args);
 }
@@ -828,6 +885,8 @@
  * @return string
  */
 function get_settings($option) {
+	wp_mark_deprecated(__FUNCTION__, 'get_option()');
+
 	return get_option($option);
 }
 
@@ -839,6 +898,7 @@
  * @see the_permalink()
  */
 function permalink_link() {
+	wp_mark_deprecated(__FUNCTION__, 'the_permalink()');
 	the_permalink();
 }
 
@@ -852,6 +912,7 @@
  * @param string $file
  */
 function permalink_single_rss($file = '') {
+	wp_mark_deprecated(__FUNCTION__, 'the_permalink_rss()');
 	the_permalink_rss();
 }
 
@@ -867,6 +928,8 @@
  * @return null|string
  */
 function wp_get_links($args = '') {
+	wp_mark_deprecated(__FUNCTION__, 'get_bookmarks()');
+
 	if ( strpos( $args, '=' ) === false ) {
 		$cat_id = $args;
 		$args = add_query_arg( 'category', $cat_id, $args );
@@ -913,6 +976,7 @@
  */
 function get_links($category = -1, $before = '', $after = '<br />', $between = ' ', $show_images = true, $orderby = 'name',
 			$show_description = true, $show_rating = false, $limit = -1, $show_updated = 1, $echo = true) {
+	wp_mark_deprecated(__FUNCTION__, 'get_bookmarks()');
 
 	$order = 'ASC';
 	if ( substr($orderby, 0, 1) == '_' ) {
@@ -1007,6 +1071,8 @@
  * @param string $$deprecated Not Used 
  */
 function get_links_list($order = 'name', $deprecated = '') {
+	wp_mark_deprecated(__FUNCTION__, 'get_categories()');
+
 	$order = strtolower($order);
 
 	// Handle link category sorting
@@ -1053,6 +1119,8 @@
  * @param bool $count the number of links in the db
  */
 function links_popup_script($text = 'Links', $width=400, $height=400, $file='links.all.php', $count = true) {
+	wp_mark_deprecated( __FUNCTION__ );
+
 	if ( $count )
 		$counts = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->links");
 
@@ -1075,6 +1143,7 @@
  * @return unknown
  */
 function get_linkrating($link) {
+	wp_mark_deprecated(__FUNCTION__, 'sanitize_bookmark_field()');
 	return sanitize_bookmark_field('link_rating', $link->link_rating, $link->link_id, 'display');
 }
 
@@ -1089,6 +1158,8 @@
  * @return string
  */
 function get_linkcatname($id = 0) {
+	wp_mark_deprecated(__FUNCTION__, 'get_category()');
+
 	$id = (int) $id;
 
 	if ( empty($id) )
@@ -1116,6 +1187,7 @@
  * @param string $deprecated Not used
  */
 function comments_rss_link($link_text = 'Comments RSS', $deprecated = '') {
+	wp_mark_deprecated(__FUNCTION__, 'post_comments_feed_link()');
 	post_comments_feed_link($link_text);
 }
 
@@ -1132,6 +1204,8 @@
  * @return string|null
  */
 function get_category_rss_link($echo = false, $cat_ID = 1, $deprecated = '') {
+	wp_mark_deprecated(__FUNCTION__, 'get_category_feed_link()');
+
 	$link = get_category_feed_link($cat_ID, $feed = 'rss2');
 
 	if ( $echo )
@@ -1152,6 +1226,8 @@
  * @return string|null
  */
 function get_author_rss_link($echo = false, $author_id = 1, $deprecated = '') {
+	wp_mark_deprecated(__FUNCTION__, 'get_author_feed_link()');
+
 	$link = get_author_feed_link($author_id);
 	if ( $echo )
 		echo $link;
Index: wp-includes/feed.php
===================================================================
--- wp-includes/feed.php	(revision 6446)
+++ wp-includes/feed.php	(working copy)
@@ -98,6 +98,7 @@
 }
 
 function comments_rss($deprecated = '') {
+	wp_mark_deprecated(__FUNCTION__, 'get_post_comments_feed_link()');
 	return get_post_comments_feed_link();
 }
 
@@ -178,21 +179,23 @@
 }
 
 /**
- * prep_atom_text_construct() - determine if given string of data is
- * type text, html, or xhtml, per RFC 4287 section 3.1.
+ * prep_atom_text_construct() - Determine the type of a given string of data
  *
+ * Tell whether the type is text, html, or xhtml, per RFC 4287 section 3.1.
+ *
  * In the case of WordPress, text is defined as containing no markup,
  * xhtml is defined as "well formed", and html as tag soup (i.e., the rest).
  *
  * Container div tags are added to xhtml values, per section 3.1.1.3.
  *
+ * @link http://www.atomenabled.org/developers/syndication/atom-format-spec.php#rfc.section.3.1
+ *
  * @package WordPress
  * @subpackage Feed
  * @since 2.4 
  *
  * @param string $data input string
  * @return array $result array(type, value)
- * @link http://www.atomenabled.org/developers/syndication/atom-format-spec.php#rfc.section.3.1
  */
 function prep_atom_text_construct($data) {
 	if (strpos($data, '<') === false && strpos($data, '&') === false) {
@@ -205,12 +208,12 @@
 	xml_parser_free($parser);
 
 	if (!$code) {
-		       if (strpos($data, '<') === false) {
-			       return array('text', $data);
-                       } else {
-			       $data = "<div xmlns='http://www.w3.org/1999/xhtml'>$data</div>";
-			       return array('xhtml', $data);
-                       }
+		if (strpos($data, '<') === false) {
+			return array('text', $data);
+		} else {
+			$data = "<div xmlns='http://www.w3.org/1999/xhtml'>$data</div>";
+			return array('xhtml', $data);
+		}
 	}
 
 	if (strpos($data, ']]>') == false) {
Index: wp-includes/functions.php
===================================================================
--- wp-includes/functions.php	(revision 6446)
+++ wp-includes/functions.php	(working copy)
@@ -485,6 +485,54 @@
 		fclose( $fp );
 }
 
+/**
+ * wp_mark_deprecated() - Marks a function as deprecated and informs when it has been used.
+ *
+ * There is a hook that will be called that can be used to get the backtrace up to what file
+ * and function called the deprecated function. That behavior is not defined here, because of
+ * preformance.
+ *
+ * The current behavior is to trigger an user error if WP_DEBUG is defined and is true. In later
+ * versions, this behavior could be changed to a more reasonable and less drastic approach of
+ * letting the user know that deprecated functions were used. However, normal usage will NOT
+ * trigger these errors, so only those that purposefully enable WP_DEBUG will see them.
+ *
+ * This function could be used in every place, including hooks that allows for calling the function.
+ * The common use will be for functions but can be for hooks, parameters, etc that is deprecated.
+ *
+ * @link http://trac.wordpress.org/ticket/4361 History of this function
+ *
+ * @package WordPress
+ * @package Debug
+ * @since 2.4
+ *
+ * @uses do_action() Calls 'deprecated_function_run' and passes the function name and what to use instead.
+ * @uses apply_filters() Calls 'deprecated_function_trigger_error' and expects boolean value of true to do trigger or false to not trigger error.
+ *
+ * @param string $used The function that was called
+ * @param string $seeinstead Optional. The function that should have been called
+ */
+function wp_mark_deprecated($used, $seeinstead=null) {
+	// Allow plugin to overwrite the error => forward thinking
+	$outputError = true;
+
+	// We can't know if another function will trigger this function before plugins.php is included.
+	// Test anyway. Small performance lost is okay since this function should not be called at all.
+	if( function_exists('do_action') ) {
+		do_action('deprecated_function_run', $function, $seeinstead);
+
+		// Allow plugin to filter the output error trigger
+		$outputError = apply_filters( 'deprecated_function_trigger_error', $outputError );
+	}
+
+	if( $outputError && defined('WP_DEBUG') && true === WP_DEBUG ) {
+		if( !is_null($seeinstead) )
+			trigger_error( printf( __("%s is <strong>deprecated</strong>! Use %s instead."), $used, $seeinstead ) );
+		else
+			trigger_error( printf( __("%s is <strong>deprecated</strong with no alternative available."), $used ) );
+	}
+}
+
 function do_enclose( $content, $post_ID ) {
 	global $wpdb;
 	include_once( ABSPATH . WPINC . '/class-IXR.php' );
Index: wp-includes/pluggable.php
===================================================================
--- wp-includes/pluggable.php	(revision 6446)
+++ wp-includes/pluggable.php	(working copy)
@@ -788,6 +788,7 @@
 // Deprecated. Use wp_set_auth_cookie()
 if ( !function_exists('wp_setcookie') ) :
 function wp_setcookie($username, $password = '', $already_md5 = false, $home = '', $siteurl = '', $remember = false) {
+	wp_mark_deprecated( __FUNCTION__ );
 	$user = get_userdatabylogin($username);
 	wp_set_auth_cookie($user->ID, $remember);
 }
@@ -796,6 +797,7 @@
 // Deprecated. Use wp_clear_auth_cookie()
 if ( !function_exists('wp_clearcookie') ) :
 function wp_clearcookie() {
+	wp_mark_deprecated( __FUNCTION__ );
 	wp_clear_auth_cookie();
 }
 endif;
@@ -803,6 +805,7 @@
 // Deprecated.  No alternative.
 if ( !function_exists('wp_get_cookie_login') ):
 function wp_get_cookie_login() {
+	wp_mark_deprecated( __FUNCTION__ );
 	return false;
 }
 endif;
Index: wp-includes/registration-functions.php
===================================================================
--- wp-includes/registration-functions.php	(revision 6446)
+++ wp-includes/registration-functions.php	(working copy)
@@ -1,4 +1,5 @@
 <?php
 // Deprecated.  Use registration.php.
+wp_mark_deprecated( basename(__FILE__), 'registration.php' );
 require_once(ABSPATH . WPINC .  '/registration.php');
 ?>
Index: wp-includes/registration.php
===================================================================
--- wp-includes/registration.php	(revision 6446)
+++ wp-includes/registration.php	(working copy)
@@ -177,7 +177,7 @@
 
 /**
  * A simpler way of inserting an user into the database.
- * See also: wp_insert_user().
+ * @see wp_insert_user().
  * @global object $wpdb WordPress database layer.
  * @param string $username The user's username.
  * @param string $password The user's password.
@@ -201,9 +201,11 @@
  * @param string $password The user's password.
  * @param string $email The user's email (optional).
  * @return int The new user's ID.
- * @deprecated
+ * @deprecated Use wp_create_user()
+ * @see wp_create_user()
  */
 function create_user($username, $password, $email) {
+	wp_mark_deprecated( __FUNCTION__, 'wp_create_user()' );
 	return wp_create_user($username, $password, $email);
 }
 
Index: wp-includes/rss-functions.php
===================================================================
--- wp-includes/rss-functions.php	(revision 6446)
+++ wp-includes/rss-functions.php	(working copy)
@@ -1,4 +1,6 @@
 <?php
 // Deprecated.  Use rss.php instead.
+
+wp_mark_deprecated( basename(__FILE__), 'rss.php' );
 require_once (ABSPATH . WPINC . '/rss.php');
 ?>
Index: wp-settings.php
===================================================================
--- wp-settings.php	(revision 6446)
+++ wp-settings.php	(working copy)
@@ -156,7 +156,7 @@
 if (defined('WP_DEBUG') and WP_DEBUG == true) {
    error_reporting(E_ALL);
 } else {
-   error_reporting(E_ALL ^ E_NOTICE);
+   error_reporting(E_ALL ^ E_NOTICE ^ E_USER_NOTICE);
 }
 
 // For an advanced caching plugin to use, static because you would only want one
