Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
09/05/2018 01:55:09 AM (7 years ago)
Author:
imath
Message:

BP Nouveau: Avoid escaping single Group description after sanitization

Props MorgunovVit dcavins marcella1981

Fixes #7923 (trunk)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-templates/bp-nouveau/includes/groups/template-tags.php

    r12082 r12215  
    44 *
    55 * @since 3.0.0
    6  * @version 3.0.0
     6 * @version 3.2.0
    77 */
    88
     
    10491049
    10501050/**
    1051  * Does the group has meta.
    1052  *
    1053  * @since 3.0.0
    1054  *
    1055  * @return bool True if the group has meta. False otherwise.
    1056  */
    1057 function bp_nouveau_group_has_meta() {
    1058     return (bool) bp_nouveau_get_group_meta();
     1051 * Does the group has metas or a specific meta value.
     1052 *
     1053 * @since 3.0.0
     1054 * @since 3.2.0 Adds the $meta_key argument.
     1055 *
     1056 * @param  string $meta_key The key of the meta to check the value for.
     1057 * @return bool             True if the group has meta. False otherwise.
     1058 */
     1059function bp_nouveau_group_has_meta( $meta_key = '' ) {
     1060    $group_meta = bp_nouveau_get_group_meta();
     1061
     1062    if ( ! $meta_key ) {
     1063        return (bool) $group_meta;
     1064    }
     1065
     1066    return ! empty( $group_meta[ $meta_key ] );
    10591067}
    10601068
Note: See TracChangeset for help on using the changeset viewer.