Skip to:
Content

BuddyPress.org

Changeset 7271


Ignore:
Timestamp:
07/11/2013 05:28:38 PM (11 years ago)
Author:
johnjamesjacoby
Message:

In XProfile admin, replace admin.php links with users.php. Fixes regression from 1.6 when profile fields were moved out of Settings and into Users, causing the "Profile Fields" menu item to not appear currently selected. See #5094.

Location:
trunk/bp-xprofile
Files:
2 edited

Legend:

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

    r7010 r7271  
    7070        <h2>
    7171            <?php _e( 'Profile Fields', 'buddypress'); ?>
    72             <a id="add_group" class="add-new-h2" href="admin.php?page=bp-profile-setup&amp;mode=add_group"><?php _e( 'Add New Field Group', 'buddypress' ); ?></a>
     72            <a id="add_group" class="add-new-h2" href="users.php?page=bp-profile-setup&amp;mode=add_group"><?php _e( 'Add New Field Group', 'buddypress' ); ?></a>
    7373        </h2>
    7474
     
    111111                        <div class="tab-toolbar">
    112112                            <div class="tab-toolbar-left">
    113                                 <a class="button-primary" 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>
    114                                 <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>
     113                                <a class="button-primary" href="users.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>
     114                                <a class="button edit" href="users.php?page=bp-profile-setup&amp;mode=edit_group&amp;group_id=<?php echo esc_attr( $group->id ); ?>"><?php _e( 'Edit Group', 'buddypress' ); ?></a>
    115115
    116116                                <?php if ( $group->can_delete ) : ?>
    117117
    118                                     <a class="confirm submitdelete deletion ajax-option-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>
     118                                    <a class="confirm submitdelete deletion ajax-option-delete" href="users.php?page=bp-profile-setup&amp;mode=delete_group&amp;group_id=<?php echo esc_attr( $group->id ); ?>"><?php _e( 'Delete Group', 'buddypress' ); ?></a>
    119119
    120120                                <?php endif; ?>
     
    160160
    161161                    <div id="message" class="error"><p><?php _e( 'You have no groups.', 'buddypress' ); ?></p></div>
    162                     <p><a href="admin.php?page=bp-profile-setup&amp;mode=add_group"><?php _e( 'Add New Group', 'buddypress' ); ?></a></p>
     162                    <p><a href="users.php?page=bp-profile-setup&amp;mode=add_group"><?php _e( 'Add New Group', 'buddypress' ); ?></a></p>
    163163
    164164                <?php endif; ?>
     
    454454
    455455            <div class="actions">
    456                 <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>
     456                <a class="button edit" href="users.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>
    457457
    458458                <?php if ( $field->can_delete ) : ?>
    459459
    460                     <a class="confirm submit-delete deletion" 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>
     460                    <a class="confirm submit-delete deletion" href="users.php?page=bp-profile-setup&amp;field_id=<?php echo esc_attr( $field->id ); ?>&amp;mode=delete_field"><?php _e( 'Delete', 'buddypress' ); ?></a>
    461461
    462462                <?php endif; ?>
  • trunk/bp-xprofile/bp-xprofile-classes.php

    r7265 r7271  
    353353        if ( empty( $this->id ) ) {
    354354            $title  = __( 'Add New Field Group', 'buddypress' );
    355             $action = "admin.php?page=bp-profile-setup&amp;mode=add_group";
     355            $action = "users.php?page=bp-profile-setup&amp;mode=add_group";
    356356            $button = __( 'Create Field Group', 'buddypress' );
    357357        } else {
    358358            $title  = __( 'Edit Field Group', 'buddypress' );
    359             $action = "admin.php?page=bp-profile-setup&amp;mode=edit_group&amp;group_id=" . $this->id;
     359            $action = "users.php?page=bp-profile-setup&amp;mode=edit_group&amp;group_id=" . $this->id;
    360360            $button = __( 'Save Changes', 'buddypress' );
    361361        } ?>
     
    404404                                            <div id="major-publishing-actions">
    405405                                                <div id="delete-action">
    406                                                     <a href="admin.php?page=bp-profile-setup" class="submitdelete deletion"><?php _e( 'Cancel', 'buddypress' ); ?></a>
     406                                                    <a href="users.php?page=bp-profile-setup" class="submitdelete deletion"><?php _e( 'Cancel', 'buddypress' ); ?></a>
    407407                                                </div>
    408408                                                <div id="publishing-action">
     
    785785                            <input type="<?php echo $default_input; ?>" name="isDefault_<?php echo esc_attr( $type ); ?>_option<?php echo esc_attr( $default_name ); ?>" <?php checked( (int) $options[$i]->is_default_option, true ); ?> value="<?php echo esc_attr( $j ); ?>" />
    786786                            <span><?php _e( 'Default Value', 'buddypress' ); ?></span>
    787                             <a href="<?php echo esc_url( 'admin.php?page=bp-profile-setup&amp;mode=delete_option&amp;option_id=' . $options[$i]->id ); ?>" class="ajax-option-delete" id="delete-<?php echo esc_attr( $options[$i]->id ); ?>">[x]</a>
     787                            <a href="<?php echo esc_url( 'users.php?page=bp-profile-setup&amp;mode=delete_option&amp;option_id=' . $options[$i]->id ); ?>" class="ajax-option-delete" id="delete-<?php echo esc_attr( $options[$i]->id ); ?>">[x]</a>
    788788                        </p>
    789789
     
    817817        if ( empty( $this->id ) ) {
    818818            $title  = __( 'Add Field', 'buddypress' );
    819             $action = "admin.php?page=bp-profile-setup&amp;group_id=" . $this->group_id . "&amp;mode=add_field#tabs-" . $this->group_id;
     819            $action = "users.php?page=bp-profile-setup&amp;group_id=" . $this->group_id . "&amp;mode=add_field#tabs-" . $this->group_id;
    820820
    821821            if ( !empty( $_POST['saveField'] ) ) {
     
    829829        } else {
    830830            $title  = __( 'Edit Field', 'buddypress' );
    831             $action = "admin.php?page=bp-profile-setup&amp;mode=edit_field&amp;group_id=" . $this->group_id . "&amp;field_id=" . $this->id . "#tabs-" . $this->group_id;
     831            $action = "users.php?page=bp-profile-setup&amp;mode=edit_field&amp;group_id=" . $this->group_id . "&amp;field_id=" . $this->id . "#tabs-" . $this->group_id;
    832832        } ?>
    833833
     
    926926                        <input type="hidden" name="field_order" id="field_order" value="<?php echo esc_attr( $this->field_order ); ?>" />
    927927                        <input type="submit" value="<?php _e( 'Save', 'buddypress' ); ?>" name="saveField" id="saveField" style="font-weight: bold" class="button-primary" />
    928                         <?php _e( 'or', 'buddypress' ); ?> <a href="admin.php?page=bp-profile-setup" class="deletion"><?php _e( 'Cancel', 'buddypress' ); ?></a>
     928                        <?php _e( 'or', 'buddypress' ); ?> <a href="users.php?page=bp-profile-setup" class="deletion"><?php _e( 'Cancel', 'buddypress' ); ?></a>
    929929                    </p>
    930930
Note: See TracChangeset for help on using the changeset viewer.