View other's drafts. Still need author editing on the advanced edit form.
git-svn-id: http://svn.automattic.com/wordpress/trunk@1647 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
eec208f7bd
commit
d4e180f075
wp-admin
|
@ -25,9 +25,33 @@ if ($drafts) {
|
|||
?>
|
||||
.</p>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
if (1 < $user_level) {
|
||||
$editable = $wpdb->get_col("SELECT ID FROM $wpdb->users WHERE user_level <= '$user_level' AND ID != $user_ID");
|
||||
$editable = join($editable, ',');
|
||||
$other_drafts = $wpdb->get_results("SELECT ID, post_title FROM $wpdb->posts WHERE post_status = 'draft' AND post_author IN ($editable) ");
|
||||
if ($other_drafts) {
|
||||
?>
|
||||
<div class="wrap">
|
||||
<p><strong><?php _e('Other’s Drafts:') ?></strong>
|
||||
<?php
|
||||
$i = 0;
|
||||
foreach ($other_drafts as $draft) {
|
||||
if (0 != $i)
|
||||
echo ', ';
|
||||
$draft->post_title = stripslashes($draft->post_title);
|
||||
if ($draft->post_title == '')
|
||||
$draft->post_title = sprintf(__('Post #%s'), $draft->ID);
|
||||
echo "<a href='post.php?action=edit&post=$draft->ID' title='" . __('Edit this draft') . "'>$draft->post_title</a>";
|
||||
++$i;
|
||||
}
|
||||
?>
|
||||
.</p>
|
||||
</div>
|
||||
<?php } } ?>
|
||||
|
||||
<div class="wrap">
|
||||
<?php
|
||||
if( isset( $_GET['m'] ) )
|
||||
|
|
Loading…
Reference in New Issue