Skip to:
Content

bbPress.org


Ignore:
Timestamp:
05/27/2017 05:04:31 PM (8 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/topics/capabilities.php

    r6384 r6438  
    1919 */
    2020function bbp_get_topic_caps() {
    21     return apply_filters( 'bbp_get_topic_caps', array (
     21
     22    // Filter & return
     23    return (array) apply_filters( 'bbp_get_topic_caps', array (
    2224        'edit_posts'          => 'edit_topics',
    2325        'edit_others_posts'   => 'edit_others_topics',
     
    3941 */
    4042function bbp_get_topic_tag_caps() {
    41     return apply_filters( 'bbp_get_topic_tag_caps', array (
     43
     44    // Filter & return
     45    return (array) apply_filters( 'bbp_get_topic_tag_caps', array (
    4246        'manage_terms' => 'manage_topic_tags',
    4347        'edit_terms'   => 'edit_topic_tags',
     
    225229    }
    226230
    227     return apply_filters( 'bbp_map_topic_meta_caps', $caps, $cap, $user_id, $args );
     231    // Filter & return
     232    return (array) apply_filters( 'bbp_map_topic_meta_caps', $caps, $cap, $user_id, $args );
    228233}
    229234
     
    256261    }
    257262
    258     return apply_filters( 'bbp_map_topic_tag_meta_caps', $caps, $cap, $user_id, $args );
    259 }
     263    // Filter & return
     264    return (array) apply_filters( 'bbp_map_topic_tag_meta_caps', $caps, $cap, $user_id, $args );
     265}
Note: See TracChangeset for help on using the changeset viewer.