Making WordPress.org

Ticket #2054: meta-2054.3.patch

File meta-2054.3.patch, 4.5 KB (added by SergeyBiryukov, 7 years ago)
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-forums/functions.php

     
    312312
    313313        ?>
    314314
    315         <li class="topic-forum">In: <a href="<?php bbp_forum_permalink( bbp_get_topic_forum_id() ); ?>"><?php bbp_topic_forum_title(); ?></a></li>
    316         <?php if ( !empty( $reply_count ) ) : ?><li class="reply-count"><?php echo $reply_count; ?></li><?php endif; ?>
    317         <?php if ( !empty( $voice_count ) ) : ?><li class="voice-count"><?php echo $voice_count; ?></li><?php endif; ?>
     315        <li class="topic-forum"><?php
     316                /* translators: %s: forum title */
     317                printf( __( 'In: %s', 'wporg-forums' ),
     318                        sprintf( '<a href="%s">%s</a>',
     319                                esc_url( bbp_get_forum_permalink( bbp_get_topic_forum_id() ) ),
     320                                bbp_get_topic_forum_title()
     321                        )
     322                );
     323        ?></li>
     324        <?php if ( !empty( $reply_count ) ) : ?>
     325                <li class="reply-count"><?php echo $reply_count; ?></li>
     326        <?php endif; ?>
     327        <?php if ( !empty( $voice_count ) ) : ?>
     328                <li class="voice-count"><?php echo $voice_count; ?></li>
     329        <?php endif; ?>
    318330        <?php if ( !empty( $last_reply  ) ) : ?>
    319                 <li class="topic-freshness-author"><?php printf( __( 'Last reply from: %s', 'wporg-forums' ), bbp_get_author_link( array( 'type' => 'name', 'post_id' => $last_reply, 'size' => '15' ) ) ); ?></li>
     331                <li class="topic-freshness-author"><?php
     332                        /* translators: %s: reply author link */
     333                        printf( __( 'Last reply from: %s', 'wporg-forums' ),
     334                                bbp_get_author_link( array( 'type' => 'name', 'post_id' => $last_reply, 'size' => '15' ) )
     335                        );
     336                ?></li>
    320337        <?php endif; ?>
    321         <?php if ( !empty( $time_since  ) ) : ?><li class="topic-freshness-time"><?php printf( __( 'Last activity: %s', 'wporg-forums' ), $time_since ); ?></li><?php endif; ?>
     338        <?php if ( !empty( $time_since  ) ) : ?>
     339                <li class="topic-freshness-time"><?php
     340                        /* translators: %s: date/time link to the latest post */
     341                        printf( __( 'Last activity: %s', 'wporg-forums' ), $time_since );
     342                ?></li>
     343        <?php endif; ?>
    322344        <?php if ( is_user_logged_in() ) : ?>
    323345                <?php $_topic_id = bbp_is_reply_edit() ? bbp_get_reply_topic_id() : $topic_id; ?>
    324346                <li class="topic-subscribe"><?php bbp_topic_subscription_link( array( 'before' => '', 'topic_id' => $_topic_id ) ); ?></li>
     
    365387        }
    366388        ?>
    367389
    368         <?php if ( bbp_get_forum_parent_id() ) : ?><li class="topic-parent">In: <a href="<?php bbp_forum_permalink( bbp_get_forum_parent_id() ); ?>"><?php bbp_forum_title( bbp_get_forum_parent_id() ); ?></a></li><?php endif; ?>
    369         <?php if ( !empty( $topic_count ) ) : ?><li class="topic-count"><?php echo $topic_text; ?></li><?php endif; ?>
    370         <?php if ( !empty( $reply_count ) ) : ?><li class="reply-count"><?php echo $reply_text; ?></li><?php endif; ?>
     390        <?php if ( bbp_get_forum_parent_id() ) : ?>
     391                <li class="topic-parent"><?php
     392                        /* translators: %s: forum title */
     393                        printf( __( 'In: %s', 'wporg-forums' ),
     394                                sprintf( '<a href="%s">%s</a>',
     395                                        esc_url( bbp_get_forum_permalink( bbp_get_forum_parent_id() ) ),
     396                                        bbp_get_forum_title( bbp_get_forum_parent_id() )
     397                                )
     398                        );
     399                ?></li>
     400        <?php endif; ?>
     401        <?php if ( !empty( $topic_count ) ) : ?>
     402                <li class="topic-count"><?php echo $topic_text; ?></li>
     403        <?php endif; ?>
     404        <?php if ( !empty( $reply_count ) ) : ?>
     405                <li class="reply-count"><?php echo $reply_text; ?></li>
     406        <?php endif; ?>
    371407        <?php if ( !empty( $last_active  ) ) : ?>
    372                 <li class="forum-freshness-author"><?php printf( __( 'Last post by: %s', 'wporg-forums' ), bbp_get_author_link( array( 'type' => 'name', 'post_id' => $last_active ) ) ); ?></li>
     408                <li class="forum-freshness-author"><?php
     409                        /* translators: %s: post author link */
     410                        printf( __( 'Last post by: %s', 'wporg-forums' ),
     411                                bbp_get_author_link( array( 'type' => 'name', 'post_id' => $last_active ) )
     412                        );
     413                ?></li>
    373414        <?php endif; ?>
    374         <?php if ( !empty( $time_since  ) ) : ?><li class="forum-freshness-time"><?php printf( __( 'Last activity: %s', 'wporg-forums' ), $time_since ); ?></li><?php endif; ?>
     415        <?php if ( !empty( $time_since  ) ) : ?>
     416                <li class="forum-freshness-time"><?php
     417                        /* translators: %s: date/time link to the latest post */
     418                        printf( __( 'Last activity: %s', 'wporg-forums' ), $time_since );
     419                ?></li>
     420        <?php endif; ?>
    375421        <?php if ( is_user_logged_in() ) : ?>
    376422                <li class="forum-subscribe"><?php bbp_forum_subscription_link( array( 'forum_id' => $forum_id ) ); ?></li>
    377423        <?php endif;