<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[39292] trunk: REST API: Remove the `karma` property and query parameter from the Comments endpoints.</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta" style="font-size: 105%">
<dt style="float: left; width: 6em; font-weight: bold">Revision</dt> <dd><a style="font-weight: bold" href="https://core.trac.wordpress.org/changeset/39292">39292</a><script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","description":"Review this Commit","action":{"@type":"ViewAction","url":"https://core.trac.wordpress.org/changeset/39292","name":"Review Commit"}}</script></dd>
<dt style="float: left; width: 6em; font-weight: bold">Author</dt> <dd>rachelbaker</dd>
<dt style="float: left; width: 6em; font-weight: bold">Date</dt> <dd>2016-11-18 18:52:19 +0000 (Fri, 18 Nov 2016)</dd>
</dl>

<pre style='padding-left: 1em; margin: 2em 0; border-left: 2px solid #ccc; line-height: 1.25; font-size: 105%; font-family: sans-serif'>REST API: Remove the `karma` property and query parameter from the Comments endpoints.

WordPress has not used the `karma` property internally for the past 8 years. There is no need to expose it in the REST API endpoints. Sites that use `karma` can include it using the `register_rest_field()` function.

Props dd32, danielbachhuber.
Fixes <a href="https://core.trac.wordpress.org/ticket/38821">#38821</a>.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunksrcwpincludesrestapiendpointsclasswprestcommentscontrollerphp">trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php</a></li>
<li><a href="#trunktestsphpunittestsrestapirestcommentscontrollerphp">trunk/tests/phpunit/tests/rest-api/rest-comments-controller.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunksrcwpincludesrestapiendpointsclasswprestcommentscontrollerphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php    2016-11-18 18:42:16 UTC (rev 39291)
+++ trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php      2016-11-18 18:52:19 UTC (rev 39292)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -121,7 +121,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                if ( ! current_user_can( 'edit_posts' ) ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        $protected_params = array( 'author', 'author_exclude', 'karma', 'author_email', 'type', 'status' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                 $protected_params = array( 'author', 'author_exclude', 'author_email', 'type', 'status' );
</ins><span class="cx" style="display: block; padding: 0 10px">                         $forbidden_params = array();
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                        foreach ( $protected_params as $param ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -172,7 +172,6 @@
</span><span class="cx" style="display: block; padding: 0 10px">                        'author_exclude' => 'author__not_in',
</span><span class="cx" style="display: block; padding: 0 10px">                        'exclude'        => 'comment__not_in',
</span><span class="cx" style="display: block; padding: 0 10px">                        'include'        => 'comment__in',
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        'karma'          => 'karma',
</del><span class="cx" style="display: block; padding: 0 10px">                         'offset'         => 'offset',
</span><span class="cx" style="display: block; padding: 0 10px">                        'order'          => 'order',
</span><span class="cx" style="display: block; padding: 0 10px">                        'parent'         => 'parent__in',
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -197,7 +196,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                // Ensure certain parameter values default to empty strings.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                foreach ( array( 'author_email', 'karma', 'search' ) as $param ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         foreach ( array( 'author_email', 'search' ) as $param ) {
</ins><span class="cx" style="display: block; padding: 0 10px">                         if ( ! isset( $prepared_args[ $param ] ) ) {
</span><span class="cx" style="display: block; padding: 0 10px">                                $prepared_args[ $param ] = '';
</span><span class="cx" style="display: block; padding: 0 10px">                        }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -372,15 +371,11 @@
</span><span class="cx" style="display: block; padding: 0 10px">                        return new WP_Error( 'rest_comment_login_required', __( 'Sorry, you must be logged in to comment.' ), array( 'status' => 401 ) );
</span><span class="cx" style="display: block; padding: 0 10px">                }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                // Limit who can set comment `author`, `karma` or `status` to anything other than the default.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         // Limit who can set comment `author` or `status` to anything other than the default.
</ins><span class="cx" style="display: block; padding: 0 10px">                 if ( isset( $request['author'] ) && get_current_user_id() !== $request['author'] && ! current_user_can( 'moderate_comments' ) ) {
</span><span class="cx" style="display: block; padding: 0 10px">                        return new WP_Error( 'rest_comment_invalid_author', __( 'Comment author invalid.' ), array( 'status' => rest_authorization_required_code() ) );
</span><span class="cx" style="display: block; padding: 0 10px">                }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                if ( isset( $request['karma'] ) && $request['karma'] > 0 && ! current_user_can( 'moderate_comments' ) ) {
-                       return new WP_Error( 'rest_comment_invalid_karma', __( 'Sorry, you are not allowed to set karma for comments.' ), array( 'status' => rest_authorization_required_code() ) );
-               }
-
</del><span class="cx" style="display: block; padding: 0 10px">                 if ( isset( $request['status'] ) && ! current_user_can( 'moderate_comments' ) ) {
</span><span class="cx" style="display: block; padding: 0 10px">                        return new WP_Error( 'rest_comment_invalid_status', __( 'Sorry, you are not allowed to set status for comments.' ), array( 'status' => rest_authorization_required_code() ) );
</span><span class="cx" style="display: block; padding: 0 10px">                }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -817,7 +812,6 @@
</span><span class="cx" style="display: block; padding: 0 10px">                                'rendered' => apply_filters( 'comment_text', $comment->comment_content, $comment ),
</span><span class="cx" style="display: block; padding: 0 10px">                                'raw'      => $comment->comment_content,
</span><span class="cx" style="display: block; padding: 0 10px">                        ),
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        'karma'              => (int) $comment->comment_karma,
</del><span class="cx" style="display: block; padding: 0 10px">                         'link'               => get_comment_link( $comment ),
</span><span class="cx" style="display: block; padding: 0 10px">                        'status'             => $this->prepare_status_response( $comment->comment_approved ),
</span><span class="cx" style="display: block; padding: 0 10px">                        'type'               => get_comment_type( $comment->comment_ID ),
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1060,10 +1054,6 @@
</span><span class="cx" style="display: block; padding: 0 10px">                        $prepared_comment['comment_type'] = 'comment' === $request['type'] ? '' : $request['type'];
</span><span class="cx" style="display: block; padding: 0 10px">                }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                if ( isset( $request['karma'] ) ) {
-                       $prepared_comment['comment_karma'] = $request['karma'] ;
-               }
-
</del><span class="cx" style="display: block; padding: 0 10px">                 if ( ! empty( $request['date'] ) ) {
</span><span class="cx" style="display: block; padding: 0 10px">                        $date_data = rest_get_date_with_gmt( $request['date'] );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1184,11 +1174,6 @@
</span><span class="cx" style="display: block; padding: 0 10px">                                        'format'       => 'date-time',
</span><span class="cx" style="display: block; padding: 0 10px">                                        'context'      => array( 'view', 'edit' ),
</span><span class="cx" style="display: block; padding: 0 10px">                                ),
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                'karma'             => array(
-                                       'description'  => __( 'Karma for the object.' ),
-                                       'type'         => 'integer',
-                                       'context'      => array( 'edit' ),
-                               ),
</del><span class="cx" style="display: block; padding: 0 10px">                                 'link'             => array(
</span><span class="cx" style="display: block; padding: 0 10px">                                        'description'  => __( 'URL to the object.' ),
</span><span class="cx" style="display: block; padding: 0 10px">                                        'type'         => 'string',
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1322,12 +1307,6 @@
</span><span class="cx" style="display: block; padding: 0 10px">                        'default'            => array(),
</span><span class="cx" style="display: block; padding: 0 10px">                );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $query_params['karma'] = array(
-                       'default'           => null,
-                       'description'       => __( 'Limit result set to that of a particular comment karma. Requires authorization.' ),
-                       'type'              => 'integer',
-               );
-
</del><span class="cx" style="display: block; padding: 0 10px">                 $query_params['offset'] = array(
</span><span class="cx" style="display: block; padding: 0 10px">                        'description'        => __( 'Offset the result set by a specific number of comments.' ),
</span><span class="cx" style="display: block; padding: 0 10px">                        'type'               => 'integer',
</span></span></pre></div>
<a id="trunktestsphpunittestsrestapirestcommentscontrollerphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/rest-api/rest-comments-controller.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/rest-api/rest-comments-controller.php   2016-11-18 18:42:16 UTC (rev 39291)
+++ trunk/tests/phpunit/tests/rest-api/rest-comments-controller.php     2016-11-18 18:52:19 UTC (rev 39292)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -135,7 +135,6 @@
</span><span class="cx" style="display: block; padding: 0 10px">                        'context',
</span><span class="cx" style="display: block; padding: 0 10px">                        'exclude',
</span><span class="cx" style="display: block; padding: 0 10px">                        'include',
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        'karma',
</del><span class="cx" style="display: block; padding: 0 10px">                         'offset',
</span><span class="cx" style="display: block; padding: 0 10px">                        'order',
</span><span class="cx" style="display: block; padding: 0 10px">                        'orderby',
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1161,27 +1160,6 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertErrorResponse( 'rest_comment_invalid_author', $response, 403 );
</span><span class="cx" style="display: block; padding: 0 10px">        }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-        public function test_create_comment_karma_without_permission() {
-               wp_set_current_user( self::$subscriber_id );
-
-               $params = array(
-                       'post'         => self::$post_id,
-                       'author_name'  => 'Homer Jay Simpson',
-                       'author_email' => 'chunkylover53@aol.com',
-                       'author_url'   => 'http://compuglobalhypermeganet.com',
-                       'content'      => 'Here\’s to alcohol: the cause of, and solution to, all of life\’s problems.',
-                       'author'       => self::$subscriber_id,
-                       'karma'        => 100,
-               );
-
-               $request = new WP_REST_Request( 'POST', '/wp/v2/comments' );
-               $request->add_header( 'content-type', 'application/json' );
-               $request->set_body( wp_json_encode( $params ) );
-               $response = $this->server->dispatch( $request );
-
-               $this->assertErrorResponse( 'rest_comment_invalid_karma', $response, 403 );
-       }
-
</del><span class="cx" style="display: block; padding: 0 10px">         public function test_create_comment_invalid_post() {
</span><span class="cx" style="display: block; padding: 0 10px">                wp_set_current_user( self::$subscriber_id );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1202,27 +1180,6 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertErrorResponse( 'rest_invalid_param', $response, 400 );
</span><span class="cx" style="display: block; padding: 0 10px">        }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-        public function test_create_comment_karma_invalid_value() {
-               wp_set_current_user( self::$subscriber_id );
-
-               $params = array(
-                       'post'           => self::$post_id,
-                       'author_name'  => 'Homer Jay Simpson',
-                       'author_email' => 'chunkylover53@aol.com',
-                       'author_url'   => 'http://compuglobalhypermeganet.com',
-                       'content'         => 'Here\’s to alcohol: the cause of, and solution to, all of life\’s problems.',
-                       'author'           => self::$subscriber_id,
-                       'karma'         => 'themostkarmaever',
-               );
-
-               $request = new WP_REST_Request( 'POST', '/wp/v2/comments' );
-               $request->add_header( 'content-type', 'application/json' );
-               $request->set_body( wp_json_encode( $params ) );
-               $response = $this->server->dispatch( $request );
-
-               $this->assertErrorResponse( 'rest_invalid_param', $response, 400 );
-       }
-
</del><span class="cx" style="display: block; padding: 0 10px">         public function test_create_comment_status_without_permission() {
</span><span class="cx" style="display: block; padding: 0 10px">                wp_set_current_user( self::$subscriber_id );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1649,7 +1606,6 @@
</span><span class="cx" style="display: block; padding: 0 10px">                        'author_ip'    => '4.4.4.4',
</span><span class="cx" style="display: block; padding: 0 10px">                        'content'      => 'Testing.',
</span><span class="cx" style="display: block; padding: 0 10px">                        'date'         => '2014-11-07T10:14:25',
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        'karma'        => 100,
</del><span class="cx" style="display: block; padding: 0 10px">                         'post'         => $post_id,
</span><span class="cx" style="display: block; padding: 0 10px">                );
</span><span class="cx" style="display: block; padding: 0 10px">                $request = new WP_REST_Request( 'PUT', sprintf( '/wp/v2/comments/%d', self::$approved_id ) );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1668,7 +1624,6 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertEquals( $params['author_email'], $comment['author_email'] );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertEquals( $params['author_ip'], $comment['author_ip'] );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertEquals( $params['post'], $comment['post'] );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertEquals( $params['karma'], $comment['karma'] );
</del><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertEquals( mysql_to_rfc3339( $updated->comment_date ), $comment['date'] );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertEquals( '2014-11-07T10:14:25', $comment['date'] );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2223,7 +2178,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $response = $this->server->dispatch( $request );
</span><span class="cx" style="display: block; padding: 0 10px">                $data = $response->get_data();
</span><span class="cx" style="display: block; padding: 0 10px">                $properties = $data['schema']['properties'];
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertEquals( 18, count( $properties ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertEquals( 17, count( $properties ) );
</ins><span class="cx" style="display: block; padding: 0 10px">                 $this->assertArrayHasKey( 'id', $properties );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertArrayHasKey( 'author', $properties );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertArrayHasKey( 'author_avatar_urls', $properties );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2235,7 +2190,6 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertArrayHasKey( 'content', $properties );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertArrayHasKey( 'date', $properties );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertArrayHasKey( 'date_gmt', $properties );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertArrayHasKey( 'karma', $properties );
</del><span class="cx" style="display: block; padding: 0 10px">                 $this->assertArrayHasKey( 'link', $properties );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertArrayHasKey( 'meta', $properties );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertArrayHasKey( 'parent', $properties );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2382,7 +2336,6 @@
</span><span class="cx" style="display: block; padding: 0 10px">                        $this->assertEquals( $comment->comment_author_IP, $data['author_ip'] );
</span><span class="cx" style="display: block; padding: 0 10px">                        $this->assertEquals( $comment->comment_agent, $data['author_user_agent'] );
</span><span class="cx" style="display: block; padding: 0 10px">                        $this->assertEquals( $comment->comment_content, $data['content']['raw'] );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        $this->assertEquals( $comment->comment_karma, $data['karma'] );
</del><span class="cx" style="display: block; padding: 0 10px">                 }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                if ( 'edit' !== $context ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2390,7 +2343,6 @@
</span><span class="cx" style="display: block; padding: 0 10px">                        $this->assertArrayNotHasKey( 'author_ip', $data );
</span><span class="cx" style="display: block; padding: 0 10px">                        $this->assertArrayNotHasKey( 'author_user_agent', $data );
</span><span class="cx" style="display: block; padding: 0 10px">                        $this->assertArrayNotHasKey( 'raw', $data['content'] );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        $this->assertArrayNotHasKey( 'karma', $data );
</del><span class="cx" style="display: block; padding: 0 10px">                 }
</span><span class="cx" style="display: block; padding: 0 10px">        }
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span></span></pre>
</div>
</div>

</body>
</html>