Skip to:
Content

bbPress.org


Ignore:
Timestamp:
02/26/2017 07:12:34 PM (8 years ago)
Author:
johnjamesjacoby
Message:

Engagements: First pass at:

  • User profile section
  • Template parts changes
  • Rewrite rules support
  • Repair & upgrade tools
  • BuddyPress support
  • engagement slug setting

See #3068.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/includes/common/template.php

    r6299 r6320  
    615615
    616616/**
    617  * Check if current page shows the topics created by a bbPress user (profile
     617 * Check if current page shows the replies created by a bbPress user (profile
    618618 * page)
    619619 *
    620620 * @since 2.2.0 bbPress (r4225)
    621621 *
    622  * @return bool True if it's the topics created page, false if not
     622 * @return bool True if it's the replies created page, false if not
    623623 */
    624624function bbp_is_replies_created() {
     
    792792
    793793    return (bool) apply_filters( 'bbp_is_single_user_replies', $retval );
     794}
     795
     796/**
     797 * Check if current page is a user engagements page
     798 *
     799 * @since 2.6.0 bbPress (r6320)
     800 *
     801 * @uses WP_Query Checks if WP_Query::bbp_is_single_user_engagements is set to true
     802 * @return bool True if it's a user's replies page, false if not
     803 */
     804function bbp_is_single_user_engagements() {
     805    global $wp_query;
     806
     807    // Assume false
     808    $retval = false;
     809
     810    // Check query
     811    if ( ! empty( $wp_query->bbp_is_single_user_engagements ) && ( true === $wp_query->bbp_is_single_user_engagements ) ) {
     812        $retval = true;
     813    }
     814
     815    return (bool) apply_filters( 'bbp_is_single_user_engagements', $retval );
    794816}
    795817
Note: See TracChangeset for help on using the changeset viewer.