Changeset 37146 for branches/4.4/src/wp-admin/theme-install.php
- Timestamp:
- 03/30/2016 06:40:18 PM (9 years ago)
- Location:
- branches/4.4
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/4.4
-
branches/4.4/src/wp-admin/theme-install.php
r35527 r37146 149 149 <div class="favorites-form"> 150 150 <?php 151 $user = isset( $_GET['user'] ) ? wp_unslash( $_GET['user'] ) : get_user_option( 'wporg_favorites' ); 152 update_user_meta( get_current_user_id(), 'wporg_favorites', $user ); 151 $action = 'save_wporg_username_' . get_current_user_id(); 152 if ( isset( $_GET['_wpnonce'] ) && wp_verify_nonce( wp_unslash( $_GET['_wpnonce'] ), $action ) ) { 153 $user = isset( $_GET['user'] ) ? wp_unslash( $_GET['user'] ) : get_user_option( 'wporg_favorites' ); 154 update_user_meta( get_current_user_id(), 'wporg_favorites', $user ); 155 } else { 156 $user = get_user_option( 'wporg_favorites' ); 157 } 153 158 ?> 154 159 <p class="install-help"><?php _e( 'If you have marked themes as favorites on WordPress.org, you can browse them here.' ); ?></p> … … 156 161 <p> 157 162 <label for="user"><?php _e( 'Your WordPress.org username:' ); ?></label> 163 <input type="hidden" id="wporg-username-nonce" name="_wpnonce" value="<?php echo esc_attr( wp_create_nonce( $action ) ); ?>" /> 158 164 <input type="search" id="wporg-username-input" value="<?php echo esc_attr( $user ); ?>" /> 159 165 <input type="button" class="button button-secondary favorites-form-submit" value="<?php esc_attr_e( 'Get Favorites' ); ?>" />
Note: See TracChangeset
for help on using the changeset viewer.