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/core/theme-compat.php

    r6353 r6438  
    126126 */
    127127function bbp_get_theme_compat_id() {
     128
     129    // Filter & return
    128130    return apply_filters( 'bbp_get_theme_compat_id', bbpress()->theme_compat->theme->id );
    129131}
     
    141143 */
    142144function bbp_get_theme_compat_name() {
     145
     146    // Filter & return
    143147    return apply_filters( 'bbp_get_theme_compat_name', bbpress()->theme_compat->theme->name );
    144148}
    145149
    146150/**
    147  * Gets the version of the bbPress compatable theme used, in the event the
     151 * Gets the version of the bbPress compatible theme used, in the event the
    148152 * currently active WordPress theme does not explicitly support bbPress.
    149153 * This can be filtered or set manually. Tricky theme authors can override the
     
    156160 */
    157161function bbp_get_theme_compat_version() {
     162
     163    // Filter & return
    158164    return apply_filters( 'bbp_get_theme_compat_version', bbpress()->theme_compat->theme->version );
     165}
     166
     167/**
     168 * Gets the bbPress compatible theme used in the event the currently active
     169 * WordPress theme does not explicitly support bbPress. This can be filtered,
     170 * or set manually. Tricky theme authors can override the default and include
     171 * their own bbPress compatibility layers for their themes.
     172 *
     173 * @since 2.0.0 bbPress (r3032)
     174 *
     175 * @uses apply_filters()
     176 * @return string
     177 */
     178function bbp_get_theme_compat_dir() {
     179
     180    // Filter & return
     181    return apply_filters( 'bbp_get_theme_compat_dir', bbpress()->theme_compat->theme->dir );
    159182}
    160183
     
    170193 * @return string
    171194 */
    172 function bbp_get_theme_compat_dir() {
    173     return apply_filters( 'bbp_get_theme_compat_dir', bbpress()->theme_compat->theme->dir );
    174 }
    175 
    176 /**
    177  * Gets the bbPress compatable theme used in the event the currently active
    178  * WordPress theme does not explicitly support bbPress. This can be filtered,
    179  * or set manually. Tricky theme authors can override the default and include
    180  * their own bbPress compatibility layers for their themes.
    181  *
    182  * @since 2.0.0 bbPress (r3032)
    183  *
    184  * @uses apply_filters()
    185  * @return string
    186  */
    187195function bbp_get_theme_compat_url() {
     196
     197    // Filter & return
    188198    return apply_filters( 'bbp_get_theme_compat_url', bbpress()->theme_compat->theme->url );
    189199}
     
    823833    }
    824834
     835    // Filter & return
    825836    return apply_filters( 'bbp_template_include_theme_compat', $template );
    826837}
     
    10171028    }
    10181029
    1019     // Allow override of the override
     1030    // Filter & return
    10201031    return (bool) apply_filters( 'bbp_force_comment_status', $retval, $open, $post_id, $post_type );
    10211032}
Note: See TracChangeset for help on using the changeset viewer.