Skip to:
Content

bbPress.org


Ignore:
Timestamp:
06/04/2017 09:45:15 PM (7 years ago)
Author:
johnjamesjacoby
Message:

Filters: cast return values & update phpdoc.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/includes/core/filters.php

    r6438 r6484  
    310310 * These filters were most likely replaced by bbp_parse_args(), which includes
    311311 * both passive and aggressive filters anywhere parse_args is used to compare
    312  * default arguments to passed arguments, without needing to litter the
    313  * codebase with _before_ and _after_ filters everywhere.
     312 * default arguments to passed arguments, without sprinkling the project with
     313 * _before_ and _after_ filters everywhere.
    314314 */
    315315
     
    344344
    345345    // Filter & return
    346     return apply_filters( 'bbp_has_forums_query', $args );
     346    return (array) apply_filters( 'bbp_has_forums_query', $args );
    347347}
    348348add_filter( 'bbp_after_has_forums_parse_args', '_bbp_has_forums_query' );
     
    359359
    360360    // Filter & return
    361     return apply_filters( 'bbp_has_topics_query', $args );
     361    return (array) apply_filters( 'bbp_has_topics_query', $args );
    362362}
    363363add_filter( 'bbp_after_has_topics_parse_args', '_bbp_has_topics_query' );
     
    374374
    375375    // Filter & return
    376     return apply_filters( 'bbp_has_replies_query', $args );
     376    return (array) apply_filters( 'bbp_has_replies_query', $args );
    377377}
    378378add_filter( 'bbp_after_has_replies_parse_args', '_bbp_has_replies_query' );
Note: See TracChangeset for help on using the changeset viewer.