]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-admin/press-this.php
Wordpress 3.0.6
[autoinstalls/wordpress.git] / wp-admin / press-this.php
index a1a6f780d0f242ac68f1e9395f72d00cad57a10b..04f8d0f58ba44e7bb6952987438021fd402a5190 100644 (file)
@@ -52,7 +52,12 @@ function press_it() {
                }
        }
        // set the post_content and status
-       $quick['post_status'] = isset($_POST['publish']) ? 'publish' : 'draft';
+       if ( isset( $_POST['publish'] ) && current_user_can( 'publish_posts' ) )
+               $quick['post_status'] = 'publish';
+       elseif ( isset( $_POST['review'] ) )
+               $quick['post_status'] = 'pending';
+       else
+               $quick['post_status'] = 'draft';
        $quick['post_content'] = $content;
        // error handling for media_sideload
        if ( is_wp_error($upload) ) {
@@ -522,7 +527,7 @@ var photostorage = false;
                                                                </label>
                                                                <?php wp_dropdown_categories( array( 'taxonomy' => 'category', 'hide_empty' => 0, 'name' => 'newcategory_parent', 'orderby' => 'name', 'hierarchical' => 1, 'show_option_none' => '&mdash; ' . $tax->labels->parent_item . ' &mdash;', 'tab_index' => 3 ) ); ?>
                                                                <input type="button" id="category-add-submit" class="add:categorychecklist:category-add button category-add-sumbit" value="<?php echo esc_attr( $tax->labels->add_new_item ); ?>" tabindex="3" />
-                                                               <?php wp_nonce_field( 'add-category', '_ajax_nonce', false ); ?>
+                                                               <?php wp_nonce_field( 'add-category', '_ajax_nonce-add-category', false ); ?>
                                                                <span id="category-ajax-response"></span>
                                                        </p>
                                                </div>