Skip to:
Content

bbPress.org


Ignore:
Timestamp:
09/15/2017 03:38:28 PM (8 years ago)
Author:
johnjamesjacoby
Message:

Replies: introduce bbp_get_public_reply_statuses() to speed-up reply queries.

This change removes the closed post status from several reply-only queries, ensuring that query indexes are used effectively. It also brings parity to the Replies component that exists in both Forums & Topics.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/includes/replies/functions.php

    r6573 r6706  
    16231623
    16241624/**
     1625 * Return array of public reply statuses.
     1626 *
     1627 * @since 2.6.0 bbPress (r6705)
     1628 *
     1629 * @return array
     1630 */
     1631function bbp_get_public_reply_statuses() {
     1632    $statuses = array(
     1633        bbp_get_public_status_id()
     1634    );
     1635
     1636    // Filter & return
     1637    return (array) apply_filters( 'bbp_get_public_reply_statuses', $statuses );
     1638}
     1639
     1640/**
    16251641 * Return array of available reply toggle actions
    16261642 *
Note: See TracChangeset for help on using the changeset viewer.