Making WordPress.org


Ignore:
Timestamp:
03/03/2017 06:37:50 PM (10 years ago)
Author:
SergeyBiryukov
Message:

Support Forums: Add "Unresolved Topics" view for plugin and theme support forums.

See #2174.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/support-forums/inc/class-theme-directory-compat.php

    r5058 r5059  
    1515
    1616        function compat_views() {
    17                 return array( self::COMPAT, 'reviews', 'active' );
     17                return array( self::COMPAT, 'reviews', 'active', 'unresolved' );
    1818        }
    1919
    … …  
    3131                /* translators: %s: theme title */
    3232                return sprintf( _x( '[%s] Recent Activity', 'theme', 'wporg-forums' ), $this->title() );
     33        }
     34
     35        function unresolved_title() {
     36                /* translators: %s: theme title */
     37                return sprintf( _x( '[%s] Unresolved Topics', 'theme', 'wporg-forums' ), $this->title() );
    3338        }
    3439
    … …  
    8489
    8590        public function do_topic_sidebar() {
    86                 $theme   = sprintf( '<a href="//wordpress.org/themes/%s/">%s</a>', esc_attr( $this->slug() ), esc_html( $this->theme->post_title ) );
    87                 $support = sprintf( '<a href="//wordpress.org/support/theme/%s/">%s</a>', esc_attr( $this->slug() ), __( 'Support Threads', 'wporg-forums' ) );
    88                 $active  = sprintf( '<a href="//wordpress.org/support/theme/%s/active/">%s</a>', esc_attr( $this->slug() ), __( 'Active Topics', 'wporg-forums' ) );
    89                 $reviews = sprintf( '<a href="//wordpress.org/support/theme/%s/reviews/">%s</a>', esc_attr( $this->slug() ), __( 'Reviews', 'wporg-forums' ) );
    90                 $create  = '';
     91                $theme      = sprintf( '<a href="//wordpress.org/themes/%s/">%s</a>', esc_attr( $this->slug() ), esc_html( $this->theme->post_title ) );
     92                $support    = sprintf( '<a href="//wordpress.org/support/theme/%s/">%s</a>', esc_attr( $this->slug() ), __( 'Support Threads', 'wporg-forums' ) );
     93                $active     = sprintf( '<a href="//wordpress.org/support/theme/%s/active/">%s</a>', esc_attr( $this->slug() ), __( 'Active Topics', 'wporg-forums' ) );
     94                $unresolved = sprintf( '<a href="//wordpress.org/support/theme/%s/unresolved/">%s</a>', esc_attr( $this->slug() ), __( 'Unresolved Topics', 'wporg-forums' ) );
     95                $reviews    = sprintf( '<a href="//wordpress.org/support/theme/%s/reviews/">%s</a>', esc_attr( $this->slug() ), __( 'Reviews', 'wporg-forums' ) );
     96                $create     = '';
    9197
    9298                $create_label = '';
    … …  
    108114                                <li><?php echo $support; ?></li>
    109115                                <li><?php echo $active; ?></li>
     116                                <li><?php echo $unresolved; ?></li>
    110117                                <li><?php echo $reviews; ?></li>
    111118                                <?php if ( $create ) : ?>
Note: See TracChangeset for help on using the changeset viewer.