Making WordPress.org

Ticket #1715: 1715.diff

File 1715.diff, 2.3 KB (added by ChopinBach, 9 years ago)

Adds internal notes column to plugins table with asc/dsc sorting.

  • wordpress.org/public_html/wp-content/plugins/plugin-directory/admin/list-table/class-plugin-posts.php

    diff --git wordpress.org/public_html/wp-content/plugins/plugin-directory/admin/list-table/class-plugin-posts.php wordpress.org/public_html/wp-content/plugins/plugin-directory/admin/list-table/class-plugin-posts.php
    index 10ade2c..219458c 100644
    class Plugin_Posts extends \WP_Posts_List_Table { 
    109109                        'installs'  => __( 'Active installs', 'wporg-plugins' ),
    110110                        'downloads' => __( 'Downloads', 'wporg-plugins' ),
    111111                        'support'   => __( 'Support', 'wporg-plugins' ),
     112                        'comments'  => __( 'Notes', 'wporg-plugins' ),
    112113                        'date'      => __( 'Date', 'wporg-plugins' ),
    113114                );
    114115
    class Plugin_Posts extends \WP_Posts_List_Table { 
    226227        }
    227228
    228229        /**
     230         * Handles the notes column output.
     231         *
     232         * @param \WP_Post $post The current WP_Post object.
     233         */
     234        public function column_notes( $post ) {
     235                echo esc_html( $post->comment_count );
     236        }
     237
     238        /**
    229239         * Generates and displays row action links.
    230240         *
    231241         * @access protected