Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
11/07/2010 12:20:02 AM (14 years ago)
Author:
djpaul
Message:

Fixes even more WP_DEBUG warnings.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-xprofile/bp-xprofile-admin.php

    r3300 r3369  
    6868            if ( $groups ) :
    6969                foreach ( $groups as $group ) { ?>
    70                     <li id="group_<?php echo $group->id; ?>"><a href="#tabs-<?php echo $group->id; ?>" class="ui-tab"><?php echo attribute_escape( $group->name ); ?><?php if ( !$group->can_delete ) : ?> <?php _e( '(Core)', 'buddypress'); endif; ?></a></li>
     70                    <li id="group_<?php echo $group->id; ?>"><a href="#tabs-<?php echo $group->id; ?>" class="ui-tab"><?php echo esc_attr( $group->name ); ?><?php if ( !$group->can_delete ) : ?> <?php _e( '(Core)', 'buddypress'); endif; ?></a></li>
    7171<?php           }
    7272            endif; ?>
     
    7676                foreach ( $groups as $group ) { ?>
    7777                    <noscript>
    78                         <h3><?php echo attribute_escape( $group->name ) ?></h3>
     78                        <h3><?php echo esc_attr( $group->name ) ?></h3>
    7979                    </noscript>
    8080                    <div id="tabs-<?php echo $group->id; ?>" class="tab-wrapper">
    8181                        <div class="tab-toolbar">
    8282                            <div class="tab-toolbar-left">
    83                                 <a class="button" href="admin.php?page=bp-profile-setup&amp;group_id=<?php echo attribute_escape( $group->id ); ?>&amp;mode=add_field"><?php _e( 'Add New Field', 'buddypress' ); ?></a>
    84                                 <a class="button edit" href="admin.php?page=bp-profile-setup&amp;mode=edit_group&amp;group_id=<?php echo attribute_escape( $group->id ); ?>"><?php _e( 'Edit Group', 'buddypress' ); ?></a>
     83                                <a class="button" href="admin.php?page=bp-profile-setup&amp;group_id=<?php echo esc_attr( $group->id ); ?>&amp;mode=add_field"><?php _e( 'Add New Field', 'buddypress' ); ?></a>
     84                                <a class="button edit" href="admin.php?page=bp-profile-setup&amp;mode=edit_group&amp;group_id=<?php echo esc_attr( $group->id ); ?>"><?php _e( 'Edit Group', 'buddypress' ); ?></a>
    8585<?php               if ( $group->can_delete ) : ?>
    86                                 <a class="button delete" href="admin.php?page=bp-profile-setup&amp;mode=delete_group&amp;group_id=<?php echo attribute_escape( $group->id ); ?>"><?php _e( 'Delete Group', 'buddypress' ); ?></a>
     86                                <a class="button delete" href="admin.php?page=bp-profile-setup&amp;mode=delete_group&amp;group_id=<?php echo esc_attr( $group->id ); ?>"><?php _e( 'Delete Group', 'buddypress' ); ?></a>
    8787<?php               endif; ?>
    8888                            </div>
     
    9191                        <fieldset id="<?php echo $group->id; ?>" class="connectedSortable field-group">
    9292<?php               if( $group->description ) : ?>
    93                             <legend><?php echo attribute_escape( $group->description ) ?></legend>
     93                            <legend><?php echo esc_attr( $group->description ) ?></legend>
    9494<?php               endif;
    9595
     
    9999                            /* Load the field */
    100100                            $field = new BP_XProfile_Field( $field->id );
     101
     102                            $class = '';
    101103                            if ( !$field->can_delete )
    102                                 $class .= ' core nodrag';
     104                                $class = ' core nodrag';
    103105
    104106                            /* This function handles the WYSIWYG profile field
    105107                             * display for the xprofile admin setup screen
    106108                             */
    107                             xprofile_admin_field( $field, $group );
     109                            xprofile_admin_field( $field, $group, $class );
    108110
    109111                        } /* end for */
     
    328330 Handles the WYSIWYG display of each profile field on the edit screen
    329331**************************************************************************/
    330 function xprofile_admin_field( $admin_field, $admin_group ) {
     332function xprofile_admin_field( $admin_field, $admin_group, $class='' ) {
    331333    global $field;
    332334
    333335    $field = $admin_field;
    334336?>
    335                         <fieldset id="field_<?php echo attribute_escape( $field->id ); ?>" class="sortable<?php echo ' ' . $field->type; if ( $class ) echo ' ' . $class; ?>">
     337                        <fieldset id="field_<?php echo esc_attr( $field->id ); ?>" class="sortable<?php echo ' ' . $field->type; if ( $class ) echo ' ' . $class; ?>">
    336338                            <legend><?php bp_the_profile_field_name(); ?> <?php if( !$field->can_delete ) : ?> <?php _e( '(Core)', 'buddypress' ); endif; ?> <?php if ( bp_get_the_profile_field_is_required() ) : ?><?php _e( '(required)', 'buddypress' ) ?><?php endif; ?></legend>
    337339                            <div class="field-wrapper">
     
    394396<?php } ?>
    395397                                <div class="actions">
    396                                     <a class="button edit" href="admin.php?page=bp-profile-setup&amp;group_id=<?php echo attribute_escape( $admin_group->id ); ?>&amp;field_id=<?php echo attribute_escape( $field->id ); ?>&amp;mode=edit_field"><?php _e( 'Edit', 'buddypress' ); ?></a>
    397                                     <?php if ( !$field->can_delete ) : ?>&nbsp;<?php else : ?><a class="button delete" href="admin.php?page=bp-profile-setup&amp;field_id=<?php echo attribute_escape( $field->id ); ?>&amp;mode=delete_field"><?php _e( 'Delete', 'buddypress' ); ?></a><?php endif; ?>
     398                                    <a class="button edit" href="admin.php?page=bp-profile-setup&amp;group_id=<?php echo esc_attr( $admin_group->id ); ?>&amp;field_id=<?php echo esc_attr( $field->id ); ?>&amp;mode=edit_field"><?php _e( 'Edit', 'buddypress' ); ?></a>
     399                                    <?php if ( !$field->can_delete ) : ?>&nbsp;<?php else : ?><a class="button delete" href="admin.php?page=bp-profile-setup&amp;field_id=<?php echo esc_attr( $field->id ); ?>&amp;mode=delete_field"><?php _e( 'Delete', 'buddypress' ); ?></a><?php endif; ?>
    398400
    399401                                </div>
    400402<?php if ( $field->description ) : ?>
    401                                 <p class="description"><?php echo attribute_escape( $field->description ); ?></p>
     403                                <p class="description"><?php echo esc_attr( $field->description ); ?></p>
    402404<?php endif; ?>
    403405                            </div>
Note: See TracChangeset for help on using the changeset viewer.