<!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>[2763] sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/admin: Plugin Directory: Move list table classes into their own directory.</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/2763">2763</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/2763","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-17 18:49:00 +0000 (Thu, 17 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: Move list table classes into their own directory.
See <a href="http://meta.trac.wordpress.org/ticket/1570">#1570</a>, <a href="http://meta.trac.wordpress.org/ticket/1571">#1571</a>.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentpluginsplugindirectoryadminmetaboxclasscommittersphp">sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/admin/metabox/class-committers.php</a></li>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentpluginsplugindirectoryadminmetaboxclassinternalnotesphp">sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/admin/metabox/class-internal-notes.php</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li>sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/admin/list-table/</li>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentpluginsplugindirectoryadminlisttableclasscommittersphp">sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/admin/list-table/class-committers.php</a></li>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentpluginsplugindirectoryadminlisttableclassplugincommentsphp">sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/admin/list-table/class-plugin-comments.php</a></li>
</ul>
<h3>Removed Paths</h3>
<ul>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentpluginsplugindirectoryadminclasscommitterslisttablephp">sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/admin/class-committers-list-table.php</a></li>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentpluginsplugindirectoryadminclassplugincommentslisttablephp">sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/admin/class-plugin-comments-list-table.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="sitestrunkwordpressorgpublic_htmlwpcontentpluginsplugindirectoryadminclasscommitterslisttablephp"></a>
<div class="delfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Deleted: sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/admin/class-committers-list-table.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-committers-list-table.php 2016-03-17 18:42:01 UTC (rev 2762)
+++ sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/admin/class-committers-list-table.php 2016-03-17 18:49:00 UTC (rev 2763)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1,218 +0,0 @@
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-<?php
-namespace WordPressdotorg\Plugin_Directory\Admin;
-use WordPressdotorg\Plugin_Directory\Tools;
-
-_get_list_table( 'WP_List_Table' );
-
-/**
- * Comments list table for comments meta box.
- *
- * @package WordPressdotorg\Plugin_Directory\Admin
- */
-class Committers_List_Table extends \WP_List_Table {
-
- /**
- * Constructor.
- *
- * @see WP_List_Table::__construct() for more information on default arguments.
- *
- * @param array $args An associative array of arguments.
- */
- public function __construct( $args = array() ) {
- parent::__construct( array(
- 'singular' => 'committer',
- 'plural' => 'committers',
- 'screen' => isset( $args['screen'] ) ? $args['screen'] : null,
- ) );
- }
-
- /**
- * Check the current user's permissions.
- *
- * @return bool
- */
- public function ajax_user_can() {
- return current_user_can( 'manage_committers' );
- }
-
- /**
- * Prepare the users list for display.
- *
- * @access public
- *
- * @global string $role
- * @global string $usersearch
- */
- public function prepare_items() {
- $plugin_slug = get_post()->post_name;
- $existing_committers = Tools::get_plugin_committers( $plugin_slug );
- $this->items = array_map( function ( $user ) {
- return new \WP_User( $user );
- }, $existing_committers );
- }
-
- /**
- * Output 'no users' message.
- *
- * @access public
- */
- public function no_items() {
- _e( 'No committers found.', 'wporg-plugins' );
- }
-
- /**
- *
- * @return array
- */
- protected function get_table_classes() {
- $classes = parent::get_table_classes();
- $classes[] = 'wp-list-table';
-
- unset( $classes[ array_search( 'striped', $classes ) ] );
-
- return $classes;
- }
-
- /**
- *
- * @return array
- */
- protected function get_column_info() {
- return array(
- array(
- 'avatar' => __( 'Avatar', 'wporg-plugins' ),
- 'username' => __( 'Username', 'wporg-plugins' ),
- ),
- array(),
- array(),
- 'username',
- );
- }
-
- /**
- *
- */
- public function display() {
- ?>
- <table class="<?php echo implode( ' ', $this->get_table_classes() ); ?>">
- <colgroup>
- <col width="40px" />
- <col />
- </colgroup>
- <tbody id="the-committer-list" data-wp-lists="list:committer">
- <?php $this->display_rows_or_placeholder(); ?>
- </tbody>
- </table>
- <?php
- }
-
- /**
- * Generate the list table rows.
- *
- * @access public
- */
- public function display_rows() {
- foreach ( $this->items as $user_object ) {
- echo "\n\t" . $this->single_row( $user_object );
- }
- ?>
- <tr id="add-committer" class="add-committer wp-hidden-children">
- <td colspan="2">
- <button type="button" id="add-committer-toggle" class="button-link"><?php _e( '+ Add New Committer', 'wporg-plugins' ); ?></button>
- <p class="wp-hidden-child">
- <?php wp_nonce_field( 'add-committer', '_ajax_nonce', false ); ?>
- <span id="committer-error" class="notice notice-alt notice-error" style="display:none;"></span>
- <input type="text" name="add_committer" class="form-required" value="" aria-required="true">
- <input type="button" id="add-committer-submit" class="button" data-wp-lists="add:the-committer-list:add-committer::post_id=<?php echo get_post()->ID; ?>" value="<?php _e( 'Add Committer', 'wporg-plugins' ); ?>">
- </p>
- </td>
- </tr>
- <?php
- }
-
- /**
- * Generate HTML for a single row on the users.php admin panel.
- *
- * @access public
- *
- * @param object $user_object The current user object.
- * @return string Output for a single row.
- */
- public function single_row( $user_object ) {
- if ( ! ( $user_object instanceof \WP_User ) ) {
- $user_object = get_userdata( (int) $user_object );
- }
- $user_object->filter = 'display';
- list( $columns, $hidden, $sortable, $primary ) = $this->get_column_info();
-
- // Set up the hover actions for this committer.
- $actions = array();
-
- // Check if the committer for this row is removable.
- if ( current_user_can( 'list_users' ) ) {
- $post_id = get_post()->ID;
- $actions['delete'] = "<a class='submitremove' data-wp-lists='delete:the-committer-list:committer-{$user_object->ID}:faafaa:post_id={$post_id}' href='" . wp_nonce_url( 'users.php?action=remove&committer=' . $user_object->ID, "remove-committer-{$user_object->ID}" ) . "'>" . __( 'Remove', 'wporg-plugins' ) . "</a>";
- }
-
- /**
- * Filter the action links displayed under each committer in the Committers list table.
- *
- * @param array $actions An array of action links to be displayed.
- * @param \WP_User $user_object WP_User object for the currently-listed committer.
- */
- $actions = apply_filters( 'committer_row_actions', $actions, $user_object );
-
- $row = "<tr id='committer-$user_object->ID'>";
-
- foreach ( $columns as $column_name => $column_display_name ) {
- $data = 'data-colname="' . wp_strip_all_tags( $column_display_name ) . '"';
- $classes = "$column_name column-$column_name";
-
- if ( $primary === $column_name ) {
- $classes .= ' has-row-actions column-primary';
- }
- if ( in_array( $column_name, $hidden ) ) {
- $classes .= ' hidden';
- }
-
- $row .= "<td class='$classes' $data>";
- switch ( $column_name ) {
- case 'avatar':
- $row .= get_avatar( $user_object->ID, 32 );
- break;
-
- case 'username':
- $row .= "<strong>$user_object->user_login</strong><br />";
- break;
-
- default:
- /**
- * Filter the display output of custom columns in the Users list table.
- *
- * @param string $output Custom column output. Default empty.
- * @param string $column_name Column name.
- * @param int $user_id ID of the currently-listed user.
- */
- $row .= apply_filters( 'manage_committers_custom_column', '', $column_name, $user_object->ID );
- }
- if ( $primary === $column_name ) {
- $row .= $this->row_actions( $actions );
- }
- $row .= '</td>';
- }
- $row .= '</tr>';
-
- return $row;
- }
-
- /**
- * Gets the name of the default primary column.
- *
- * @access protected
- *
- * @return string Name of the default primary column, in this case, 'username'.
- */
- protected function get_default_primary_column_name() {
- return 'username';
- }
-}
</del></span></pre></div>
<a id="sitestrunkwordpressorgpublic_htmlwpcontentpluginsplugindirectoryadminclassplugincommentslisttablephp"></a>
<div class="delfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Deleted: sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/admin/class-plugin-comments-list-table.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-plugin-comments-list-table.php 2016-03-17 18:42:01 UTC (rev 2762)
+++ sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/admin/class-plugin-comments-list-table.php 2016-03-17 18:49:00 UTC (rev 2763)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1,57 +0,0 @@
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-<?php
-namespace WordPressdotorg\Plugin_Directory\Admin;
-
-_get_list_table( 'WP_Post_Comments_List_Table' );
-
-/**
- * Comments list table for comments meta box.
- *
- * @package WordPressdotorg\Plugin_Directory\Admin
- */
-class Plugin_Comments_List_Table extends \WP_Post_Comments_List_Table {
- /**
- * Comment type.
- *
- * @var string
- */
- public $comment_type = '';
-
- /**
- * Constructor.
- *
- * @see WP_List_Table::__construct() for more information on default arguments.
- *
- * @param array $args An associative array of arguments.
- */
- public function __construct( $args = array() ) {
- if ( ! empty( $args['comment_type'] ) ) {
- $this->comment_type = $args['comment_type'];
- }
- parent::__construct( $args );
- }
-
- /**
- *
- * @param bool $output_empty
- */
- public function display( $output_empty = false ) {
- $singular = $this->_args['singular'];
-
- wp_nonce_field( "fetch-list-" . get_class( $this ), '_ajax_fetch_list_nonce' );
- ?>
- <table class="<?php echo implode( ' ', $this->get_table_classes() ); ?>" data-comment-type="<?php echo esc_attr( $this->comment_type ); ?>" style="display:none;">
- <colgroup>
- <col width="20%">
- <col width="80%">
- </colgroup>
- <tbody id="the-comment-list"<?php if ( $singular ) { echo " data-wp-lists='list:$singular'"; } ?>>
- <?php
- if ( ! $output_empty ) {
- $this->display_rows_or_placeholder();
- }
- ?>
- </tbody>
- </table>
- <?php
- }
-}
</del></span></pre></div>
<a id="sitestrunkwordpressorgpublic_htmlwpcontentpluginsplugindirectoryadminlisttableclasscommittersphpfromrev2760sitestrunkwordpressorgpublic_htmlwpcontentpluginsplugindirectoryadminclasscommitterslisttablephp"></a>
<div class="copfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Copied: sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/admin/list-table/class-committers.php (from rev 2760, sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/admin/class-committers-list-table.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/list-table/class-committers.php (rev 0)
+++ sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/admin/list-table/class-committers.php 2016-03-17 18:49:00 UTC (rev 2763)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,218 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+<?php
+namespace WordPressdotorg\Plugin_Directory\Admin\List_Table;
+use WordPressdotorg\Plugin_Directory\Tools;
+
+_get_list_table( 'WP_List_Table' );
+
+/**
+ * Comments list table for comments meta box.
+ *
+ * @package WordPressdotorg\Plugin_Directory\Admin
+ */
+class Committers extends \WP_List_Table {
+
+ /**
+ * Constructor.
+ *
+ * @see WP_List_Table::__construct() for more information on default arguments.
+ *
+ * @param array $args An associative array of arguments.
+ */
+ public function __construct( $args = array() ) {
+ parent::__construct( array(
+ 'singular' => 'committer',
+ 'plural' => 'committers',
+ 'screen' => isset( $args['screen'] ) ? $args['screen'] : null,
+ ) );
+ }
+
+ /**
+ * Check the current user's permissions.
+ *
+ * @return bool
+ */
+ public function ajax_user_can() {
+ return current_user_can( 'manage_committers' );
+ }
+
+ /**
+ * Prepare the users list for display.
+ *
+ * @access public
+ *
+ * @global string $role
+ * @global string $usersearch
+ */
+ public function prepare_items() {
+ $plugin_slug = get_post()->post_name;
+ $existing_committers = Tools::get_plugin_committers( $plugin_slug );
+ $this->items = array_map( function ( $user ) {
+ return new \WP_User( $user );
+ }, $existing_committers );
+ }
+
+ /**
+ * Output 'no users' message.
+ *
+ * @access public
+ */
+ public function no_items() {
+ _e( 'No committers found.', 'wporg-plugins' );
+ }
+
+ /**
+ *
+ * @return array
+ */
+ protected function get_table_classes() {
+ $classes = parent::get_table_classes();
+ $classes[] = 'wp-list-table';
+
+ unset( $classes[ array_search( 'striped', $classes ) ] );
+
+ return $classes;
+ }
+
+ /**
+ *
+ * @return array
+ */
+ protected function get_column_info() {
+ return array(
+ array(
+ 'avatar' => __( 'Avatar', 'wporg-plugins' ),
+ 'username' => __( 'Username', 'wporg-plugins' ),
+ ),
+ array(),
+ array(),
+ 'username',
+ );
+ }
+
+ /**
+ *
+ */
+ public function display() {
+ ?>
+ <table class="<?php echo implode( ' ', $this->get_table_classes() ); ?>">
+ <colgroup>
+ <col width="40px" />
+ <col />
+ </colgroup>
+ <tbody id="the-committer-list" data-wp-lists="list:committer">
+ <?php $this->display_rows_or_placeholder(); ?>
+ </tbody>
+ </table>
+ <?php
+ }
+
+ /**
+ * Generate the list table rows.
+ *
+ * @access public
+ */
+ public function display_rows() {
+ foreach ( $this->items as $user_object ) {
+ echo "\n\t" . $this->single_row( $user_object );
+ }
+ ?>
+ <tr id="add-committer" class="add-committer wp-hidden-children">
+ <td colspan="2">
+ <button type="button" id="add-committer-toggle" class="button-link"><?php _e( '+ Add New Committer', 'wporg-plugins' ); ?></button>
+ <p class="wp-hidden-child">
+ <?php wp_nonce_field( 'add-committer', '_ajax_nonce', false ); ?>
+ <span id="committer-error" class="notice notice-alt notice-error" style="display:none;"></span>
+ <input type="text" name="add_committer" class="form-required" value="" aria-required="true">
+ <input type="button" id="add-committer-submit" class="button" data-wp-lists="add:the-committer-list:add-committer::post_id=<?php echo get_post()->ID; ?>" value="<?php _e( 'Add Committer', 'wporg-plugins' ); ?>">
+ </p>
+ </td>
+ </tr>
+ <?php
+ }
+
+ /**
+ * Generate HTML for a single row on the users.php admin panel.
+ *
+ * @access public
+ *
+ * @param object $user_object The current user object.
+ * @return string Output for a single row.
+ */
+ public function single_row( $user_object ) {
+ if ( ! ( $user_object instanceof \WP_User ) ) {
+ $user_object = get_userdata( (int) $user_object );
+ }
+ $user_object->filter = 'display';
+ list( $columns, $hidden, $sortable, $primary ) = $this->get_column_info();
+
+ // Set up the hover actions for this committer.
+ $actions = array();
+
+ // Check if the committer for this row is removable.
+ if ( current_user_can( 'list_users' ) ) {
+ $post_id = get_post()->ID;
+ $actions['delete'] = "<a class='submitremove' data-wp-lists='delete:the-committer-list:committer-{$user_object->ID}:faafaa:post_id={$post_id}' href='" . wp_nonce_url( 'users.php?action=remove&committer=' . $user_object->ID, "remove-committer-{$user_object->ID}" ) . "'>" . __( 'Remove', 'wporg-plugins' ) . "</a>";
+ }
+
+ /**
+ * Filter the action links displayed under each committer in the Committers list table.
+ *
+ * @param array $actions An array of action links to be displayed.
+ * @param \WP_User $user_object WP_User object for the currently-listed committer.
+ */
+ $actions = apply_filters( 'committer_row_actions', $actions, $user_object );
+
+ $row = "<tr id='committer-$user_object->ID'>";
+
+ foreach ( $columns as $column_name => $column_display_name ) {
+ $data = 'data-colname="' . wp_strip_all_tags( $column_display_name ) . '"';
+ $classes = "$column_name column-$column_name";
+
+ if ( $primary === $column_name ) {
+ $classes .= ' has-row-actions column-primary';
+ }
+ if ( in_array( $column_name, $hidden ) ) {
+ $classes .= ' hidden';
+ }
+
+ $row .= "<td class='$classes' $data>";
+ switch ( $column_name ) {
+ case 'avatar':
+ $row .= get_avatar( $user_object->ID, 32 );
+ break;
+
+ case 'username':
+ $row .= "<strong>$user_object->user_login</strong><br />";
+ break;
+
+ default:
+ /**
+ * Filter the display output of custom columns in the Users list table.
+ *
+ * @param string $output Custom column output. Default empty.
+ * @param string $column_name Column name.
+ * @param int $user_id ID of the currently-listed user.
+ */
+ $row .= apply_filters( 'manage_committers_custom_column', '', $column_name, $user_object->ID );
+ }
+ if ( $primary === $column_name ) {
+ $row .= $this->row_actions( $actions );
+ }
+ $row .= '</td>';
+ }
+ $row .= '</tr>';
+
+ return $row;
+ }
+
+ /**
+ * Gets the name of the default primary column.
+ *
+ * @access protected
+ *
+ * @return string Name of the default primary column, in this case, 'username'.
+ */
+ protected function get_default_primary_column_name() {
+ return 'username';
+ }
+}
</ins></span></pre></div>
<a id="sitestrunkwordpressorgpublic_htmlwpcontentpluginsplugindirectoryadminlisttableclassplugincommentsphpfromrev2760sitestrunkwordpressorgpublic_htmlwpcontentpluginsplugindirectoryadminclassplugincommentslisttablephp"></a>
<div class="copfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Copied: sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/admin/list-table/class-plugin-comments.php (from rev 2760, sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/admin/class-plugin-comments-list-table.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/list-table/class-plugin-comments.php (rev 0)
+++ sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/admin/list-table/class-plugin-comments.php 2016-03-17 18:49:00 UTC (rev 2763)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,57 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+<?php
+namespace WordPressdotorg\Plugin_Directory\Admin\List_Table;
+
+_get_list_table( 'WP_Post_Comments_List_Table' );
+
+/**
+ * Comments list table for comments meta box.
+ *
+ * @package WordPressdotorg\Plugin_Directory\Admin
+ */
+class Plugin_Comments extends \WP_Post_Comments_List_Table {
+ /**
+ * Comment type.
+ *
+ * @var string
+ */
+ public $comment_type = '';
+
+ /**
+ * Constructor.
+ *
+ * @see WP_List_Table::__construct() for more information on default arguments.
+ *
+ * @param array $args An associative array of arguments.
+ */
+ public function __construct( $args = array() ) {
+ if ( ! empty( $args['comment_type'] ) ) {
+ $this->comment_type = $args['comment_type'];
+ }
+ parent::__construct( $args );
+ }
+
+ /**
+ *
+ * @param bool $output_empty
+ */
+ public function display( $output_empty = false ) {
+ $singular = $this->_args['singular'];
+
+ wp_nonce_field( "fetch-list-" . get_class( $this ), '_ajax_fetch_list_nonce' );
+ ?>
+ <table class="<?php echo implode( ' ', $this->get_table_classes() ); ?>" data-comment-type="<?php echo esc_attr( $this->comment_type ); ?>" style="display:none;">
+ <colgroup>
+ <col width="20%">
+ <col width="80%">
+ </colgroup>
+ <tbody id="the-comment-list"<?php if ( $singular ) { echo " data-wp-lists='list:$singular'"; } ?>>
+ <?php
+ if ( ! $output_empty ) {
+ $this->display_rows_or_placeholder();
+ }
+ ?>
+ </tbody>
+ </table>
+ <?php
+ }
+}
</ins></span></pre></div>
<a id="sitestrunkwordpressorgpublic_htmlwpcontentpluginsplugindirectoryadminmetaboxclasscommittersphp"></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-committers.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-committers.php 2016-03-17 18:42:01 UTC (rev 2762)
+++ sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/admin/metabox/class-committers.php 2016-03-17 18:49:00 UTC (rev 2763)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1,6 +1,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> <?php
</span><span class="cx" style="display: block; padding: 0 10px"> namespace WordPressdotorg\Plugin_Directory\Admin\Metabox;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-use WordPressdotorg\Plugin_Directory\Admin\Committers_List_Table;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+use WordPressdotorg\Plugin_Directory\Admin\List_Table;
</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"> * The Plugin Committers admin metabox.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -25,7 +25,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * Displays a list of committers for the current plugin.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public static function display() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $list = new Committers_List_Table();
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $list = new List_Table\Committers();
</ins><span class="cx" style="display: block; padding: 0 10px"> $list->prepare_items();
</span><span class="cx" style="display: block; padding: 0 10px"> $list->display();
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -74,7 +74,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $response->send();
</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">- $wp_list_table = new Committers_List_Table();
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $wp_list_table = new List_Table\Committers();
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $response->add( array(
</span><span class="cx" style="display: block; padding: 0 10px"> 'what' => 'committer',
</span></span></pre></div>
<a id="sitestrunkwordpressorgpublic_htmlwpcontentpluginsplugindirectoryadminmetaboxclassinternalnotesphp"></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-internal-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-internal-notes.php 2016-03-17 18:42:01 UTC (rev 2762)
+++ sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/admin/metabox/class-internal-notes.php 2016-03-17 18:49:00 UTC (rev 2763)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1,6 +1,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> <?php
</span><span class="cx" style="display: block; padding: 0 10px"> namespace WordPressdotorg\Plugin_Directory\Admin\Metabox;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-use WordPressdotorg\Plugin_Directory\Admin\Plugin_Comments_List_Table;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+use WordPressdotorg\Plugin_Directory\Admin\List_Table\Plugin_Comments;
</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"> * The Internal Notes admin metabox.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -25,7 +25,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * Displays comment box for internal notes.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public static function display() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $wp_list_table = new Plugin_Comments_List_Table( array(
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $wp_list_table = new Plugin_Comments( array(
</ins><span class="cx" style="display: block; padding: 0 10px"> 'comment_type' => 'internal-note',
</span><span class="cx" style="display: block; padding: 0 10px"> ) );
</span><span class="cx" style="display: block; padding: 0 10px"> wp_nonce_field( 'get-comments', 'add_comment_nonce', false );
</span></span></pre>
</div>
</div>
</body>
</html>