<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.1" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
		>
	<channel>
		<title>WordPress Ideas &#187; Topic: Recent drafts on dashboard - see drafts and pendings of all users</title>
		<link>http://wordpress.org/ideas/topic/recent-drafts-on-dashboard-see-drafts-and-pendings-of-all-users</link>
		<description>WordPress Ideas &#187; Topic: Recent drafts on dashboard - see drafts and pendings of all users</description>
		<language>en-US</language>
		<pubDate>Tue, 21 May 2013 12:47:25 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.1</generator>
				<atom:link href="http://wordpress.org/ideas/rss/topic/recent-drafts-on-dashboard-see-drafts-and-pendings-of-all-users" rel="self" type="application/rss+xml" />

		<item>
			<title>Sven on "Recent drafts on dashboard - see drafts and pendings of all users"</title>
			<link>http://wordpress.org/ideas/topic/recent-drafts-on-dashboard-see-drafts-and-pendings-of-all-users#post-22527</link>
			<pubDate>Mon, 23 Jul 2012 08:56:38 +0000</pubDate>
			<dc:creator>Sven</dc:creator>
			<guid isPermaLink="false">22527@http://wordpress.org/ideas/</guid>
			<description><![CDATA[<p>Thanks a lot. It is great, for handling our editors that really makes sense.
</p>]]></description>
					</item>
		<item>
			<title>Suchmaschinen Positionierung on "Recent drafts on dashboard - see drafts and pendings of all users"</title>
			<link>http://wordpress.org/ideas/topic/recent-drafts-on-dashboard-see-drafts-and-pendings-of-all-users#post-21898</link>
			<pubDate>Tue, 01 May 2012 21:05:35 +0000</pubDate>
			<dc:creator>Suchmaschinen Positionierung</dc:creator>
			<guid isPermaLink="false">21898@http://wordpress.org/ideas/</guid>
			<description><![CDATA[<p>Thanks for the changes :)</p>
<p>Looking good to me
</p>]]></description>
					</item>
		<item>
			<title>Jon Lynch on "Recent drafts on dashboard - see drafts and pendings of all users"</title>
			<link>http://wordpress.org/ideas/topic/recent-drafts-on-dashboard-see-drafts-and-pendings-of-all-users#post-21109</link>
			<pubDate>Fri, 20 Jan 2012 19:03:59 +0000</pubDate>
			<dc:creator>Jon Lynch</dc:creator>
			<guid isPermaLink="false">21109@http://wordpress.org/ideas/</guid>
			<description><![CDATA[<p>I have made some minor changes to the above and then published it as a plugin available at <a href="http://wordpress.org/extend/plugins/better-recent-drafts/">the plugin repository.</a></p>
<p>Hope you don't mind Marco?
</p>]]></description>
					</item>
		<item>
			<title>Marco on "Recent drafts on dashboard - see drafts and pendings of all users"</title>
			<link>http://wordpress.org/ideas/topic/recent-drafts-on-dashboard-see-drafts-and-pendings-of-all-users#post-19183</link>
			<pubDate>Tue, 26 Apr 2011 20:17:25 +0000</pubDate>
			<dc:creator>Marco</dc:creator>
			<guid isPermaLink="false">19183@http://wordpress.org/ideas/</guid>
			<description><![CDATA[<p>Id like to have a better recent draft widget on the dashboard. Best would be on that I can customize in the options menu. </p>
<p>I got a blog with me as admin, one editor and a lot of journalists.</p>
<p>The editor and me should see all drafts and pendings on the dashboard to edit and publish them.</p>
<p>I "hacked" the code for this option into my wordpress. Here is the code I use right now:</p>
<pre><code>function wp_dashboard_recent_drafts( $drafts = false ) {
	if ( !$drafts ) {
		$pendings_query = new WP_Query( array(
			&#039;post_type&#039; =&#62; &#039;post&#039;,
			&#039;post_status&#039; =&#62; &#039;pending&#039;,
			&#039;posts_per_page&#039; =&#62; 150,
			&#039;orderby&#039; =&#62; &#039;modified&#039;,
			&#039;order&#039; =&#62; &#039;DESC&#039;
		) );
		$pendings =&#38; $pendings_query-&#62;posts;

		$drafts_query = new WP_Query( array(
			&#039;post_type&#039; =&#62; &#039;post&#039;,
			&#039;post_status&#039; =&#62; &#039;draft&#039;,
			&#039;posts_per_page&#039; =&#62; 150,
			&#039;orderby&#039; =&#62; &#039;modified&#039;,
			&#039;order&#039; =&#62; &#039;DESC&#039;
		) );
		$drafts =&#38; $drafts_query-&#62;posts;
	}

	if ( $drafts &#38;&#38; is_array( $drafts ) &#124;&#124; $pendings &#38;&#38; is_array( $pendings )) {
		$list = array();
		foreach ( $pendings as $pending ) {
			$url = get_edit_post_link( $pending-&#62;ID );
			$title = _draft_or_post_title( $pending-&#62;ID );
			$last_id = get_post_meta( $pending-&#62;ID, &#039;_edit_last&#039;, true);
			$last_user = get_userdata($last_id);
			$last_modified = &#039;&#60;i&#62;&#039; . esc_html( $last_user-&#62;display_name ) . &#039;&#60;/i&#62;&#039;;
			$item = &#039;&#60;h4&#62;&#60;a href=&#34;&#039; . $url . &#039;&#34; title=&#34;&#039; . sprintf( __( &#039;Edit &#8220;%s&#8221;&#039; ), esc_attr( $title ) ) . &#039;&#34;&#62;&#039; . esc_html($title) . &#039;&#60;/a&#62;&#039; . &#039;&#60;abbr&#62; &#039; . __(&#039;Pending&#039;) . &#039;&#60;/abbr&#62;&#039; . &#039;&#60;abbr style=&#34;display:block;margin-left:0;&#34;&#62;&#039; . sprintf(__(&#039;Last edited by %1$s on %2$s at %3$s&#039;), $last_modified, mysql2date(get_option(&#039;date_format&#039;), $pending-&#62;post_modified), mysql2date(get_option(&#039;time_format&#039;), $pending-&#62;post_modified)) . &#039;&#60;/abbr&#62;&#60;/h4&#62;&#039;;
			if ( $the_content = preg_split( &#039;#\s#&#039;, strip_tags( $pending-&#62;post_content ), 11, PREG_SPLIT_NO_EMPTY ) )
				$item .= &#039;&#60;p&#62;&#039; . join( &#039; &#039;, array_slice( $the_content, 0, 10 ) ) . ( 10 &#60; count( $the_content ) ? &#039;&#38;hellip;&#039; : &#039;&#039; ) . &#039;&#60;/p&#62;&#039;;
			$list[] = $item;
		}
		foreach ( $drafts as $draft ) {
			$url = get_edit_post_link( $draft-&#62;ID );
			$title = _draft_or_post_title( $draft-&#62;ID );
			$last_id = get_post_meta( $draft-&#62;ID, &#039;_edit_last&#039;, true);
			$last_user = get_userdata($last_id);
			$last_modified = &#039;&#60;i&#62;&#039; . esc_html( $last_user-&#62;display_name ) . &#039;&#60;/i&#62;&#039;;
			$item = &#039;&#60;h4&#62;&#60;a href=&#34;&#039; . $url . &#039;&#34; title=&#34;&#039; . sprintf( __( &#039;Edit &#8220;%s&#8221;&#039; ), esc_attr( $title ) ) . &#039;&#34;&#62;&#039; . esc_html($title) . &#039;&#60;/a&#62;&#039; . &#039;&#60;abbr&#62; &#039; .  __(&#039;Draft&#039;) . &#039;&#60;/abbr&#62;&#039; . &#039;&#60;abbr style=&#34;display:block;margin-left:0;&#34;&#62;&#039; . sprintf(__(&#039;Last edited by %1$s on %2$s at %3$s&#039;), $last_modified, mysql2date(get_option(&#039;date_format&#039;), $draft-&#62;post_modified), mysql2date(get_option(&#039;time_format&#039;), $draft-&#62;post_modified)) . &#039;&#60;/abbr&#62;&#60;/h4&#62;&#039;;
			if ( $the_content = preg_split( &#039;#\s#&#039;, strip_tags( $draft-&#62;post_content ), 11, PREG_SPLIT_NO_EMPTY ) )
				$item .= &#039;&#60;p&#62;&#039; . join( &#039; &#039;, array_slice( $the_content, 0, 10 ) ) . ( 10 &#60; count( $the_content ) ? &#039;&#38;hellip;&#039; : &#039;&#039; ) . &#039;&#60;/p&#62;&#039;;
			$list[] = $item;
		}
?&#62;
	&#60;ul&#62;
		&#60;li&#62;&#60;?php echo join( &#34;&#60;/li&#62;\n&#60;li&#62;&#34;, $list ); ?&#62;&#60;/li&#62;
	&#60;/ul&#62;
&#60;?php
	} else {
		_e(&#039;There are no drafts at the moment&#039;);
	}</code></pre>]]></description>
					</item>

	</channel>
</rss>
