Making WordPress.org

Changeset 2860


Ignore:
Timestamp:
03/31/2016 04:34:50 PM (9 years ago)
Author:
obenland
Message:

Plugin Directory: Display the amount of unresolved support topics.

support_resolutions gets updated from the support forums side.

See #1571.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/admin/list-table/class-plugin-posts.php

    r2831 r2860  
    150150     */
    151151    public function column_support( $post ) {
    152         //@todo: Check how many unresolved threads there are.
    153         $link_text = __( '0 open', 'wporg-plugins' );
     152        $resolutions = get_post_meta( $post->ID, 'support_resolutions', true );
     153        $unresolved  = empty( $resolutions ) ? 0 : $resolutions['no'];
     154        $link_text   = sprintf( __( '%d unresolved', 'wporg-plugins' ), $unresolved );
    154155
    155156        printf( '<a href="%s">%s</a>', esc_url( 'https://wordpress.org/support/plugin/' . $post->post_name ), $link_text );
Note: See TracChangeset for help on using the changeset viewer.