Changeset 8943

Show
Ignore:
Timestamp:
09/21/08 19:45:45 (2 months ago)
Author:
azaozz
Message:

Sytling and improvements to inline editing, see #6815

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/wp-admin/admin-ajax.php

    r8917 r8943  
    716716    if ( is_array($hidden) ) 
    717717        update_usermeta($current_user->ID, "manage-$page-columns-hidden", $hidden); 
     718break; 
    718719case 'get-permalink': 
    719720    check_ajax_referer( 'getpermalink', 'getpermalinknonce' ); 
     
    728729    die(get_sample_permalink_html($post_id, $title, $slug)); 
    729730break; 
    730 case 'inline-data': 
    731     check_ajax_referer( 'inlineeditnonce', 'inline_edit_nonce' ); 
    732  
    733     if ( isset($_POST['posts']) ) 
    734         get_inline_data( explode(',', $_POST['posts']) ); 
    735  
    736     die(); 
    737 break; 
    738731case 'inline-save': 
    739     check_ajax_referer( 'inlineeditnonce', 'inline_edit_nonce' ); 
     732    check_ajax_referer( 'inlineeditnonce', '_inline_edit' ); 
    740733     
    741734    if ( ! isset($_POST['post_ID']) ) 
     
    754747    } 
    755748    die(); 
    756 break; 
     749   break; 
    757750case 'meta-box-order': 
    758751    check_ajax_referer( 'meta-box-order' ); 
  • trunk/wp-admin/css/colors-classic.css

    r8909 r8943  
    807807} 
    808808 
    809 #replydiv { 
     809#replydiv, 
     810.inline-editor .quick-edit-div { 
    810811    border-color: #EBEBEB #CCC #CCC #EBEBEB; 
    811812    background-color: #fff; 
     
    822823} 
    823824 
    824 /* table vim shorcuts */ 
     825/* table vim shortcuts */ 
    825826.vim-current { 
    826827    background-color: #CFEBF7 !important; 
     
    844845    background-color: #cee1ef; 
    845846} 
     847 
     848/* inline editor */ 
     849.inline-editor input, 
     850.inline-editor textarea { 
     851    border-color: #ddd; 
     852} 
     853 
     854.inline-editor div.title { 
     855    background-color: #CFEBF7; 
     856} 
     857 
     858.inline-editor ul.cat-checklist { 
     859    background-color: #FFFFFF; 
     860} 
     861 
     862.inline-editor .categories .catshow, 
     863.inline-editor .categories .cathide { 
     864    color: #2583AD; 
     865} 
     866 
     867.inline-editor .quick-edit-save { 
     868    background-color: #CFEBF7; 
     869} 
  • trunk/wp-admin/css/colors-fresh.css

    r8909 r8943  
    790790} 
    791791 
    792 #replydiv { 
     792#replydiv, 
     793.inline-editor .quick-edit-div { 
    793794    border-color: #EBEBEB #CCC #CCC #EBEBEB; 
    794795    background-color: #fff; 
     
    805806} 
    806807 
    807 /* table vim shorcuts */ 
     808/* table vim shortcuts */ 
    808809.vim-current { 
    809810    background-color: #E4F2FD !important; 
     
    827828    background-color: #cee1ef; 
    828829} 
     830 
     831/* inline editor */ 
     832.inline-editor input, 
     833.inline-editor textarea { 
     834    border-color: #ddd; 
     835} 
     836 
     837.inline-editor div.title { 
     838    background-color: #EAF3FA; 
     839} 
     840 
     841.inline-editor ul.cat-checklist { 
     842    background-color: #FFFFFF; 
     843} 
     844 
     845.inline-editor .categories .catshow, 
     846.inline-editor .categories .cathide { 
     847    color: #2583AD; 
     848} 
     849 
     850.inline-editor .quick-edit-save { 
     851    background-color: #EAF3FA; 
     852} 
  • trunk/wp-admin/edit-pages.php

    r8923 r8943  
    190190if ($posts) { 
    191191?> 
    192 <table class="widefat"> 
     192<table class="widefat page"> 
    193193  <thead> 
    194194  <tr> 
  • trunk/wp-admin/edit-post-rows.php

    r8923 r8943  
    99if ( ! defined('ABSPATH') ) die(); 
    1010?> 
    11 <table class="widefat"> 
     11<table class="widefat post"> 
    1212    <thead> 
    1313    <tr> 
  • trunk/wp-admin/edit.php

    r8883 r8943  
    186186<div class="alignleft"> 
    187187<select name="action"> 
    188 <option value="" selected><?php _e('Actions'); ?></option> 
     188<option value="" selected="selected"><?php _e('Actions'); ?></option> 
    189189<option value="edit"><?php _e('Edit'); ?></option> 
    190190<option value="delete"><?php _e('Delete'); ?></option> 
  • trunk/wp-admin/includes/template.php

    r8940 r8943  
    8787        $actions['edit'] = '<a href="' . $edit_link . '">' . __('Edit') . '</a>'; 
    8888        if ( $default_cat_id != $category->term_id ) 
    89             $actions['delete'] = "<a class='submitdelete' href='" . wp_nonce_url("categories.php?action=delete&amp;cat_ID=$category->term_id", 'delete-category_' . $category->term_id) . "' onclick=\"if ( confirm('" . js_escape(sprintf(__("You are about to delete this category '%s'\n 'Cancel' to stop, 'OK' to delete."), $name )) . "') ) { return true;}return false;\">" . __('Delete') . "</a>"; 
     89            $actions['delete'] = "<a class='submitdelete' href='" . wp_nonce_url("categories.php?action=delete&amp;cat_ID=$category->term_id", 'delete-category_' . $category->term_id) . "' onclick=\"if ( confirm('" . js_escape(sprintf(__("You are about to delete this category '%s'\n 'Cancel' to stop, 'OK' to delete."), $name )) . "') ) { return true;}return false;\">" . __('Delete') . "</a>"; 
    9090        $action_count = count($actions); 
    9191        $i = 0; 
     
    158158        $actions['edit'] = '<a href="' . $edit_link . '">' . __('Edit') . '</a>'; 
    159159        if ( $default_cat_id != $category->term_id ) 
    160             $actions['delete'] = "<a class='submitdelete' href='" . wp_nonce_url("link-category.php?action=delete&amp;cat_ID=$category->term_id", 'delete-link-category_' . $category->term_id) . "' onclick=\"if ( confirm('" . js_escape(sprintf(__("You are about to delete this category '%s'\n 'Cancel' to stop, 'OK' to delete."), $name )) . "') ) { return true;}return false;\">" . __('Delete') . "</a>"; 
     160            $actions['delete'] = "<a class='submitdelete' href='" . wp_nonce_url("link-category.php?action=delete&amp;cat_ID=$category->term_id", 'delete-link-category_' . $category->term_id) . "' onclick=\"if ( confirm('" . js_escape(sprintf(__("You are about to delete this category '%s'\n 'Cancel' to stop, 'OK' to delete."), $name )) . "') ) { return true;}return false;\">" . __('Delete') . "</a>"; 
    161161        $action_count = count($actions); 
    162162        $i = 0; 
     
    188188        switch ($column_name) { 
    189189            case 'cb': 
    190                $output .= "<th scope='row' class='check-column'>"; 
    191                if ( absint( get_option( 'default_link_category' ) ) != $category->term_id ) { 
    192                   $output .= "<input type='checkbox' name='delete[]' value='$category->term_id' />"; 
    193                } else { 
    194                   $output .= "&nbsp;"; 
    195                
    196                $output .= "</th>"; 
    197                break; 
     190               $output .= "<th scope='row' class='check-column'>"; 
     191               if ( absint( get_option( 'default_link_category' ) ) != $category->term_id ) { 
     192                  $output .= "<input type='checkbox' name='delete[]' value='$category->term_id' />"; 
     193               } else { 
     194                  $output .= "&nbsp;"; 
     195               
     196               $output .= "</th>"; 
     197               break; 
    198198            case 'name': 
    199199                $output .= "<td $attributes>$edit</td>"; 
     
    250250 
    251251        $class = in_array( $category->term_id, $popular_cats ) ? ' class="popular-category"' : ''; 
    252         $output .= "\n<li id='category-$category->term_id'$class>" . '<label for="in-category-' . $category->term_id . '" class="selectit"><input value="' . $category->term_id . '" type="checkbox" name="post_category[]" id="in-category-' . $category->term_id . '"' . (in_array( $category->term_id, $selected_cats ) ? ' checked="checked"' : "" ) . '/> ' . wp_specialchars( apply_filters('the_category', $category->name )) . '</label>'; 
     252        $output .= "\n<li id='category-$category->term_id'$class>" . '<label class="selectit"><input value="' . $category->term_id . '" type="checkbox" name="post_category[]" id="in-category-' . $category->term_id . '"' . (in_array( $category->term_id, $selected_cats ) ? ' checked="checked"' : "" ) . '/> ' . wp_specialchars( apply_filters('the_category', $category->name )) . '</label>'; 
    253253    } 
    254254 
     
    316316 
    317317        <li id="<?php echo $id; ?>" class="popular-category"> 
    318             <label class="selectit" for="in-<?php echo $id; ?>"
     318            <label class="selectit"
    319319            <input id="in-<?php echo $id; ?>" type="checkbox" value="<?php echo (int) $category->term_id; ?>" /> 
    320320                <?php echo wp_specialchars( apply_filters( 'the_category', $category->name ) ); ?> 
     
    370370 
    371371        $name = apply_filters( 'term_name', $tag->name ); 
    372         $edit_link = "edit-tags.php?action=edit&amp;tag_ID=$tag->term_id";  
     372        $edit_link = "edit-tags.php?action=edit&amp;tag_ID=$tag->term_id"; 
    373373        $out = ''; 
    374374        $out .= '<tr id="tag-' . $tag->term_id . '"' . $class . '>'; 
     
    389389                    break; 
    390390                case 'name': 
    391                     $out .= '<td ' . $attributes . '><strong><a class="row-title" href="' . $edit_link . '" title="' . attribute_escape(sprintf(__('Edit "%s"'), $name)) . '">' . $name . '</a></strong><br />'; 
     391                    $out .= '<td ' . $attributes . '><strong><a class="row-title" href="' . $edit_link . '" title="' . attribute_escape(sprintf(__('Edit "%s"'), $name)) . '">' . $name . '</a></strong><br />'; 
    392392                    $actions = array(); 
    393393                    $actions['edit'] = '<a href="' . $edit_link . '">' . __('Edit') . '</a>'; 
    394                     $actions['delete'] = "<a class='submitdelete' href='" . wp_nonce_url("edit-tags.php?action=delete&amp;tag_ID=$tag->term_id", 'delete-tag_' . $tag->term_id) . "' onclick=\"if ( confirm('" . js_escape(sprintf(__("You are about to delete this tag '%s'\n 'Cancel' to stop, 'OK' to delete."), $name )) . "') ) { return true;}return false;\">" . __('Delete') . "</a>"; 
     394                    $actions['delete'] = "<a class='submitdelete' href='" . wp_nonce_url("edit-tags.php?action=delete&amp;tag_ID=$tag->term_id", 'delete-tag_' . $tag->term_id) . "' onclick=\"if ( confirm('" . js_escape(sprintf(__("You are about to delete this tag '%s'\n 'Cancel' to stop, 'OK' to delete."), $name )) . "') ) { return true;}return false;\">" . __('Delete') . "</a>"; 
    395395                    $action_count = count($actions); 
    396396                    $i = 0; 
     
    572572 
    573573function print_column_headers( $type ) { 
    574     $columns = get_column_headers( $type );  
     574    $columns = get_column_headers( $type ); 
    575575    $hidden = (array) get_user_option( "manage-$type-columns-hidden" ); 
    576576    $styles = array(); 
     
    603603        $style = ' style="' . $style . '"'; 
    604604?> 
    605     <th scope="col"<?php echo "id=\"$column_key\""; echo $class; echo $style?>><?php echo $column_display_name; ?></th> 
     605    <th scope="col" <?php echo "id=\"$column_key\""; echo $class; echo $style?>><?php echo $column_display_name; ?></th> 
    606606<?php } 
    607607} 
    608608 
    609609function inline_edit_row( $type ) { 
    610     global $current_user
    611  
    612     if ( 'post' == $type )  
    613        $post = get_default_post_to_edit();  
    614     else  
    615        $post = get_default_page_to_edit();   
    616  
    617     echo '<tr id="inline-edit" style="display: none">'; 
    618     $columns = $type == 'post' ? wp_manage_posts_columns() : wp_manage_pages_columns(); 
     610    global $current_user, $mode
     611 
     612    $is_page = 'page' == $type; 
     613    if ( $is_page ) 
     614       $post = get_default_page_to_edit(); 
     615    else 
     616        $post = get_default_post_to_edit(); 
     617 
     618    $columns = $is_page ? wp_manage_pages_columns() : wp_manage_posts_columns(); 
    619619    $hidden = (array) get_user_option( "manage-$type-columns-hidden" ); 
     620    $hidden_count = empty($hidden[0]) ? 0 : count($hidden); 
     621    $col_count = count($columns) - $hidden_count; 
     622    $m = ( isset($mode) && 'excerpt' == $mode ) ? 'excerpt' : 'list'; 
     623    ?> 
     624    <tr title="<?php _e('Double-click to cancel'); ?>" id="inline-edit" style="display: none"><td colspan="<?php echo $col_count; ?>"> 
     625    <?php 
    620626    foreach($columns as $column_name=>$column_display_name) { 
    621         $class = "class=\"$column_name column-$column_name\""; 
     627        $class = "class=\"$column_name column-$column_name quick-edit-div\""; 
    622628 
    623629        $style = ''; 
     
    628634 
    629635        switch($column_name) { 
    630  
    631             case 'cb': ?> 
    632               <th class="check-column"></th> 
    633               <?php 
    634               break; 
     636            case 'cb': 
     637                break; 
    635638 
    636639            case 'modified': 
    637640            case 'date': 
    638                 $attributes = 'class="date column-date"' . $style; 
    639641            ?> 
    640                 <td class="date"<?php echo $style ?>> 
     642                <div <?php echo $attributes; ?> title="<?php _e('Timestamp'); ?>"> 
     643                    <div class="title"><?php _e('Timestamp'); ?></div> 
     644                    <div class="in"> 
    641645                    <?php touch_time(1, 1, 4, 1); ?> 
    642                 </td> 
     646                    </div> 
     647                </div> 
    643648                <?php 
    644649                break; 
    645650 
    646651            case 'title': 
    647                 $attributes = "class=\"$type-title column-title\"" . $style; 
    648             ?
    649                 <td <?php echo $attributes ?>
    650                     <?php wp_nonce_field( 'inlineeditnonce', 'inline_edit_nonce', false ) ?
    651                     <div class="title"
    652                        <input type="text" name="post_title" class="title" value="" /><br /
    653                        <label><?php _e('Slug'); ?></label><input type="text" name="post_name" value="" class="slug" /
     652                $attributes = "class=\"$type-title column-title quick-edit-div\"" . $style; ?> 
     653               <div <?php echo $attributes ?>
     654                   <div class="title"><?php _e('Title'); ?></div
     655                    <div class="in"
     656                    <label title="<?php _e('Title'); ?>"><input type="text" name="post_title" class="ptitle" value="" /></label><br /
     657                    <div class="slug"
     658                    <label title="<?php _e('Slug'); ?>"><?php _e('Slug'); ?><input type="text" name="post_name" value="" /></label></div
    654659                    </div> 
    655                     <?php if ($type == 'page'): ?> 
    656                     <div class="other"> 
    657                         <label><?php _e('Parent'); ?></label> 
    658                         <select name="post_parent"> 
    659                             <option value="0"><?php _e('Main Page (no parent)'); ?></option> 
    660                             <?php parent_dropdown(); ?> 
    661                         </select><br /> 
    662                         <label><?php _e('Template'); ?></label> 
    663                         <select name="page_template"> 
    664                             <option value='default'><?php _e('Default Template'); ?></option> 
    665                             <?php page_template_dropdown() ?> 
    666                         </select> 
     660                </div> 
     661                <?php if ( $is_page ) { ?> 
     662                <div class="parent quick-edit-div" title="<?php _e('Page Parent'); ?>"> 
     663                    <div class="title"><?php _e('Page Parent'); ?></div> 
     664                    <div class="in"> 
     665                    <select name="post_parent"> 
     666                        <option value="0"><?php _e('Main Page (no parent)'); ?></option> 
     667                        <?php parent_dropdown(); ?> 
     668                    </select> 
    667669                    </div> 
    668                     <div class="more"> 
    669                         <label><?php _e('Order'); ?></label><input type="text" name="menu_order" value="<?php echo $post->menu_order ?>" /> 
    670                         <label><?php _e('Password'); ?></label><input type="text" name="post_password" value="<?php echo $post->post_password ?>" />       
     670                </div> 
     671                <div class="template quick-edit-div" title="<?php _e('Page Template'); ?>"> 
     672                    <div class="title"><?php _e('Page Template'); ?></div> 
     673                    <div class="in"> 
     674                    <select name="page_template"> 
     675                        <option value='default'><?php _e('Default Template'); ?></option> 
     676                        <?php page_template_dropdown() ?> 
     677                    </select> 
    671678                    </div> 
    672                     <?php endif; ?> 
    673                     <div class="clear"></div> 
    674                     <div class="save"> 
    675                     <?php 
    676                     $actions = array(); 
    677                     $actions['save'] = '<a href="#">' . __('Save') . '</a>'; 
    678                     $actions['cancel'] = '<a href="#">' . __('Cancel') . '</a>'; 
    679                     $action_count = count($actions); 
    680                     $i = 0; 
    681                     foreach ( $actions as $action => $link ) { 
    682                         ++$i; 
    683                         ( $i == $action_count ) ? $sep = '' : $sep = ' | '; 
    684                         echo "<span class='$action'>$link$sep</span>"; 
    685                     } 
    686                     ?> 
     679                </div> 
     680                <div class="order quick-edit-div" title="<?php _e('Page Order'); ?>"> 
     681                    <div class="title"><?php _e('Page Order'); ?></div> 
     682                    <div class="in"> 
     683                    <input type="text" name="menu_order" value="<?php echo $post->menu_order ?>" /> 
    687684                    </div> 
    688                 </td> 
     685                </div> 
     686                <?php } 
     687 
     688                break; 
     689 
     690            case 'categories': ?> 
     691                <div <?php echo $attributes ?> title="<?php _e('Categories'); ?>"> 
     692                    <div class="title"><?php _e('Categories'); ?> 
     693                    <span class="catshow"><?php _e('(expand)'); ?></span> 
     694                    <span class="cathide" style="display:none;"><?php _e('(fold)'); ?></span></div> 
     695                    <ul class="cat-checklist"> 
     696                        <?php wp_category_checklist(); ?> 
     697                    </ul> 
     698                </div> 
    689699                <?php 
    690700                break; 
    691701 
    692             case 'categories': ?> 
    693                 <td <?php echo $attributes ?>> 
    694                     <ul class="categories"> 
    695                         <?php wp_category_checklist() ?> 
    696                     </ul> 
    697                 </td> 
     702            case 'tags': ?> 
     703                <div <?php echo $attributes ?> title="<?php _e('Tags'); ?>"> 
     704                    <div class="title"><?php _e('Tags'); ?></div> 
     705                    <div class="in"> 
     706                    <textarea cols="22" rows="1" type="text" name="tags_input" class="tags_input"></textarea> 
     707                    </div> 
     708                </div> 
    698709                <?php 
    699710                break; 
    700711 
    701             case 'tags': ?> 
    702                 <td <?php echo $attributes ?>> 
    703                     <textarea name="tags_input"></textarea> 
    704                 </td> 
     712            case 'comments': 
     713                $attributes = 'class="comments column-comments num quick-edit-div"' . $style; ?> 
     714                <div <?php echo $attributes ?> title="<?php _e('Comments and Pings'); ?>"> 
     715                    <div class="title"><?php _e('Comments and Pings'); ?></div> 
     716                    <div class="in"> 
     717                    <label><input type="checkbox" name="comment_status" value="open" /> 
     718                    <?php _e('Allow Comments'); ?></label><br /> 
     719                    <label><input type="checkbox" name="ping_status" value="open" /> 
     720                    <?php _e('Allow Pings'); ?></label> 
     721                    </div> 
     722                </div> 
    705723                <?php 
    706724                break; 
    707725 
    708             case 'comments': 
    709                 $attributes = 'class="comments column-comments num"' . $style; 
    710              ?> 
    711                 <td <?php echo $attributes ?>> 
    712                     <input title="Allow Comments" type="checkbox" name="comment_status" value="open" /><br /> 
    713                     <input title="Allow Pings" type="checkbox" name="ping_status" value="open" /> 
    714                 </td> 
     726            case 'author': 
     727                $authors = get_editable_user_ids( $current_user->id ); // TODO: ROLE SYSTEM 
     728                if ( $authors && count( $authors ) > 1 ) { ?> 
     729                <div <?php echo $attributes ?> title="<?php _e('Author'); ?>"> 
     730                    <div class="title"><?php _e('Author'); ?></div> 
     731                    <div class="in"> 
     732                    <?php wp_dropdown_users( array('include' => $authors, 'name' => 'post_author', 'class'=> 'authors', 'selected' => $post->post_author) ); ?> 
     733                    </div> 
     734                </div> 
     735                <?php } ?> 
     736 
     737                <div class="password quick-edit-div" title="<?php _e('Password'); ?>"> 
     738                    <div class="title"><?php _e('Password'); ?></div> 
     739                    <div class="in"> 
     740                    <input type="text" name="post_password" value="<?php echo $post->post_password ?>" /> 
     741                    <label title="<?php _e('Privacy'); ?>"> 
     742                    <input type="checkbox" name="keep_private" value="private" <?php checked($post->post_status, 'private'); ?> /> <?php echo $is_page ? __('Keep this page private') : __('Keep this post private'); ?></label> 
     743                    </div> 
     744                </div> 
    715745                <?php 
    716746                break; 
    717747 
    718             case 'author': ?> 
    719                 <td <?php echo $attributes ?>> 
    720                     <?php 
    721                     $authors = get_editable_user_ids( $current_user->id ); // TODO: ROLE SYSTEM 
    722                     if ( $authors && count( $authors ) > 1 ) { 
    723                         wp_dropdown_users( array('include' => $authors, 'name' => 'post_author', 'class'=> 'author', 'selected' => $post->post_author) );  
    724                     } else { 
    725                         echo $current_user->user_nicename.'<input type="hidden" value="'.$post->post_author.'" class="author" />'; 
    726                     } 
    727                     ?> 
    728                 </td> 
    729                 <?php 
    730                 break; 
    731  
    732748            case 'status': ?> 
    733                 <td <?php echo $attributes ?>> 
     749                <div <?php echo $attributes ?> title="<?php _e('Status'); ?>"> 
     750                    <div class="title"><?php _e('Status'); ?></div> 
     751                    <div class="in"> 
    734752                    <select name="post_status"> 
    735                         <?php if ( current_user_can('publish_posts') ) : // Contributors only get "Unpublished" and "Pending Review" ?> 
     753                        <?php if ( current_user_can('publish_posts') ) { // Contributors only get "Unpublished" and "Pending Review" ?> 
    736754                        <option value='publish'><?php _e('Published') ?></option> 
    737755                        <option value='future'><?php _e('Scheduled') ?></option> 
    738                         <?php endif; ?> 
     756                        <?php } ?> 
    739757                        <option value='pending'><?php _e('Pending Review') ?></option> 
    740758                        <option value='draft'><?php _e('Unpublished') ?></option> 
    741759                    </select> 
    742                     <?php if($type == 'page'): ?> 
    743                     <br /><label><input type="checkbox" name="page_private" value="private" <?php checked($post->post_status, 'private'); ?> /> <?php _e('Private') ?></label></p> 
    744                     <?php else: ?> 
    745                     <?php if ( current_user_can( 'edit_others_posts' ) ) : ?> 
    746                     <br /><label><input type="checkbox" name="sticky" value="sticky" /> <?php _e('Sticky') ?></label></p> 
    747                     <?php endif; ?> 
    748                     <?php endif; ?> 
    749                 </td> 
     760                    </div> 
     761                </div> 
     762 
     763                <?php if ( current_user_can( 'edit_others_posts' ) && ! $is_page ) { ?> 
     764                <div class="sticky quick-edit-div" <?php echo $style; ?> title="<?php _e('Sticky') ?>"> 
     765                    <div class="title"><?php _e('Sticky'); ?></div> 
     766                    <div class="in"> 
     767                    <label title="<?php _e('Sticky') ?>"> 
     768                    <input type="checkbox" name="sticky" value="sticky" /> <?php _e('Stick this post to the front page') ?></label> 
     769                    </div> 
     770                </div> 
     771                <?php } 
     772                break; 
     773 
     774            case 'control_view': ?> 
     775                <div><a href="<?php the_permalink(); ?>" rel="permalink" class="view"><?php _e('View'); ?></a></div> 
    750776                <?php 
    751777                break; 
    752778 
    753             case 'control_view': ?> 
    754                 <td><a href="<?php the_permalink(); ?>" rel="permalink" class="view"><?php _e('View'); ?></a></td
     779            case 'control_edit': ?> 
     780                <div><?php if ( current_user_can('edit_post',$post->ID) ) { echo "<a href='post.php?action=edit&amp;post=$id' class='edit'>" . __('Edit') . "</a>"; } ?></div
    755781                <?php 
    756782                break; 
    757783 
    758             case 'control_edit': ?> 
    759                 <td><?php if ( current_user_can('edit_post',$post->ID) ) { echo "<a href='post.php?action=edit&amp;post=$id' class='edit'>" . __('Edit') . "</a>"; } ?></td
     784            case 'control_delete': ?> 
     785                <div><?php if ( current_user_can('delete_post',$post->ID) ) { echo "<a href='" . wp_nonce_url("post.php?action=delete&amp;post=$id", 'delete-post_' . $post->ID) . "' class='delete'>" . __('Delete') . "</a>"; } ?></div
    760786                <?php 
    761787                break; 
    762788 
    763             case 'control_delete': ?> 
    764                 <td><?php if ( current_user_can('delete_post',$post->ID) ) { echo "<a href='" . wp_nonce_url("post.php?action=delete&amp;post=$id", 'delete-post_' . $post->ID) . "' class='delete'>" . __('Delete') . "</a>"; } ?></td
     789            default: ?> 
     790                <div><?php do_action('manage_posts_custom_column', $column_name, $post->ID); ?></div
    765791                <?php 
    766792                break; 
    767  
    768             default: ?> 
    769                 <td><?php do_action('manage_posts_custom_column', $column_name, $post->ID); ?></td> 
    770                 <?php 
    771                 break; 
    772         } 
    773     } 
    774  
    775     echo '</tr>'; 
    776 
    777  
    778 function inline_save_row( $data ) {   
     793        } 
     794    } ?> 
     795 
     796    <div class="clear"></div> 
     797    <div class="quick-edit-save"> 
     798        <a accesskey="c" href="#inline-edit" title="<?php _e('Cancel'); ?>" class="button-secondary cancel"><?php _e('Cancel'); ?></a> 
     799        <a accesskey="s" href="#inline-edit" title="<?php _e('Save'); ?>" class="button-secondary save"><?php _e('Save'); ?></a> 
     800        <?php wp_nonce_field( 'inlineeditnonce', '_inline_edit', false ) ?> 
     801        <input type="hidden" name="post_view" value="<?php echo $m; ?>" /> 
     802    </div> 
     803    </td></tr> 
     804<?php 
     805
     806 
     807function inline_save_row( $data ) { 
    779808    // get the original post content 
    780809    $post = get_post( $data['post_ID'], ARRAY_A ); 
     
    782811 
    783812    // statuses 
    784     if ( 'page' == $data['post_type'] && 'private' == $data['page_private'] ) 
     813    if ( 'private' == $data['keep_private'] ) 
    785814        $data['post_status'] = 'private'; 
    786     if ( empty($data['comment_status']) )  
     815    if ( empty($data['comment_status']) ) 
    787816        $data['comment_status'] = 'closed'; 
    788817    if ( empty($data['ping_status']) ) 
     
    800829} 
    801830 
    802 // outputs XML of the post/page data ready for use in the inline editor 
    803 // accepts array of post IDs 
    804 function get_inline_data($posts) { 
    805     global $post; 
    806  
    807     header('Content-Type: text/xml; charset=' . get_option('blog_charset'), true); 
    808     echo "<?xml version='1.0' ?>\n"; 
    809     echo "<posts>\n"; 
    810  
    811     foreach ($posts as $ID) { 
    812         $GLOBALS['post'] = get_post($ID); 
    813         $GLOBALS['post_ID'] = $ID; 
    814  
    815         if ( ($post->post_type == 'post' && !current_user_can('edit_post', $ID)) ||  
    816                 ($post->post_type == 'page' && !current_user_can('edit_page', $ID)) ||  
    817                 ($post->post_type != 'post' && $post->post_type != 'page')) 
    818             continue; 
    819  
    820         echo "  <post id='$ID'>\n"; 
    821         echo "    <post_title>" . wp_specialchars($post->post_title, 1) . "</post_title>\n"; 
    822         echo "    <post_name>$post->post_name</post_name>\n"; 
    823         echo "    <post_author>$post->post_author</post_author>\n"; 
    824         echo "    <comment_status>$post->comment_status</comment_status>\n"; 
    825         echo "    <ping_status>$post->ping_status</ping_status>\n"; 
    826         echo "    <post_status>$post->post_status</post_status>\n"; 
    827         echo "    <jj>" . mysql2date( 'd', $post->post_date ) . "</jj>\n"; 
    828         echo "    <mm>" . mysql2date( 'm', $post->post_date ) . "</mm>\n"; 
    829         echo "    <aa>" . mysql2date( 'Y', $post->post_date ) . "</aa>\n"; 
    830         echo "    <hh>" . mysql2date( 'H', $post->post_date ) . "</hh>\n"; 
    831         echo "    <mn>" . mysql2date( 'i', $post->post_date ) . "</mn>\n"; 
    832         if( $post->post_type == 'post' ) { 
    833             echo '    <tags_input>' . wp_specialchars(get_tags_to_edit( $post->ID ), 1) . "</tags_input>\n"; 
    834             echo '    <post_category>' . implode( ',', wp_get_post_categories( $post->ID ) ) . "</post_category>\n"; 
    835             echo '    <sticky>' . (is_sticky($post->ID) ? 'sticky' : '') . "</sticky>\n"; 
    836         } 
    837         if( $post->post_type == 'page' ) { 
    838             echo "    <post_parent>$post->post_parent</post_parent>\n"; 
    839             echo '    <page_template>' . wp_specialchars(get_post_meta( $post->ID, '_wp_page_template', true ), 1) . "</page_template>\n"; 
    840             echo "    <post_password>" . wp_specialchars($post->post_password, 1) . "</post_password>\n"; 
    841             echo "    <menu_order>$post->menu_order</menu_order>\n"; 
    842         } 
    843         echo "  </post>\n"; 
    844     } 
    845  
    846     echo '</posts>'; 
     831// adds hidden fields with the data for use in the inline editor 
     832function get_inline_data($post) { 
     833 
     834    if ( ! current_user_can('edit_' . $post->post_type, $post->ID) ) 
     835        return; 
     836     
     837    $title = apply_filters( 'the_title', $post->post_title ); 
     838    if ( empty($title) ) 
     839        $title = __('(no title)'); 
     840 
     841    echo ' 
     842<div id="inline_' . $post->ID . '"> 
     843    <input type="hidden" name="" class="post_title" value="' . $title . '" /> 
     844    <input type="hidden" name="" class="post_name" value="' . $post->post_name . '" /> 
     845    <input type="hidden" name="" class="post_author" value="' . $post->post_author . '" /> 
     846    <input type="hidden" name="" class="comment_status" value="' . $post->comment_status . '" /> 
     847    <input type="hidden" name="" class="ping_status" value="' . $post->ping_status . '" /> 
     848    <input type="hidden" name="" class="post_status" value="' . $post->post_status . '" /> 
     849    <input type="hidden" name="" class="jj" value="' . mysql2date( 'd', $post->post_date ) . '" /> 
     850    <input type="hidden" name="" class="mm" value="' . mysql2date( 'm', $post->post_date ) . '" /> 
     851    <input type="hidden" name="" class="aa" value="' . mysql2date( 'Y', $post->post_date ) . '" /> 
     852    <input type="hidden" name="" class="hh" value="' . mysql2date( 'H', $post->post_date ) . '" /> 
     853    <input type="hidden" name="" class="mn" value="' . mysql2date( 'i', $post->post_date ) . '" /> 
     854    <input type="hidden" name="" class="post_password" value="' . wp_specialchars($post->post_password, 1) . '" />'; 
     855 
     856    if( $post->post_type == 'page' ) 
     857        echo ' 
     858    <input type="hidden" name="" class="post_parent" value="' . $post->post_parent . '" /> 
     859    <input type="hidden" name="" class="page_template" value="' . wp_specialchars(get_post_meta( $post->ID, '_wp_page_template', true ), 1) . '" /> 
     860    <input type="hidden" name="" class="menu_order" value="' . $post->menu_order . '" />'; 
     861     
     862    if( $post->post_type == 'post' ) 
     863        echo ' 
     864    <input type="hidden" name="" class="tags_input" value="' . wp_specialchars( str_replace( ',', ', ', get_tags_to_edit($post->ID) ), 1) . '" /> 
     865    <input type="hidden" name="" class="post_category" value="' . implode( ',', wp_get_post_categories( $post->ID ) ) . '" /> 
     866    <input type="hidden" name="" class="sticky" value="' . (is_sticky($post->ID) ? 'sticky' : '') . '" />'; 
     867         
     868    echo '</div>'; 
    847869} 
    848870 
     
    875897function _post_row($a_post, $pending_comments, $mode) { 
    876898    global $post; 
    877     static $class; 
     899    static $rowclass; 
    878900 
    879901    $global_post = $post; 
     
    881903    setup_postdata($post); 
    882904 
    883     $class = 'alternate' == $class ? '' : 'alternate'; 
     905    $rowclass = 'alternate' == $rowclass ? '' : 'alternate'; 
    884906    global $current_user; 
    885907    $post_owner = ( $current_user->ID == $post->post_author ? 'self' : 'other' ); 
     
    889911        $title = __('(no title)'); 
    890912?> 
    891     <tr id='post-<?php echo $post->ID; ?>' class='<?php echo trim( $class . ' author-' . $post_owner . ' status-' . $post->post_status ); ?>' valign="top"> 
     913    <tr id='post-<?php echo $post->ID; ?>' class='<?php echo trim( $rowclass . ' author-' . $post_owner . ' status-' . $post->post_status ); ?> iedit' valign="top"> 
    892914<?php 
    893915    $posts_columns = wp_manage_posts_columns(); 
     
    935957            } 
    936958 
    937             if ( 'excerpt' == $mode ) { ?> 
    938         <td <?php echo $attributes ?>><?php echo apply_filters('post_date_column_time', $t_time, $post, $column_name, $mode) ?></td> 
    939         <?php } else { ?> 
    940         <td <?php echo $attributes ?>><abbr title="<?php echo $t_time ?>"><?php echo apply_filters('post_date_column_time', $h_time, $post, $column_name, $mode) ?></abbr></td> 
    941         <?php } 
     959            echo '<td ' . $attributes . '>'; 
     960            if ( 'excerpt' == $mode ) 
     961                echo apply_filters('post_date_column_time', $t_time, $post, $column_name, $mode); 
     962            else 
     963                echo '<abbr title="' . $t_time . '">' . apply_filters('post_date_column_time', $h_time, $post, $column_name, $mode) . '</abbr>'; 
     964             
     965            echo '</td>'; 
    942966        break; 
    943967 
     
    955979            $actions['edit'] = '<a href="' . get_edit_post_link($post->ID, true) . '">' . __('Edit') . '</a>'; 
    956980            $actions['inline'] = '<a href="#" class="editinline">' . __('Quick Edit') . '</a>'; 
    957             $actions['delete'] = "<a class='submitdelete' href='" . wp_nonce_url("post.php?action=delete&amp;post=$post->ID", 'delete-post_' . $post->ID) . "' onclick=\"if ( confirm('" . js_escape(sprintf( ('draft' == $post->post_status) ? __("You are about to delete this draft '%s'\n 'Cancel' to stop, 'OK' to delete.") : __("You are about to delete this post '%s'\n 'Cancel' to stop, 'OK' to delete."), $post->post_title )) . "') ) { return true;}return false;\">" . __('Delete') . "</a>"; 
     981            $actions['delete'] = "<a class='submitdelete' href='" . wp_nonce_url("post.php?action=delete&amp;post=$post->ID", 'delete-post_' . $post->ID) . "' onclick=\"if ( confirm('" . js_escape(sprintf( ('draft' == $post->post_status) ? __("You are about to delete this draft '%s'\n 'Cancel' to stop, 'OK' to delete.") : __("You are about to delete this post '%s'\n 'Cancel' to stop, 'OK' to delete."), $post->post_title )) . "') ) { return true;}return false;\">" . __('Delete') . "</a>"; 
    958982            if ( in_array($post->post_status, array('pending', 'draft')) ) 
    959983                $actions['view'] = '<a href="' . get_permalink($post->ID) . '" title="' . attribute_escape(sprintf(__('Preview "%s"'), $title)) . '" rel="permalink">' . __('Preview') . '</a>'; 
     
    967991                echo "<span class='$action'>$link$sep</span>"; 
    968992            } 
     993 
     994            get_inline_data($post); 
    969995        ?> 
    970996        </td> 
     
    10891115function display_page_row( $page, $level = 0 ) { 
    10901116    global $post; 
    1091     static $class; 
     1117    static $rowclass; 
    10921118 
    10931119    $post = $page; 
     
    10971123    $pad = str_repeat( '&#8212; ', $level ); 
    10981124    $id = (int) $page->ID; 
    1099     $class = ('alternate' == $class ) ? '' : 'alternate'; 
     1125    $rowclass = 'alternate' == $rowclass ? '' : 'alternate'; 
    11001126    $posts_columns = wp_manage_pages_columns(); 
    11011127    $hidden = (array) get_user_option( 'manage-page-columns-hidden' ); 
     
    11041130        $title = __('(no title)'); 
    11051131?> 
    1106   <tr id='page-<?php echo $id; ?>' class='<?php echo $class; ?>'> 
    1107  
    1108  
    1109  <?php 
     1132<tr id="page-<?php echo $id; ?>" class="<?php echo $rowclass; ?> iedit"> 
     1133<?php 
    11101134 
    11111135foreach ($posts_columns as $column_name=>$column_display_name) { 
     
    11641188        $actions['edit'] = '<a href="' . $edit_link . '">' . __('Edit') . '</a>'; 
    11651189        $actions['inline'] = '<a href="#" class="editinline">' . __('Quick Edit') . '</a>'; 
    1166         $actions['delete'] = "<a class='submitdelete' href='" . wp_nonce_url("page.php?action=delete&amp;post=$page->ID", 'delete-page_' . $page->ID) . "' onclick=\"if ( confirm('" . js_escape(sprintf( ('draft' == $page->post_status) ? __("You are about to delete this draft '%s'\n 'Cancel' to stop, 'OK' to delete.") : __("You are about to delete this page '%s'\n 'Cancel' to stop, 'OK' to delete."), $page->post_title )) . "') ) { return true;}return false;\">" . __('Delete') . "</a>"; 
     1190        $actions['delete'] = "<a class='submitdelete' href='" . wp_nonce_url("page.php?action=delete&amp;post=$page->ID", 'delete-page_' . $page->ID) . "' onclick=\"if ( confirm('" . js_escape(sprintf( ('draft' == $page->post_status) ? __("You are about to delete this draft '%s'\n 'Cancel' to stop, 'OK' to delete.") : __("You are about to delete this page '%s'\n 'Cancel' to stop, 'OK' to delete."), $page->post_title )) . "') ) { return true;}return false;\">" . __('Delete') . "</a>"; 
    11671191        if ( in_array($post->post_status, array('pending', 'draft')) ) 
    11681192            $actions['view'] = '<a href="' . get_permalink($page->ID) . '" title="' . attribute_escape(sprintf(__('Preview "%s"'), $title)) . '" rel="permalink">' . __('Preview') . '</a>'; 
     
    11761200            echo "<span class='$action'>$link$sep</span>"; 
    11771201        } 
    1178         ?> 
    1179         </td> 
    1180         <?php 
     1202         
     1203        get_inline_data($post); 
     1204        echo '</td>'; 
    11811205        break; 
    11821206 
     
    12371261    } 
    12381262} 
    1239  ?> 
    1240  
    1241    </tr> 
     1263?> 
     1264 
     1265</tr> 
    12421266 
    12431267<?php 
     
    12661290     * If searching, ignore hierarchy and treat everything as top level 
    12671291     */ 
    1268     if ( empty($_GET['s']) )
     1292    if ( empty($_GET['s']) )
    12691293 
    12701294        $top_level_pages = array(); 
    1271         $children_pages = array(); 
     1295        $children_pages = array(); 
    12721296 
    12731297        foreach ( $pages as $page ) { 
     
    13801404        $short_url = substr( $short_url, 0, -1 ); 
    13811405    if ( strlen( $short_url ) > 35 ) 
    1382         $short_url = substr( $short_url, 0, 32 ).'...'; 
     1406        $short_url = substr( $short_url, 0, 32 ).'...'; 
    13831407    $numposts = get_usernumposts( $user_object->ID ); 
    13841408    if ( current_user_can( 'edit_user', $user_object->ID ) ) { 
     
    13911415        $actions = array(); 
    13921416        $actions['edit'] = '<a href="' . $edit_link . '">' . __('Edit') . '</a>'; 
    1393         $actions['delete'] = "<a class='submitdelete' href='" . wp_nonce_url("users.php?action=delete&amp;user=$user_object->ID", 'bulk-users') . "' onclick=\"if ( confirm('" . js_escape(sprintf(__("You are about to delete this user '%s'\n 'Cancel' to stop, 'OK' to delete."), $user_object->user_login )) . "') ) { return true;}return false;\">" . __('Delete') . "</a>"; 
     1417        $actions['delete'] = "<a class='submitdelete' href='" . wp_nonce_url("users.php?action=delete&amp;user=$user_object->ID", 'bulk-users') . "' onclick=\"if ( confirm('" . js_escape(sprintf(__("You are about to delete this user '%s'\n 'Cancel' to stop, 'OK' to delete."), $user_object->user_login )) . "') ) { return true;}return false;\">" . __('Delete') . "</a>"; 
    13941418        $action_count = count($actions); 
    13951419        $i = 0; 
     
    15121536        $ptime = mysql2date(__('Y/m/d \a\t g:i A'), $comment->comment_date ); 
    15131537 
    1514     $delete_url    = clean_url( wp_nonce_url( "comment.php?action=deletecomment&p=$comment->comment_post_ID&c=$comment->comment_ID", "delete-comment_$comment->comment_ID" ) ); 
    1515     $approve_url   = clean_url( wp_nonce_url( "comment.php?action=approvecomment&p=$comment->comment_post_ID&c=$comment->comment_ID", "approve-comment_$comment->comment_ID" ) ); 
     1538    $delete_url = clean_url( wp_nonce_url( "comment.php?action=deletecomment&p=$comment->comment_post_ID&c=$comment->comment_ID", "delete-comment_$comment->comment_ID" ) ); 
     1539    $approve_url = clean_url( wp_nonce_url( "comment.php?action=approvecomment&p=$comment->comment_post_ID&c=$comment->comment_ID", "approve-comment_$comment->comment_ID" ) ); 
    15161540    $unapprove_url = clean_url( wp_nonce_url( "comment.php?action=unapprovecomment&p=$comment->comment_post_ID&c=$comment->comment_ID", "unapprove-comment_$comment->comment_ID" ) ); 
    1517     $spam_url      = clean_url( wp_nonce_url( "comment.php?action=deletecomment&dt=spam&p=$comment->comment_post_ID&c=$comment->comment_ID", "delete-comment_$comment->comment_ID" ) ); 
     1541    $spam_url = clean_url( wp_nonce_url( "comment.php?action=deletecomment&dt=spam&p=$comment->comment_post_ID&c=$comment->comment_ID", "delete-comment_$comment->comment_ID" ) ); 
    15181542 
    15191543?> 
    1520   <tr id="comment-<?php echo $comment->comment_ID; ?>" class='<?php echo $the_comment_status; ?>'> 
     1544<tr id="comment-<?php echo $comment->comment_ID; ?>" class='<?php echo $the_comment_status; ?>'> 
    15211545<?php if ( $checkbox ) : ?> 
    1522     <td class="check-column"><?php if ( current_user_can('edit_post', $comment->comment_post_ID) ) { ?><input type="checkbox" name="delete_comments[]" value="<?php echo $comment->comment_ID;