Skip to:
Content

bbPress.org


Ignore:
Timestamp:
11/07/2019 07:40:16 PM (5 years ago)
Author:
johnjamesjacoby
Message:

Statuses: normalize status related functions across post types.

This commit adds 2 missing functions for forum statuses, and relocates all of them to the correct functions.php files for their post types.

File:
1 edited

Legend:

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

    r6918 r6922  
    16621662}
    16631663
     1664/**
     1665 * Return array of public reply statuses.
     1666 *
     1667 * @since 2.6.0 bbPress (r6705)
     1668 *
     1669 * @return array
     1670 */
     1671function bbp_get_public_reply_statuses() {
     1672    $statuses = array(
     1673        bbp_get_public_status_id()
     1674    );
     1675
     1676    // Filter & return
     1677    return (array) apply_filters( 'bbp_get_public_reply_statuses', $statuses );
     1678}
     1679
     1680/**
     1681 * Return array of non-public reply statuses.
     1682 *
     1683 * @since 2.6.0 bbPress (r6791)
     1684 *
     1685 * @return array
     1686 */
     1687function bbp_get_non_public_reply_statuses() {
     1688    $statuses = array(
     1689        bbp_get_trash_status_id(),
     1690        bbp_get_spam_status_id(),
     1691        bbp_get_pending_status_id()
     1692    );
     1693
     1694    // Filter & return
     1695    return (array) apply_filters( 'bbp_get_non_public_reply_statuses', $statuses );
     1696}
     1697
    16641698/** Reply Actions *************************************************************/
    16651699
Note: See TracChangeset for help on using the changeset viewer.