Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
04/03/2015 09:33:25 PM (10 years ago)
Author:
johnjamesjacoby
Message:

XProfile: First pass at saving and looking for signup_position metadata when viewing the main admin editing page. See #6347.

File:
1 edited

Legend:

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

    r9682 r9690  
    121121                                <?php endif; ?>
    122122
    123                                 <span class="spinner"></span>
    124123                            </a>
    125124                        </li>
     
    373372                }
    374373
     374                // Validate signup
     375                if ( ! empty( $_POST['signup-position'] ) ) {
     376                    bp_xprofile_update_field_meta( $field_id, 'signup_position', (int) $_POST['signup-position'] );
     377                } else {
     378                    bp_xprofile_delete_meta( $field_id, 'field', 'signup_position' );
     379                }
     380
    375381                /**
    376382                 * Fires at the end of the process to save a field for a user, if successful.
     
    490496            <span>
    491497                <?php bp_the_profile_field_name(); ?>
    492                 <?php if ( ! $field->can_delete ) : ?> <?php _e( '(Primary)', 'buddypress' ); endif; ?>
    493                 <?php if ( bp_get_the_profile_field_is_required() ) : ?><?php _e( '(Required)', 'buddypress' ) ?><?php endif; ?>
     498
     499                <?php if ( empty( $field->can_delete )                                    ) : ?><?php esc_html_e( '(Primary)',  'buddypress' ); endif; ?>
     500                <?php if ( bp_get_the_profile_field_is_required()                         ) : ?><?php esc_html_e( '(Required)', 'buddypress' ); endif; ?>
     501                <?php if ( bp_xprofile_get_meta( $field->id, 'field', 'signup_position' ) ) : ?><?php esc_html_e( '(Sign-up)',  'buddypress' ); endif; ?>
     502
    494503                <?php
    495504
Note: See TracChangeset for help on using the changeset viewer.