Making WordPress.org


Ignore:
Timestamp:
07/07/2017 05:39:52 PM (7 years ago)
Author:
SergeyBiryukov
Message:

Support Theme: Add two views to user profiles to allow for browsing topics ordered by recent activity:

  • "Active Topics" shows the user's topics with recent replies, ordered by latest reply.
  • "Topics Replied To" shows all topics the user has replied to (including topics started by others), ordered by latest reply.

Fixes #2470.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-support/functions.php

    r5618 r5626  
    262262
    263263/**
    264  * Check if the current page is a user's reviews page.
    265  *
    266  * @return bool True if the page is a user's reviews page, false otherwise.
     264 * Check if the current page is a user's "Reviews Written" page.
     265 *
     266 * @return bool True if the page is a "Reviews Written" page, false otherwise.
    267267 */
    268268function wporg_support_is_single_user_reviews() {
    269269    return (bool) get_query_var( 'wporg_single_user_reviews' );
     270}
     271
     272/**
     273 * Check if the current page is a user's "Active Topics" page.
     274 *
     275 * @return bool True if the page is an "Active Topics" page, false otherwise.
     276 */
     277function wporg_support_is_single_user_active_topics() {
     278    return (bool) get_query_var( 'wporg_single_user_active_topics' );
     279}
     280
     281/**
     282 * Check if the current page is a user's "Topics Replied To" page.
     283 *
     284 * @return bool True if the page is a "Topics Replied To" page, false otherwise.
     285 */
     286function wporg_support_is_single_user_topics_replied_to() {
     287    return (bool) get_query_var( 'wporg_single_user_topics_replied_to' );
    270288}
    271289
Note: See TracChangeset for help on using the changeset viewer.