Making WordPress.org

Changeset 4225


Ignore:
Timestamp:
10/12/2016 06:44:45 PM (9 years ago)
Author:
coffee2code
Message:

Forums Theme: Show context for posts listed in special views (e.g. spam/pending/archived).

  • Always show linked forum name.
  • Show topic name for topic posts.
  • Show linked topic name for reply posts.

Props netweb, coffee2code.
Fixes #2101.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-forums/bbpress/loop-posts.php

    r3929 r4225  
    2424            <?php if ( 'topic' == get_post_type() ) : ?>
    2525
     26                <div id="post-<?php bbp_topic_id(); ?>" class="bbp-topic-header">
     27                    <div class="bbp-meta">
     28                            <span class="bbp-header">
     29                                <?php esc_html_e( 'Forum:', 'wporg-forums' ); ?>
     30                                <a class="bbp-forum-permalink" href="<?php bbp_forum_permalink( bbp_get_topic_forum_id() ); ?>"><?php bbp_forum_title( bbp_get_topic_forum_id() ); ?></a><br>
     31                                <?php esc_html_e( 'As the topic:', 'wporg-forums' ); ?>
     32                                <?php bbp_topic_title( bbp_get_topic_id() ); ?>
     33                            </span>
     34                    </div><!-- .bbp-meta -->
     35                </div><!-- #post-<?php bbp_topic_id(); ?> -->
     36
    2637                <?php bbp_get_template_part( 'content', 'single-topic-lead' ); ?>
    2738
    2839            <?php // This actually works. ?>
    2940            <?php else : bbpress()->reply_query = bbpress()->topic_query; ?>
     41
     42                <div id="post-<?php bbp_reply_id(); ?>" class="bbp-reply-header">
     43                    <div class="bbp-meta">
     44                            <span class="bbp-header">
     45                                <?php esc_html_e( 'Forum:', 'wporg-forums' ); ?>
     46                                <a class="bbp-forum-permalink" href="<?php bbp_forum_permalink( bbp_get_reply_forum_id() ); ?>"><?php bbp_forum_title( bbp_get_reply_forum_id() ); ?></a><br>
     47                                <?php esc_html_e( 'In reply to:', 'wporg-forums' ); ?>
     48                                <a class="bbp-topic-permalink" href="<?php bbp_topic_permalink( bbp_get_reply_topic_id() ); ?>"><?php bbp_topic_title( bbp_get_reply_topic_id() ); ?></a>
     49                            </span>
     50                    </div><!-- .bbp-meta -->
     51                </div><!-- #post-<?php bbp_reply_id(); ?> -->
    3052
    3153                <?php bbp_get_template_part( 'loop', 'single-reply' ); ?>
Note: See TracChangeset for help on using the changeset viewer.