<!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>[2659] sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory: Plugin Directory: Add support for internal notes.</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="http://meta.trac.wordpress.org/changeset/2659">2659</a><script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","description":"Review this Commit","action":{"@type":"ViewAction","url":"http://meta.trac.wordpress.org/changeset/2659","name":"Review Commit"}}</script></dd>
<dt style="float: left; width: 6em; font-weight: bold">Author</dt> <dd>obenland</dd>
<dt style="float: left; width: 6em; font-weight: bold">Date</dt> <dd>2016-03-01 19:59:36 +0000 (Tue, 01 Mar 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'>Plugin Directory: Add support for internal notes.

Needs some more permission checks.

See <a href="http://meta.trac.wordpress.org/ticket/1570">#1570</a>.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentpluginsplugindirectoryadminclasscustomizationsphp">sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/admin/class-customizations.php</a></li>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentpluginsplugindirectoryadminmetaboxclasscontrolsphp">sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/admin/metabox/class-controls.php</a></li>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentpluginsplugindirectorycsseditformcss">sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/css/edit-form.css</a></li>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentpluginsplugindirectoryjseditformjs">sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/js/edit-form.js</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentpluginsplugindirectoryadminmetaboxclassnotesphp">sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/admin/metabox/class-notes.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="sitestrunkwordpressorgpublic_htmlwpcontentpluginsplugindirectoryadminclasscustomizationsphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/admin/class-customizations.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/admin/class-customizations.php  2016-03-01 19:00:09 UTC (rev 2658)
+++ sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/admin/class-customizations.php    2016-03-01 19:59:36 UTC (rev 2659)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -26,6 +26,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                add_action( 'save_post_plugin', array( $this, 'save_plugin_post' ), 10, 2 );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_assets' ) );
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                add_action( 'wp_ajax_save-note', array( $this, 'save_note' ) );
</ins><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 class="lines" style="display: block; padding: 0 10px; color: #888">@@ -54,7 +55,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                if ( 'post.php' == $hook_suffix && 'plugin' == $post_type ) {
</span><span class="cx" style="display: block; padding: 0 10px">                        wp_enqueue_style( 'plugin-admin-edit-css', plugins_url( 'css/edit-form.css', Plugin_Directory\PLUGIN_FILE ), array( 'edit' ), 1 );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        wp_enqueue_script( 'plugin-admin-edit-js', plugins_url( 'js/edit-form.js', Plugin_Directory\PLUGIN_FILE ), array(), 1 );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                 wp_enqueue_script( 'plugin-admin-edit-js', plugins_url( 'js/edit-form.js', Plugin_Directory\PLUGIN_FILE ), array( 'wp-util' ), 1 );
</ins><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 class="lines" style="display: block; padding: 0 10px; color: #888">@@ -77,6 +78,13 @@
</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">                add_meta_box(
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                        'plugin-notes',
+                       __( 'Internal Notes', 'wporg-plugins' ),
+                       array( __NAMESPACE__ . '\Metabox\Notes', 'display' ),
+                       'plugin', 'normal', 'high'
+               );
+
+               add_meta_box(
</ins><span class="cx" style="display: block; padding: 0 10px">                         'plugin-review',
</span><span class="cx" style="display: block; padding: 0 10px">                        __( 'Plugin Review Tools', 'wporg-plugins' ),
</span><span class="cx" style="display: block; padding: 0 10px">                        array( __NAMESPACE__ . '\Metabox\Review_Tools', 'display' ),
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -117,4 +125,26 @@
</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"> 
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+        /**
+        * Saves a plugin note.
+        */
+       public function save_note() {
+               check_admin_referer( 'save-note', 'notce' );
+
+               if ( empty( $_POST['id'] ) ) {
+                       wp_send_json_error( array( 'errorCode' => 'no_post_specified' ) );
+               }
+
+               if ( ! current_user_can( 'review_plugin', absint( $_POST['id'] ) ) ) {
+                       wp_send_json_error( array(
+                               'error' => __( 'You do not have sufficient permissions to edit notes on this site.' ),
+                       ) );
+               }
+
+               update_post_meta( absint( $_POST['id'] ), 'note', wp_kses_post( $_POST['note'] ) );
+
+               wp_send_json_success( array(
+                       'note' => wpautop( wp_kses_post( $_POST['note'] ) ),
+               ) );
+       }
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span></span></pre></div>
<a id="sitestrunkwordpressorgpublic_htmlwpcontentpluginsplugindirectoryadminmetaboxclasscontrolsphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/admin/metabox/class-controls.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/admin/metabox/class-controls.php        2016-03-01 19:00:09 UTC (rev 2658)
+++ sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/admin/metabox/class-controls.php  2016-03-01 19:59:36 UTC (rev 2659)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -21,7 +21,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                                        self::display_tested_up_to();
</span><span class="cx" style="display: block; padding: 0 10px">                                }
</span><span class="cx" style="display: block; padding: 0 10px">                        echo '</div>';
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-        
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px">                         echo '<div id="major-publishing-actions"><div id="publishing-action">';
</span><span class="cx" style="display: block; padding: 0 10px">                                echo '<span class="spinner"></span>';
</span><span class="cx" style="display: block; padding: 0 10px">                                printf( '<input type="submit" name="save_changes" id="publish" class="button button-primary button-large" value="%s">', __( 'Save Changes', 'wporg-plugins' ) );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -40,29 +40,31 @@
</span><span class="cx" style="display: block; padding: 0 10px">                ?>
</span><span class="cx" style="display: block; padding: 0 10px">                <div class="misc-pub-section misc-pub-plugin-status">
</span><span class="cx" style="display: block; padding: 0 10px">                        <label for="post_status"><?php _e( 'Status:', 'wporg-plugins' ); ?></label>
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        <span id="plugin-status-display"><?php echo esc_html( get_post_status_object( $post->post_status )->label ); ?></span>
-                       <a href="#plugin_status" class="edit-plugin-status hide-if-no-js"><span aria-hidden="true">Edit</span> <span class="screen-reader-text">Edit status</span></a>
-               
-                       <div id="plugin-status-select" class="hide-if-js">
-                               <input type="hidden" name="hidden_post_status" id="hidden_post_status" value="<?php echo esc_attr( $post->post_status ); ?>">
-                               <select name="post_status" id="plugin_status">
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                 <strong id="plugin-status-display"><?php echo esc_html( get_post_status_object( $post->post_status )->label ); ?></strong>
+                       <button type="button" class="button-link edit-plugin-status hide-if-no-js">
+                               <span aria-hidden="true"><?php _e( 'Edit', 'wporg-plugins' ); ?></span>
+                               <span class="screen-reader-text"><?php _e( 'Edit plugin status', 'wporg-plugins' ); ?></span>
+                       </button>
+
+                       <div id="plugin-status-select" class="plugin-control-select hide-if-js">
+                               <input type="hidden" name="hidden_post_status" id="hidden-post-status" value="<?php echo esc_attr( $post->post_status ); ?>">
+                               <select name="post_status" id="plugin-status">
</ins><span class="cx" style="display: block; padding: 0 10px">                                         <?php
</span><span class="cx" style="display: block; padding: 0 10px">                                        foreach ( $statuses as $statii ) {
</span><span class="cx" style="display: block; padding: 0 10px">                                                $status_object = get_post_status_object( $statii );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                                $selected = selected( $post->post_status, $statii, false );
</del><span class="cx" style="display: block; padding: 0 10px">                                                 printf(
</span><span class="cx" style="display: block; padding: 0 10px">                                                        '<option value="%s" %s>%s</option>',
</span><span class="cx" style="display: block; padding: 0 10px">                                                        esc_attr( $statii ),
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                                        $selected,
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                                                 selected( $post->post_status, $statii, false ),
</ins><span class="cx" style="display: block; padding: 0 10px">                                                         esc_html( $status_object->label )
</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">                                        ?>
</span><span class="cx" style="display: block; padding: 0 10px">                                </select>
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                <a href="#plugin_status" class="save-plugin-status hide-if-no-js button">OK</a>
-                               <a href="#plugin_status" class="cancel-plugin-status hide-if-no-js button-cancel">Cancel</a>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         <button type="button" class="save-plugin-status hide-if-no-js button"><?php _e( 'OK', 'wporg-plugins' ); ?></button>
+                               <button type="button" class="cancel-plugin-status hide-if-no-js button-link"><?php _e( 'Cancel', 'wporg-plugins' ); ?></button>
</ins><span class="cx" style="display: block; padding: 0 10px">                         </div>
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px">                 </div><!-- .misc-pub-section --><?php
</span><span class="cx" style="display: block; padding: 0 10px">        }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -70,20 +72,23 @@
</span><span class="cx" style="display: block; padding: 0 10px">         * Displays the Tested Up To control in the Publish metabox.
</span><span class="cx" style="display: block; padding: 0 10px">         */
</span><span class="cx" style="display: block; padding: 0 10px">        protected static function display_tested_up_to() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $post = get_post();
-               $tested_up_to = (string) get_post_meta( $post->ID, 'tested', true );
-               $versions = self::get_tested_up_to_versions( $tested_up_to );
-               $tested_up_to = $versions['tested_up_to'];
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $post           = get_post();
+               $tested_up_to   = (string) get_post_meta( $post->ID, 'tested', true );
+               $versions       = self::get_tested_up_to_versions( $tested_up_to );
+               $tested_up_to   = $versions['tested_up_to'];
</ins><span class="cx" style="display: block; padding: 0 10px">                 $unknown_string = _x( 'Unknown', 'unknown version', 'wporg-plugins' );
</span><span class="cx" style="display: block; padding: 0 10px">                ?>
</span><span class="cx" style="display: block; padding: 0 10px">                <div class="misc-pub-section misc-pub-tested">
</span><span class="cx" style="display: block; padding: 0 10px">                        <label for="tested_with"><?php _e( 'Tested With:', 'wporg-plugins' ); ?></label>
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        <span id="tested-with-display"><?php echo ( $tested_up_to ? sprintf( 'WordPress %s', $tested_up_to ) : $unknown_string ); ?></span>
-                       <a href="#tested_with" class="edit-tested-with hide-if-no-js"><span aria-hidden="true">Edit</span> <span class="screen-reader-text">Edit status</span></a>
-               
-                       <div id="tested-with-select" class="hide-if-js">
-                               <input type="hidden" name="hidden_tested_with" id="hidden_tested_with" value="<?php echo esc_attr( $tested_up_to ); ?>">
-                               <select name="tested_with" id="tested_with">
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                 <strong id="tested-with-display"><?php echo ( $tested_up_to ? sprintf( 'WordPress %s', $tested_up_to ) : $unknown_string ); ?></strong>
+                       <button type="button" class="button-link edit-tested-with hide-if-no-js">
+                               <span aria-hidden="true"><?php _e( 'Edit', 'wporg-plugins' ); ?></span>
+                               <span class="screen-reader-text"><?php _e( 'Edit tested with version', 'wporg-plugins' ); ?></span>
+                       </button>
+
+                       <div id="tested-with-select" class="plugin-control-select hide-if-js">
+                               <input type="hidden" name="hidden_tested_with" id="hidden-tested-with" value="<?php echo esc_attr( $tested_up_to ); ?>">
+                               <select name="tested_with" id="tested-with">
</ins><span class="cx" style="display: block; padding: 0 10px">                                         <?php
</span><span class="cx" style="display: block; padding: 0 10px">                                        foreach ( $versions['versions'] as $ver ) {
</span><span class="cx" style="display: block; padding: 0 10px">                                                printf(
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -95,10 +100,10 @@
</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">                                </select>
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                <a href="#tested_with" class="save-tested-with hide-if-no-js button">OK</a>
-                               <a href="#tested_with" class="cancel-tested-with hide-if-no-js button-cancel">Cancel</a>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         <button type="button" class="save-tested-with hide-if-no-js button"><?php _e( 'OK', 'wporg-plugins' ); ?></button>
+                               <button type="button" class="cancel-tested-with hide-if-no-js button-link"><?php _e( 'Cancel', 'wporg-plugins' ); ?></button>
</ins><span class="cx" style="display: block; padding: 0 10px">                         </div>
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px">                 </div><!-- .misc-pub-section --><?php
</span><span class="cx" style="display: block; padding: 0 10px">        }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span></span></pre></div>
<a id="sitestrunkwordpressorgpublic_htmlwpcontentpluginsplugindirectoryadminmetaboxclassnotesphp"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/admin/metabox/class-notes.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/admin/metabox/class-notes.php                           (rev 0)
+++ sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/admin/metabox/class-notes.php     2016-03-01 19:59:36 UTC (rev 2659)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,32 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+<?php
+namespace WordPressdotorg\Plugin_Directory\Admin\Metabox;
+use WordPressdotorg\Plugin_Directory\Tools;
+
+/**
+ * The Internal Notes admin metabox.
+ *
+ * @package WordPressdotorg\Plugin_Directory\Admin\Metabox
+ */
+class Notes {
+
+       /**
+        *
+        */
+       static function display( $post ) {
+               $note = (string) get_post_meta( $post->ID, 'note', true );
+
+               ?>
+               <div class="view-note hide-if-no-js">
+                       <?php echo empty( $note ) ? __( 'Add note', 'wporg-plugins' ) : wpautop( $note ); ?>
+               </div>
+               <div class="edit-note show-if-no-js" style="display: none;">
+                       <?php wp_nonce_field( 'save-note', 'notce' ); ?>
+                       <textarea class="note-content" rows="5" style="width: 100%;"><?php echo $note; ?></textarea>
+                       <p>
+                               <button type="button" class="button button-primary save-note"><?php _e( 'Save', 'wporg-plugins' ); ?></button>
+                               <button type="reset" class="button button-secondary cancel-note"><?php _e( 'Cancel', 'wporg-plugins' ); ?></button>
+                       </p>
+               </div>
+               <?php
+       }
+}
</ins><span class="cx" style="display: block; padding: 0 10px">Property changes on: sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/admin/metabox/class-notes.php
</span><span class="cx" style="display: block; padding: 0 10px">___________________________________________________________________
</span></span></pre></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: svn:eol-style</h4></div>
<ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+native
</ins><span class="cx" style="display: block; padding: 0 10px">\ No newline at end of property
</span><a id="sitestrunkwordpressorgpublic_htmlwpcontentpluginsplugindirectorycsseditformcss"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/css/edit-form.css</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/css/edit-form.css       2016-03-01 19:00:09 UTC (rev 2658)
+++ sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/css/edit-form.css 2016-03-01 19:59:36 UTC (rev 2659)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1,7 +1,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /*
</span><span class="cx" style="display: block; padding: 0 10px">  * CSS Rules for the Plugin Admin screen
</span><span class="cx" style="display: block; padding: 0 10px">  */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-#misc-publishing-actions label::before {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+.misc-pub-section label::before {
</ins><span class="cx" style="display: block; padding: 0 10px">         font: normal 20px/1 dashicons;
</span><span class="cx" style="display: block; padding: 0 10px">        speak: none;
</span><span class="cx" style="display: block; padding: 0 10px">        display: inline-block;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -16,25 +16,14 @@
</span><span class="cx" style="display: block; padding: 0 10px">        color: #82878c;
</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">-#misc-publishing-actions label[for="post_status"]::before {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+.misc-pub-section label[for="post_status"]::before {
</ins><span class="cx" style="display: block; padding: 0 10px">         content: "\f173";
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-#misc-publishing-actions label[for="tested_with"]::before {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+.misc-pub-section label[for="tested_with"]::before {
</ins><span class="cx" style="display: block; padding: 0 10px">         content: "\f177";
</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">-#misc-publishing-actions span#plugin-status-display,
-#misc-publishing-actions span#tested-with-display {
-       font-weight: bold;
-}
-
-.inside-submitbox #plugin-status,
-.inside-submitbox #tested-with {
-       margin: 2px 0 2px -2px;
-}
-
-#plugin-status-select,
-#tested-with-select {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+.plugin-control-select {
</ins><span class="cx" style="display: block; padding: 0 10px">         margin-top: 3px;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -42,3 +31,29 @@
</span><span class="cx" style="display: block; padding: 0 10px"> .wp-admin.post-type-plugin #post-body-content {
</span><span class="cx" style="display: block; padding: 0 10px">        display: none;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+.misc-pub-section .button-link {
+       color: #0073aa;
+       -webkit-transition-property: border, background, color;
+       transition-property: border, background, color;
+       -webkit-transition-duration: .05s;
+       transition-duration: .05s;
+       -webkit-transition-timing-function: ease-in-out;
+       transition-timing-function: ease-in-out;
+    text-decoration: underline;
+}
+
+.misc-pub-section .button-link:hover,
+.misc-pub-section .button-link:active {
+       color: #00a0d2;
+}
+
+.misc-pub-section .button-link:focus {
+       color: #124964;
+       -webkit-box-shadow:
+               0 0 0 1px #5b9dd9,
+               0 0 2px 1px rgba(30, 140, 190, .8);
+       box-shadow:
+               0 0 0 1px #5b9dd9,
+               0 0 2px 1px rgba(30, 140, 190, .8);
+}
</ins><span class="cx" style="display: block; padding: 0 10px">\ No newline at end of file
</span></span></pre></div>
<a id="sitestrunkwordpressorgpublic_htmlwpcontentpluginsplugindirectoryjseditformjs"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/js/edit-form.js</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/js/edit-form.js 2016-03-01 19:00:09 UTC (rev 2658)
+++ sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/js/edit-form.js   2016-03-01 19:59:36 UTC (rev 2659)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2,68 +2,97 @@
</span><span class="cx" style="display: block; padding: 0 10px">  * JS for the Plugin Admin screens.
</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">-jQuery(document).ready( function($) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+( function( $, wp ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-        var updateText,
-               $testedWithSelect = $('#tested-with-select'),
-               $pluginStatusSelect = $('#plugin-status-select');
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ var PluginEdit = {
+               $notesBox: {},
+               $testedWith: {},
+               $pluginStatus: {},
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-        // submitdiv
-       if ( $('#submitdiv').length ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         ready: function() {
+                       PluginEdit.$notesBox     = $( '#plugin-notes' );
+                       PluginEdit.$testedWith   = $( '#tested-with-select' );
+                       PluginEdit.$pluginStatus = $( '#plugin-status-select' );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                updateText = function() {
-                       $('#plugin-status-display').html( $('option:selected', $pluginStatusSelect).text() );
-                       $('#tested-with-display').html( $('option:selected', $testedWithSelect).text() );
-                       return true;
-               };
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                 $( '#submitdiv' )
+                               .on( 'click', '.edit-tested-with',     PluginEdit.editTestedWith )
+                               .on( 'click', '.edit-plugin-status',   PluginEdit.editPluginStatus )
+                               .on( 'click', '.save-tested-with',     PluginEdit.updateTestedWith )
+                               .on( 'click', '.save-plugin-status',   PluginEdit.updatePluginStatus )
+                               .on( 'click', '.cancel-tested-with',   PluginEdit.cancelTestedWith )
+                               .on( 'click', '.cancel-plugin-status', PluginEdit.cancelPluginStatus );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                // Plugin Status / post_status
-               $pluginStatusSelect.siblings('a.edit-plugin-status').click( function( event ) {
-                       if ( $pluginStatusSelect.is( ':hidden' ) ) {
-                               $pluginStatusSelect.slideDown( 'fast', function() {
-                                       $pluginStatusSelect.find('select').focus();
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                 PluginEdit.$notesBox
+                               .on( 'click', '.cancel-note', PluginEdit.showNote )
+                               .on( 'click', '.view-note',   PluginEdit.editNote )
+                               .on( 'click', '.save-note',   PluginEdit.saveNote );
+               },
+
+               editTestedWith: function() {
+                       if ( PluginEdit.$testedWith.is( ':hidden' ) ) {
+                               PluginEdit.$testedWith.slideDown( 'fast', function() {
+                                       $( 'select', PluginEdit.$testedWith ).focus();
</ins><span class="cx" style="display: block; padding: 0 10px">                                 } );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                $(this).hide();
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         $( this ).hide();
</ins><span class="cx" style="display: block; padding: 0 10px">                         }
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        event.preventDefault();
-               });
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         },
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $pluginStatusSelect.find('.save-plugin-status').click( function( event ) {
-                       $pluginStatusSelect.slideUp( 'fast' ).siblings( 'a.edit-plugin-status' ).show().focus();
-                       updateText();
-                       event.preventDefault();
-               });
-
-               $pluginStatusSelect.find('.cancel-plugin-status').click( function( event ) {
-                       $pluginStatusSelect.slideUp( 'fast' ).siblings( 'a.edit-plugin-status' ).show().focus();
-                       $('#post_status').val( $('#hidden_post_status').val() );
-                       updateText();
-                       event.preventDefault();
-               });
-
-               // Tested With
-               $testedWithSelect.siblings('a.edit-tested-with').click( function( event ) {
-                       if ( $testedWithSelect.is( ':hidden' ) ) {
-                               $testedWithSelect.slideDown( 'fast', function() {
-                                       $testedWithSelect.find('select').focus();
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         editPluginStatus: function() {
+                       if ( PluginEdit.$pluginStatus.is( ':hidden' ) ) {
+                               PluginEdit.$pluginStatus.slideDown( 'fast', function() {
+                                       $( 'select', PluginEdit.$pluginStatus ).focus();
</ins><span class="cx" style="display: block; padding: 0 10px">                                 } );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                $(this).hide();
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         $( this ).hide();
</ins><span class="cx" style="display: block; padding: 0 10px">                         }
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        event.preventDefault();
-               });
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         },
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $testedWithSelect.find('.save-tested-with').click( function( event ) {
-                       $testedWithSelect.slideUp( 'fast' ).siblings( 'a.edit-tested-with' ).show().focus();
-                       updateText();
-                       event.preventDefault();
-               });
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         updateTestedWith: function() {
+                       PluginEdit.$testedWith.slideUp( 'fast' ).siblings( 'button.edit-tested-with' ).show().focus();
+                       $( '#tested-with-display' ).text( $( 'option:selected', PluginEdit.$testedWith ).text() );
+               },
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $testedWithSelect.find('.cancel-tested-with').click( function( event ) {
-                       $testedWithSelect.slideUp( 'fast' ).siblings( 'a.edit-tested-with' ).show().focus();
-                       $('#tested_with').val( $('#hidden_tested_with').val() );
-                       updateText();
-                       event.preventDefault();
-               });
-       } // end submitdiv
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         updatePluginStatus: function() {
+                       PluginEdit.$pluginStatus.slideUp( 'fast' ).siblings( 'button.edit-plugin-status' ).show().focus();
+                       $( '#plugin-status-display' ).text( $( 'option:selected', PluginEdit.$pluginStatus ).text() );
+               },
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-} );
</del><span class="cx" style="display: block; padding: 0 10px">\ No newline at end of file
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                cancelTestedWith: function() {
+                       $( '#tested-with' ).val( $( '#hidden-tested-with' ).val() );
+                       PluginEdit.updateTestedWith();
+               },
+
+               cancelPluginStatus: function() {
+                       $( '#post-status' ).val( $( '#hidden-post-status' ).val() );
+                       PluginEdit.updatePluginStatus( event );
+               },
+
+               showNote: function() {
+                       $( '.view-note', PluginEdit.$notesBox ).show();
+                       $( '.edit-note', PluginEdit.$notesBox ).hide();
+               },
+
+               editNote: function() {
+                       var $textarea = $( '.note-content', PluginEdit.$notesBox );
+
+                       $( '.view-note', PluginEdit.$notesBox ).hide();
+                       $( '.edit-note', PluginEdit.$notesBox ).show();
+                       $textarea.text( $textarea.val() ).focus();
+               },
+
+               saveNote: function() {
+                       wp.ajax.post( 'save-note', {
+                               id: $( '#post_ID' ).val(),
+                               note: $( '.note-content', PluginEdit.$notesBox ).val(),
+                               notce: $( '#notce' ).val()
+                       } )
+                               .done( function( response ) {
+                                       var note = response.note ? response.note : 'Add note';
+
+                                       $( '.view-note', PluginEdit.$notesBox ).html( note );
+                                       PluginEdit.showNote();
+                               } );
+               }
+       };
+
+       $( PluginEdit.ready );
+} )( window.jQuery, window.wp );
</ins></span></pre>
</div>
</div>

</body>
</html>