Changeset 49276 for trunk/src/wp-admin/authorize-application.php
- Timestamp:
- 10/22/2020 03:04:23 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/authorize-application.php
r49272 r49276 19 19 $reject_url = $_POST['reject_url']; 20 20 $app_name = $_POST['app_name']; 21 $app_id = $_POST['app_id']; 21 22 $redirect = ''; 22 23 … … 28 29 } 29 30 } elseif ( isset( $_POST['approve'] ) ) { 30 $created = WP_Application_Passwords::create_new_application_password( get_current_user_id(), array( 'name' => $app_name ) ); 31 $created = WP_Application_Passwords::create_new_application_password( 32 get_current_user_id(), 33 array( 34 'name' => $app_name, 35 'app_id' => $app_id, 36 ) 37 ); 31 38 32 39 if ( is_wp_error( $created ) ) { … … 57 64 58 65 $app_name = ! empty( $_REQUEST['app_name'] ) ? $_REQUEST['app_name'] : ''; 66 $app_id = ! empty( $_REQUEST['app_id'] ) ? $_REQUEST['app_id'] : ''; 59 67 $success_url = ! empty( $_REQUEST['success_url'] ) ? $_REQUEST['success_url'] : null; 60 68 … … 69 77 $user = wp_get_current_user(); 70 78 71 $request = compact( 'app_name', ' success_url', 'reject_url' );79 $request = compact( 'app_name', 'app_id', 'success_url', 'reject_url' ); 72 80 $is_valid = wp_is_authorize_application_password_request_valid( $request, $user ); 73 81 … … 184 192 <?php wp_nonce_field( 'authorize_application_password' ); ?> 185 193 <input type="hidden" name="action" value="authorize_application_password" /> 194 <input type="hidden" name="app_id" value="<?php echo esc_attr( $app_id ); ?>" /> 186 195 <input type="hidden" name="success_url" value="<?php echo esc_url( $success_url ); ?>" /> 187 196 <input type="hidden" name="reject_url" value="<?php echo esc_url( $reject_url ); ?>" />
Note: See TracChangeset
for help on using the changeset viewer.