Making WordPress.org


Ignore:
Timestamp:
02/11/2021 05:07:19 AM (4 years ago)
Author:
dd32
Message:

Support Forums: Ajaxify the actions (spam/archive/approve) on views.

Props Clorith, dd32.
Fixes #1965.

File:
1 edited

Legend:

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

    r10640 r10660  
    487487        $permalink = $this->get_permalink( $post->ID );
    488488
     489        $classes = array();
     490
     491        if ( bbp_is_topic( $r['post_id'] ) ) {
     492            $classes[] = 'bbp-topic-archive-link';
     493        } else {
     494            $classes[] = 'bbp-reply-archive-link';
     495        }
     496
    489497        $url = esc_url( wp_nonce_url( add_query_arg( $query_args, $permalink ), 'toggle-post-archive_' . $user_id . '_' . $post->ID ) );
    490         return sprintf( "<a href='%s'>%s</a>", $url, esc_html( $text ) );
     498        return sprintf( "<a href='%s' class='%s'>%s</a>", $url, esc_attr( implode( ' ', $classes ) ), esc_html( $text ) );
    491499    }
    492500
Note: See TracChangeset for help on using the changeset viewer.