Making WordPress.org


Ignore:
Timestamp:
09/19/2023 08:41:39 PM (19 months ago)
Author:
Clorith
Message:

Support Forums: Enhance the reported topic view.

This further improves on the new reported topic view, adding in a reference to the original topic that was reported, and provides some additional styling to make the reports stand out more within the topic context.

Follow up to [12892].

See #5715.

File:
1 edited

Legend:

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

    r12894 r12899  
    9595            );
    9696        }
     97
     98        $content .= sprintf(
     99            '<p class="topic-report-origin">%s</p>',
     100            sprintf(
     101                // translators: 1: The link to the original topic, with the topic title as its text.
     102                __( 'Reported topic: %s', 'wporg-forums' ),
     103                sprintf(
     104                    '<a href="%s">%s</a>',
     105                    esc_url( bbp_get_topic_permalink( get_post_field( 'post_parent', get_the_ID() ) ) ),
     106                    esc_html( bbp_get_topic_title( get_post_field( 'post_parent', get_the_ID() ) ) )
     107                )
     108            )
     109        );
    97110
    98111        $replies = get_comments( array(
Note: See TracChangeset for help on using the changeset viewer.