diff --git a/wp-admin/admin-ajax.php b/wp-admin/admin-ajax.php
index 9b36c10d5a..62346c649f 100644
--- a/wp-admin/admin-ajax.php
+++ b/wp-admin/admin-ajax.php
@@ -715,6 +715,7 @@ case 'hidden-columns' :
$current_user = wp_get_current_user();
if ( is_array($hidden) )
update_usermeta($current_user->ID, "manage-$page-columns-hidden", $hidden);
+break;
case 'get-permalink':
check_ajax_referer( 'getpermalink', 'getpermalinknonce' );
$post_id = isset($_POST['post_id'])? intval($_POST['post_id']) : 0;
@@ -727,16 +728,8 @@ case 'sample-permalink':
$slug = isset($_POST['new_slug'])? $_POST['new_slug'] : '';
die(get_sample_permalink_html($post_id, $title, $slug));
break;
-case 'inline-data':
- check_ajax_referer( 'inlineeditnonce', 'inline_edit_nonce' );
-
- if ( isset($_POST['posts']) )
- get_inline_data( explode(',', $_POST['posts']) );
-
- die();
-break;
case 'inline-save':
- check_ajax_referer( 'inlineeditnonce', 'inline_edit_nonce' );
+ check_ajax_referer( 'inlineeditnonce', '_inline_edit' );
if ( ! isset($_POST['post_ID']) )
exit;
@@ -753,7 +746,7 @@ case 'inline-save':
post_rows($post);
}
die();
-break;
+ break;
case 'meta-box-order':
check_ajax_referer( 'meta-box-order' );
update_user_option( $GLOBALS['current_user']->ID, "meta-box-order_$_POST[page]", $_POST['order'] );
diff --git a/wp-admin/css/colors-classic.css b/wp-admin/css/colors-classic.css
index c2d34c06cd..6a286b6db8 100644
--- a/wp-admin/css/colors-classic.css
+++ b/wp-admin/css/colors-classic.css
@@ -806,7 +806,8 @@ table.diff .diff-addedline ins {
border-bottom-color: #14568A;
}
-#replydiv {
+#replydiv,
+.inline-editor .quick-edit-div {
border-color: #EBEBEB #CCC #CCC #EBEBEB;
background-color: #fff;
}
@@ -821,7 +822,7 @@ table.diff .diff-addedline ins {
background-color: #f8f8f8;
}
-/* table vim shorcuts */
+/* table vim shortcuts */
.vim-current {
background-color: #CFEBF7 !important;
}
@@ -842,4 +843,27 @@ div.star.select:hover {
#plugin-information .fyi h2.mainheader {
background-color: #cee1ef;
-}
\ No newline at end of file
+}
+
+/* inline editor */
+.inline-editor input,
+.inline-editor textarea {
+ border-color: #ddd;
+}
+
+.inline-editor div.title {
+ background-color: #CFEBF7;
+}
+
+.inline-editor ul.cat-checklist {
+ background-color: #FFFFFF;
+}
+
+.inline-editor .categories .catshow,
+.inline-editor .categories .cathide {
+ color: #2583AD;
+}
+
+.inline-editor .quick-edit-save {
+ background-color: #CFEBF7;
+}
diff --git a/wp-admin/css/colors-fresh.css b/wp-admin/css/colors-fresh.css
index 23dea9ddf9..03ddf4352e 100644
--- a/wp-admin/css/colors-fresh.css
+++ b/wp-admin/css/colors-fresh.css
@@ -789,7 +789,8 @@ table.diff .diff-addedline ins {
border-bottom-color: #E4F2FD;
}
-#replydiv {
+#replydiv,
+.inline-editor .quick-edit-div {
border-color: #EBEBEB #CCC #CCC #EBEBEB;
background-color: #fff;
}
@@ -804,7 +805,7 @@ table.diff .diff-addedline ins {
background-color: #f8f8f8;
}
-/* table vim shorcuts */
+/* table vim shortcuts */
.vim-current {
background-color: #E4F2FD !important;
}
@@ -826,3 +827,26 @@ div.star.select:hover {
#plugin-information .fyi h2.mainheader {
background-color: #cee1ef;
}
+
+/* inline editor */
+.inline-editor input,
+.inline-editor textarea {
+ border-color: #ddd;
+}
+
+.inline-editor div.title {
+ background-color: #EAF3FA;
+}
+
+.inline-editor ul.cat-checklist {
+ background-color: #FFFFFF;
+}
+
+.inline-editor .categories .catshow,
+.inline-editor .categories .cathide {
+ color: #2583AD;
+}
+
+.inline-editor .quick-edit-save {
+ background-color: #EAF3FA;
+}
diff --git a/wp-admin/edit-pages.php b/wp-admin/edit-pages.php
index 244b8d9a78..890bdcabbc 100644
--- a/wp-admin/edit-pages.php
+++ b/wp-admin/edit-pages.php
@@ -189,7 +189,7 @@ $all = !( $h2_search || $post_status_q );
if ($posts) {
?>
-
+
diff --git a/wp-admin/edit-post-rows.php b/wp-admin/edit-post-rows.php
index 031b7c634e..2067046287 100644
--- a/wp-admin/edit-post-rows.php
+++ b/wp-admin/edit-post-rows.php
@@ -8,7 +8,7 @@
if ( ! defined('ABSPATH') ) die();
?>
-
+
diff --git a/wp-admin/edit.php b/wp-admin/edit.php
index 184cd1b4cd..c23f5d870e 100644
--- a/wp-admin/edit.php
+++ b/wp-admin/edit.php
@@ -185,7 +185,7 @@ if ( $page_links )
diff --git a/wp-admin/includes/template.php b/wp-admin/includes/template.php
index 193d1c742a..f8161d6090 100644
--- a/wp-admin/includes/template.php
+++ b/wp-admin/includes/template.php
@@ -86,7 +86,7 @@ function _cat_row( $category, $level, $name_override = false ) {
$actions = array();
$actions['edit'] = '
' . __('Edit') . '';
if ( $default_cat_id != $category->term_id )
- $actions['delete'] = "
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') . "";
+ $actions['delete'] = "
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') . "";
$action_count = count($actions);
$i = 0;
foreach ( $actions as $action => $link ) {
@@ -157,7 +157,7 @@ function link_cat_row( $category ) {
$actions = array();
$actions['edit'] = '
' . __('Edit') . '';
if ( $default_cat_id != $category->term_id )
- $actions['delete'] = "
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') . "";
+ $actions['delete'] = "
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') . "";
$action_count = count($actions);
$i = 0;
foreach ( $actions as $action => $link ) {
@@ -187,14 +187,14 @@ function link_cat_row( $category ) {
switch ($column_name) {
case 'cb':
- $output .= "
";
- if ( absint( get_option( 'default_link_category' ) ) != $category->term_id ) {
- $output .= "";
- } else {
- $output .= " ";
- }
- $output .= " | ";
- break;
+ $output .= "
";
+ if ( absint( get_option( 'default_link_category' ) ) != $category->term_id ) {
+ $output .= "";
+ } else {
+ $output .= " ";
+ }
+ $output .= " | ";
+ break;
case 'name':
$output .= "
$edit | ";
break;
@@ -249,7 +249,7 @@ class Walker_Category_Checklist extends Walker {
extract($args);
$class = in_array( $category->term_id, $popular_cats ) ? ' class="popular-category"' : '';
- $output .= "\n
" . '';
+ $output .= "\n" . '';
}
function end_el(&$output, $category, $depth, $args) {
@@ -315,7 +315,7 @@ function wp_popular_terms_checklist( $taxonomy, $default = 0, $number = 10, $ech
?>
-
+\n";
- echo "\n";
+ if ( ! current_user_can('edit_' . $post->post_type, $post->ID) )
+ return;
+
+ $title = apply_filters( 'the_title', $post->post_title );
+ if ( empty($title) )
+ $title = __('(no title)');
- foreach ($posts as $ID) {
- $GLOBALS['post'] = get_post($ID);
- $GLOBALS['post_ID'] = $ID;
+ echo '
+
+
+
+
+
+
+
+
+
+
+
+
+
';
- if ( ($post->post_type == 'post' && !current_user_can('edit_post', $ID)) ||
- ($post->post_type == 'page' && !current_user_can('edit_page', $ID)) ||
- ($post->post_type != 'post' && $post->post_type != 'page'))
- continue;
-
- echo "
\n";
- echo " " . wp_specialchars($post->post_title, 1) . "\n";
- echo " $post->post_name\n";
- echo " $post->post_author\n";
- echo " $post->comment_status\n";
- echo " $post->ping_status\n";
- echo " $post->post_status\n";
- echo " " . mysql2date( 'd', $post->post_date ) . "\n";
- echo " " . mysql2date( 'm', $post->post_date ) . "\n";
- echo " " . mysql2date( 'Y', $post->post_date ) . "\n";
- echo " " . mysql2date( 'H', $post->post_date ) . "\n";
- echo " " . mysql2date( 'i', $post->post_date ) . "\n";
- if( $post->post_type == 'post' ) {
- echo ' ' . wp_specialchars(get_tags_to_edit( $post->ID ), 1) . "\n";
- echo ' ' . implode( ',', wp_get_post_categories( $post->ID ) ) . "\n";
- echo ' ' . (is_sticky($post->ID) ? 'sticky' : '') . "\n";
- }
- if( $post->post_type == 'page' ) {
- echo " $post->post_parent\n";
- echo ' ' . wp_specialchars(get_post_meta( $post->ID, '_wp_page_template', true ), 1) . "\n";
- echo " " . wp_specialchars($post->post_password, 1) . "\n";
- echo " $post->menu_order\n";
- }
- echo " \n";
- }
-
- echo '';
+ if( $post->post_type == 'page' )
+ echo '
+
+
+ ';
+
+ if( $post->post_type == 'post' )
+ echo '
+
+
+
';
+
+ echo '
';
}
function post_rows( $posts = array() ) {
@@ -874,13 +896,13 @@ function post_rows( $posts = array() ) {
function _post_row($a_post, $pending_comments, $mode) {
global $post;
- static $class;
+ static $rowclass;
$global_post = $post;
$post = $a_post;
setup_postdata($post);
- $class = 'alternate' == $class ? '' : 'alternate';
+ $rowclass = 'alternate' == $rowclass ? '' : 'alternate';
global $current_user;
$post_owner = ( $current_user->ID == $post->post_author ? 'self' : 'other' );
$edit_link = get_edit_post_link( $post->ID );
@@ -888,7 +910,7 @@ function _post_row($a_post, $pending_comments, $mode) {
if ( empty($title) )
$title = __('(no title)');
?>
- post_status ); ?>' valign="top">
+
post_status ); ?> iedit' valign="top">
- > |
-
- > |
- ';
+ if ( 'excerpt' == $mode )
+ echo apply_filters('post_date_column_time', $t_time, $post, $column_name, $mode);
+ else
+ echo '' . apply_filters('post_date_column_time', $h_time, $post, $column_name, $mode) . '';
+
+ echo '';
break;
case 'title':
@@ -954,7 +978,7 @@ function _post_row($a_post, $pending_comments, $mode) {
$actions = array();
$actions['edit'] = '' . __('Edit') . '';
$actions['inline'] = '' . __('Quick Edit') . '';
- $actions['delete'] = "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') . "";
+ $actions['delete'] = "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') . "";
if ( in_array($post->post_status, array('pending', 'draft')) )
$actions['view'] = '' . __('Preview') . '';
else
@@ -966,6 +990,8 @@ function _post_row($a_post, $pending_comments, $mode) {
( $i == $action_count ) ? $sep = '' : $sep = ' | ';
echo "$link$sep";
}
+
+ get_inline_data($post);
?>
post_title = wp_specialchars( $page->post_title );
$pad = str_repeat( '— ', $level );
$id = (int) $page->ID;
- $class = ('alternate' == $class ) ? '' : 'alternate';
+ $rowclass = 'alternate' == $rowclass ? '' : 'alternate';
$posts_columns = wp_manage_pages_columns();
$hidden = (array) get_user_option( 'manage-page-columns-hidden' );
$title = get_the_title();
if ( empty($title) )
$title = __('(no title)');
?>
-
-
-
- " class=" iedit">
+$column_display_name) {
$class = "class=\"$column_name column-$column_name\"";
@@ -1163,7 +1187,7 @@ foreach ($posts_columns as $column_name=>$column_display_name) {
$actions = array();
$actions['edit'] = '' . __('Edit') . '';
$actions['inline'] = '' . __('Quick Edit') . '';
- $actions['delete'] = "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') . "";
+ $actions['delete'] = "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') . "";
if ( in_array($post->post_status, array('pending', 'draft')) )
$actions['view'] = '' . __('Preview') . '';
else
@@ -1175,9 +1199,9 @@ foreach ($posts_columns as $column_name=>$column_display_name) {
( $i == $action_count ) ? $sep = '' : $sep = ' | ';
echo "$link$sep";
}
- ?>
-
- ';
break;
case 'comments':
@@ -1236,9 +1260,9 @@ foreach ($posts_columns as $column_name=>$column_display_name) {
break;
}
}
- ?>
+?>
-
+
35 )
- $short_url = substr( $short_url, 0, 32 ).'...';
+ $short_url = substr( $short_url, 0, 32 ).'...';
$numposts = get_usernumposts( $user_object->ID );
if ( current_user_can( 'edit_user', $user_object->ID ) ) {
if ($current_user->ID == $user_object->ID) {
@@ -1390,7 +1414,7 @@ function user_row( $user_object, $style = '', $role = '' ) {
$edit = "$user_object->user_login
";
$actions = array();
$actions['edit'] = '' . __('Edit') . '';
- $actions['delete'] = "user_login )) . "') ) { return true;}return false;\">" . __('Delete') . "";
+ $actions['delete'] = "user_login )) . "') ) { return true;}return false;\">" . __('Delete') . "";
$action_count = count($actions);
$i = 0;
foreach ( $actions as $action => $link ) {
@@ -1511,24 +1535,24 @@ function _wp_comment_row( $comment_id, $mode, $comment_status, $checkbox = true
else
$ptime = mysql2date(__('Y/m/d \a\t g:i A'), $comment->comment_date );
- $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" ) );
- $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" ) );
+ $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" ) );
+ $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" ) );
$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" ) );
- $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" ) );
+ $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" ) );
?>
-
+
$position, 'checkbox'=>$checkbox, 'mode'=>$mode) );
-
+
if ( ! empty($content) ) {
echo $content;
return;
@@ -1606,7 +1630,7 @@ function wp_comment_reply($position = '1', $checkbox = false, $mode = 'single')
-
+