diff options
-rw-r--r-- | wp-inst/wp-admin/edit-form-advanced.php | 4 | ||||
-rw-r--r-- | wp-inst/wp-admin/wp-admin.css | 13 | ||||
-rw-r--r-- | wp-inst/wp-includes/capabilities.php | 2 | ||||
-rw-r--r-- | wp-inst/wp-includes/comment-functions.php | 4 |
4 files changed, 19 insertions, 4 deletions
diff --git a/wp-inst/wp-admin/edit-form-advanced.php b/wp-inst/wp-admin/edit-form-advanced.php index 8818da0..289d30c 100644 --- a/wp-inst/wp-admin/edit-form-advanced.php +++ b/wp-inst/wp-admin/edit-form-advanced.php @@ -10,7 +10,9 @@ $messages[3] = __('Custom field deleted.'); <form name="post" action="post.php" method="post" id="post"> <div class="wrap"> -<h2><?php _e('Write Post'); ?></h2> +<a id="write-post"></a> +<h2><?php _e('Write Post'); ?><?php if ( 0 != $post_ID ) : ?> + <small class="quickjump"><a href="#preview-post"><?php _e('preview ↓'); ?></a></small><?php endif; ?></h2> <?php if (0 == $post_ID) { diff --git a/wp-inst/wp-admin/wp-admin.css b/wp-inst/wp-admin/wp-admin.css index f8920b9..df6f34e 100644 --- a/wp-inst/wp-admin/wp-admin.css +++ b/wp-inst/wp-admin/wp-admin.css @@ -114,6 +114,19 @@ h2 { margin: 5px 10px; } +h2 small.quickjump { + display: block; + text-align: right; +} + +h2 small.quickjump a { + text-decoration: none; + border-bottom: 0; + font-size: 15px; + background: #f0f8ff; + padding: 5px 10px; +} + img, #footer a { border: 0; } diff --git a/wp-inst/wp-includes/capabilities.php b/wp-inst/wp-includes/capabilities.php index e279ce4..63ff5e1 100644 --- a/wp-inst/wp-includes/capabilities.php +++ b/wp-inst/wp-includes/capabilities.php @@ -84,7 +84,7 @@ class WP_Role { global $wp_roles; $this->capabilities[$cap] = $grant; - $wp_roles->add_cap($this->name, $cap); + $wp_roles->add_cap($this->name, $cap, $grant); } function remove_cap($cap) { diff --git a/wp-inst/wp-includes/comment-functions.php b/wp-inst/wp-includes/comment-functions.php index 842135e..499f237 100644 --- a/wp-inst/wp-includes/comment-functions.php +++ b/wp-inst/wp-includes/comment-functions.php @@ -45,7 +45,7 @@ function wp_new_comment( $commentdata ) { $comment_ID = wp_insert_comment($commentdata); - do_action('comment_post', $comment_ID, $commentdata['approved']); + do_action('comment_post', $comment_ID, $commentdata['comment_approved']); if ( 'spam' !== $commentdata['comment_approved'] ) { // If it's spam save it silently for later crunching if ( '0' == $commentdata['comment_approved'] ) @@ -55,7 +55,7 @@ function wp_new_comment( $commentdata ) { wp_notify_postauthor($comment_ID, $commentdata['comment_type']); } - return $comment_id; + return $comment_ID; } function wp_insert_comment($commentdata) { |