Skip to:
Content

BuddyPress.org

Ticket #6081: contributor-day.patch

File contributor-day.patch, 3.0 KB (added by mahype, 10 years ago)
  • src/bp-xprofile/bp-xprofile-admin.php

    diff --git a/src/bp-xprofile/bp-xprofile-admin.php b/src/bp-xprofile/bp-xprofile-admin.php
    index 1fb255a..785177e 100644
    a b function xprofile_admin_screen( $message = '', $type = 'error' ) { 
    114114
    115115                                                <li id="group_<?php echo esc_attr( $group->id ); ?>">
    116116                                                        <a href="#tabs-<?php echo esc_attr( $group->id ); ?>" class="ui-tab">
    117                                                                 <?php echo esc_attr( $group->name ); ?>
     117                                                                <?php echo esc_attr( apply_filters( 'bp_get_the_profile_group_name', $group->name ) ); ?>
    118118
    119119                                                                <?php if ( !$group->can_delete ) : ?>
    120120                                                                        <?php _e( '(Primary)', 'buddypress'); ?>
    function xprofile_admin_screen( $message = '', $type = 'error' ) { 
    130130                                <?php if ( !empty( $groups ) ) : foreach ( $groups as $group ) : ?>
    131131
    132132                                        <noscript>
    133                                                 <h3><?php echo esc_attr( $group->name ); ?></h3>
     133                                                <h3><?php echo esc_attr( apply_filters( 'bp_get_the_profile_group_name', $group->name ) ); ?></h3>
    134134                                        </noscript>
    135135
    136136                                        <div id="tabs-<?php echo esc_attr( $group->id ); ?>" class="tab-wrapper">
    function xprofile_admin_screen( $message = '', $type = 'error' ) { 
    164164
    165165                                                <?php if ( ! empty( $group->description ) ) : ?>
    166166
    167                                                         <p><?php echo esc_html( $group->description ); ?></p>
     167                                                        <p><?php echo esc_html( apply_filters( 'bp_get_the_profile_group_description', $group->description ) ); ?></p>
    168168
    169169                                                <?php endif; ?>
    170170
    171171                                                <fieldset id="<?php echo esc_attr( $group->id ); ?>" class="connectedSortable field-group">
    172                                                         <legend class="screen-reader-text"><?php printf( esc_html__( 'Fields for "%s" Group', 'buddypress' ), $group->name ); ?></legend>
     172                                                        <legend class="screen-reader-text"><?php printf( esc_html__( 'Fields for "%s" Group', 'buddypress' ), apply_filters( 'bp_get_the_profile_group_name', $group->name ) ); ?></legend>
    173173
    174174                                                        <?php
    175175
  • src/bp-xprofile/bp-xprofile-filters.php

    diff --git a/src/bp-xprofile/bp-xprofile-filters.php b/src/bp-xprofile/bp-xprofile-filters.php
    index 7918dd7..55d6e1e 100644
    a b add_filter( 'xprofile_filtered_data_value_before_save', 'trim', 2 ); 
    5959add_filter( 'xprofile_group_name_before_save',        'wp_filter_kses' );
    6060add_filter( 'xprofile_group_description_before_save', 'wp_filter_kses' );
    6161
     62add_filter( 'xprofile_group_name_before_save',         'stripslashes' );
     63add_filter( 'xprofile_group_description_before_save',  'stripslashes' );
     64
    6265// Save fields
    6366add_filter( 'xprofile_field_name_before_save',         'wp_filter_kses' );
    6467add_filter( 'xprofile_field_type_before_save',         'wp_filter_kses' );
    6568add_filter( 'xprofile_field_description_before_save',  'wp_filter_kses' );
    6669add_filter( 'xprofile_field_order_by_before_save',     'wp_filter_kses' );
     70
    6771add_filter( 'xprofile_field_is_required_before_save',  'absint' );
    6872add_filter( 'xprofile_field_field_order_before_save',  'absint' );
    6973add_filter( 'xprofile_field_option_order_before_save', 'absint' );