示例#1
0
 */
if ($can_edit_posts || $can_edit_pages || $can_edit_categories) {
    echo '<h2 class="accessible">' . __('Manage') . "</h2>\n";
    echo '<ul id="managemenu" title="' . __('Manage') . '"';
    if ($goto == 'managemenu' && $this->iscompat) {
        echo ' selected="true"';
    }
    echo ">\n";
    if (file_exists(ABSPATH . 'wp-admin/includes/admin.php')) {
        require_once ABSPATH . 'wp-admin/includes/admin.php';
    } else {
        require_once ABSPATH . 'wp-admin/admin-db.php';
    }
    $count_info = array();
    $count_info[20] = count(get_users_drafts($userdata->ID));
    $count_info[30] = function_exists('get_others_pending') ? count(get_others_pending($userdata->ID)) : 0;
    $count_info[40] = function_exists('get_others_drafts') ? count(get_others_drafts($userdata->ID)) : 0;
    // Allows plugin developers to add or overwrite the count info
    $count_info = apply_filters('wphone_managemenu_countlist', $count_info);
    $this->show_submenu('manage', $count_info, FALSE);
    echo "</ul>\n";
}
/**
 * USER MENU
 */
if ($can_edit_users) {
    echo '<h2 class="accessible">' . __('Users') . "</h2>\n";
    echo '<ul id="usersmenu" title="' . __('Users') . '"';
    if ($goto == 'usersmenu' && $this->iscompat) {
        echo ' selected="true"';
    }
示例#2
0
    ?>
</strong> <a href="<?php 
    echo get_permalink($_GET['posted']);
    ?>
"><?php 
    _e('View post &raquo;');
    ?>
</a></p></div>
<?php 
}
?>


<?php 
$my_drafts = get_users_drafts($user_ID);
$pending = get_others_pending($user_ID);
$others_drafts = get_others_drafts($user_ID);
$nag_posts_limit = (int) apply_filters('nag_posts_limit', 3);
$nag_posts = array(array('my_drafts', __('Your Drafts:'), 'edit.php?post_status=draft&amp;author=' . $user_ID, count($my_drafts)), array('pending', __('Pending Review:'), 'edit.php?post_status=pending', count($pending)), array('others_drafts', __('Others&#8217; Drafts:'), 'edit.php?post_status=draft&author=-' . $user_ID, count($others_drafts)));
if (!empty($my_drafts) || !empty($pending) || !empty($others_drafts)) {
    echo '<div class="wrap" id="draft-nag">';
    foreach ($nag_posts as $nag) {
        if (${$nag[0]}) {
            echo '<p><strong>' . wp_specialchars($nag[1]) . '</strong> ';
            $i = 0;
            foreach (${$nag[0]} as $post) {
                $i++;
                if ($i > $nag_posts_limit) {
                    break;
                }
                echo '<a href="post.php?action=edit&amp;post=' . $post->ID . '">';
示例#3
0
 function get_drafts()
 {
     global $current_user;
     $my_drafts = get_users_drafts($current_user->id);
     $my_scheduled = $this->get_users_future($current_user->id);
     $pending = get_others_pending($current_user->id);
     $others_drafts = get_others_drafts($current_user->id);
     $drafts_struct = array(array(__('Your Drafts:', 'shareadraft'), count($my_drafts), $my_drafts), array(__('Your Scheduled Posts:', 'shareadraft'), count($my_scheduled), $my_scheduled), array(__('Pending Review:', 'shareadraft'), count($pending), $pending), array(__('Others&#8217; Drafts:', 'shareadraft'), count($others_drafts), $others_drafts));
     return $drafts_struct;
 }
示例#4
0
                    // author exclusion
                    $page_header .= ' ' . __('by other authors');
                } else {
                    $author_user = get_userdata($author);
                    $page_header .= ' ' . sprintf(__('by %s'), wp_specialchars($author_user->display_name));
                }
            } else {
                $limit = 50;
                // get_others_drafts does not support offset
                $entries = get_others_drafts($user_ID);
            }
            break;
        case 'pending':
            $limit = 50;
            // get_others_pending does not support offset
            $entries = get_others_pending($user_ID);
            $page_header = __('Pending Review');
            break;
        default:
            $entries = get_posts('numberposts=' . $query_limit . "&offset={$offset}&order=DESC");
            $page_header = __('Posts');
    }
    $previous_caption = __('&laquo; Previous Entries');
    $next_caption = __('Next Entries &raquo;');
    $more_caption = __('More Entries', 'wphone');
    $parent = 'edit';
}
if (!$this->iscompat || $offset < $limit) {
    echo '<h2 class="accessible">' . $page_header . '</h2>' . "\n";
    echo '<ul id="' . $this->context . 'listmenu" title="' . $page_header . '"';
    if ($this->iscompat) {