Skip to:
Content

bbPress.org


Ignore:
Timestamp:
05/27/2017 05:04:31 PM (7 years ago)
Author:
johnjamesjacoby
Message:

Tools: Add //Filter & return note for future discovery of missing filter documentation.

Also adjust some type-casting on filtered results.

File:
1 edited

Legend:

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

    r6380 r6438  
    2323 */
    2424function bbp_kses_allowed_tags() {
    25     return apply_filters( 'bbp_kses_allowed_tags', array(
     25
     26    // Filter & return
     27    return (array) apply_filters( 'bbp_kses_allowed_tags', array(
    2628
    2729        // Links
     
    528530
    529531    // Filter & return
    530     return apply_filters( 'bbp_number_not_negative', $not_less_than_zero, $int, $number );
     532    return (int) apply_filters( 'bbp_number_not_negative', $not_less_than_zero, $int, $number );
    531533}
    532534
     
    549551    }
    550552
     553    // Filter & return
    551554    return apply_filters( 'bbp_number_format', number_format( $number, $decimals, $dec_point, $thousands_sep ), $number, $decimals, $dec_point, $thousands_sep );
    552555}
     
    570573    }
    571574
     575    // Filter & return
    572576    return apply_filters( 'bbp_number_format_i18n', number_format_i18n( $number, $decimals ), $number, $decimals );
    573577}
     
    593597    $new_time = mysql2date( $d, $time, $translate );
    594598
     599    // Filter & return
    595600    return apply_filters( 'bbp_convert_date', $new_time, $d, $translate, $time );
    596601}
     
    711716        }
    712717
     718        // Filter & return
    713719        return apply_filters( 'bbp_get_time_since', $output, $older_date, $newer_date );
    714720    }
Note: See TracChangeset for help on using the changeset viewer.