- Timestamp:
- 01/10/2018 09:34:15 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-xprofile/classes/class-bp-xprofile-field.php
r11700 r11808 1164 1164 */ 1165 1165 public function render_admin_form( $message = '' ) { 1166 1167 // Users Admin URL 1168 $users_url = bp_get_admin_url( 'users.php' ); 1169 1170 // Add New 1166 1171 if ( empty( $this->id ) ) { 1167 1172 $title = __( 'Add New Field', 'buddypress' ); 1168 $action = "users.php?page=bp-profile-setup&group_id=" . $this->group_id . "&mode=add_field#tabs-" . $this->group_id; 1169 $button = __( 'Save', 'buddypress' ); 1173 $button = __( 'Save', 'buddypress' ); 1174 $action = add_query_arg( array( 1175 'page' => 'bp-profile-setup', 1176 'mode' => 'add_field', 1177 'group_id' => (int) $this->group_id 1178 ), $users_url . '#tabs-' . (int) $this->group_id ); 1170 1179 1171 1180 if ( !empty( $_POST['saveField'] ) ) { … … 1180 1189 } 1181 1190 } 1191 1192 // Edit 1182 1193 } else { 1183 1194 $title = __( 'Edit Field', 'buddypress' ); 1184 $action = "users.php?page=bp-profile-setup&mode=edit_field&group_id=" . $this->group_id . "&field_id=" . $this->id . "#tabs-" . $this->group_id; 1185 $button = __( 'Update', 'buddypress' ); 1195 $button = __( 'Update', 'buddypress' ); 1196 $action = add_query_arg( array( 1197 'page' => 'bp-profile-setup', 1198 'mode' => 'edit_field', 1199 'group_id' => (int) $this->group_id, 1200 'field_id' => (int) $this->id 1201 ), $users_url . '#tabs-' . (int) $this->group_id ); 1186 1202 } ?> 1187 1203 … … 1287 1303 private function submit_metabox( $button_text = '' ) { 1288 1304 1305 // Setup the URL for deleting 1306 $users_url = bp_get_admin_url( 'users.php' ); 1307 $cancel_url = add_query_arg( array( 1308 'page' => 'bp-profile-setup' 1309 ), $users_url ); 1310 1289 1311 /** 1290 1312 * Fires before XProfile Field submit metabox. … … 1324 1346 1325 1347 <div id="delete-action"> 1326 <a href=" users.php?page=bp-profile-setup" class="deletion"><?php esc_html_e( 'Cancel', 'buddypress' ); ?></a>1348 <a href="<?php echo esc_url( $cancel_url ); ?>" class="deletion"><?php esc_html_e( 'Cancel', 'buddypress' ); ?></a> 1327 1349 </div> 1328 1350
Note: See TracChangeset
for help on using the changeset viewer.