Making WordPress.org

Changeset 12899


Ignore:
Timestamp:
09/19/2023 08:41:39 PM (7 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.

Location:
sites/trunk/wordpress.org/public_html/wp-content/plugins/support-forums
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/support-forums/css/styles-participants.css

    r12892 r12899  
    2626    text-align: right;
    2727}
     28
     29body.single-topic:not(body.topic-edit) .entry-content #bbpress-forums div.odd.type-reported_topics:not(.topic) ,
     30body.single-topic:not(body.topic-edit) .entry-content #bbpress-forums div.even.type-reported_topics:not(.topic) {
     31    background-color: #fdd;
     32}
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/support-forums/inc/class-performance-optimizations.php

    r12529 r12899  
    334334    public function enqueue_styles() {
    335335        if ( current_user_can( 'participate' ) ) {
    336             wp_enqueue_style( 'support-forums-participants', plugins_url( 'css/styles-participants.css', __DIR__ ), array(), '20211105' );
     336            wp_enqueue_style( 'support-forums-participants', plugins_url( 'css/styles-participants.css', __DIR__ ), array(), '20230919' );
    337337        }
    338338    }
     
    566566    /**
    567567     * Cache the result of `count_users()` as the Support Forums site has a lot of users.
    568      * 
     568     *
    569569     * This slows wp-admin/users.php down so much that it's hard to use when required.
    570570     * As these numbers don't change often, it's cached for 24hrs hours, which avoids a 20-60s query on each users.php pageload.
     
    604604     * Filter use queries to be more performant, as the default WordPress user queries
    605605     * just don't scale to several million users here.
    606      * 
     606     *
    607607     * @param \WP_User_Query $query
    608608     */
  • 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.