WordPress.org

Make WordPress Core

Ticket #8547: dashboard.patch

File dashboard.patch, 1.7 KB (added by mrmist, 12 years ago)

includes dashboard patch

  • dashboard.php

     
    292292                $view = get_permalink( $_POST['post_ID'] );
    293293                $edit = clean_url( get_edit_post_link( $_POST['post_ID'] ) );
    294294                if ( 'post-quickpress-publish' == $_POST['action'] ) {
    295                         printf( '<div class="message"><p>' . __( 'Post Published. <a href="%s">View post</a> | <a href="%s">Edit post</a>' ) . '</p></div>', clean_url( $view ), $edit );
     295                        if ( current_user_can ('publish_posts')) {
     296                                printf( '<div class="message"><p>' . __( 'Post Published. <a href="%s">View post</a> | <a href="%s">Edit post</a>' ) . '</p></div>', clean_url( $view ), $edit );
     297                        } else {
     298                                printf( '<div class="message"><p>' . __( 'Post Submitted for review. <a href="%s">View post</a> | <a href="%s">Edit post</a>' ) . '</p></div>', clean_url( $view ), $edit );
     299                        }
    296300                } else {
    297301                        printf( '<div class="message"><p>' . __( 'Draft Saved. <a href="%s">Preview post</a> | <a href="%s">Edit post</a>' ) . '</p></div>', clean_url( add_query_arg( 'preview', 1, $view ) ), $edit );
    298302                        $drafts_query = new WP_Query( array(
     
    321325                        <input type="text" name="post_title" id="title" tabindex="1" autocomplete="off" value="<?php echo attribute_escape( $post->post_title ); ?>" />
    322326                </div>
    323327
     328                <? if  ( current_user_can( 'upload_files' ) ) {?>
    324329                <div id="media-buttons" class="hide-if-no-js">
    325330                        <?php do_action( 'media_buttons' ); ?>
    326331                </div>
    327 
     332                <?php } ?>
    328333                <h4 id="content-label"><label for="content"><?php _e('Content') ?></label></h4>
    329334                <div class="textarea-wrap">
    330335                        <textarea name="content" id="content" class="mceEditor" rows="3" cols="15" tabindex="2"><?php echo $post->post_content; ?></textarea>