Changeset 797 for branches/Ver2.4/xpressme_integration_kit
- Timestamp:
- Nov 2, 2011, 8:08:19 PM (13 years ago)
- Location:
- branches/Ver2.4/xpressme_integration_kit
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/Ver2.4/xpressme_integration_kit/include/oninstall.php
r794 r797 300 300 if( ! function_exists( 'sanitize_user_multibyte' ) ) : 301 301 function sanitize_user_multibyte($username, $raw_username, $strict){ 302 if ($username == "" && $strict){ 303 if ($raw_username == ""){ 304 return $username; 305 } else{ 306 return sanitize_user($raw_username, false); 307 } 308 } else { 309 return $username; 310 } 302 if ($raw_username !== "" && $username !== $raw_username){ 303 return $raw_username; 304 } 305 return $username; 311 306 } 312 307 endif; -
branches/Ver2.4/xpressme_integration_kit/wp-content/plugins/xpressme/xpressme.php
r794 r797 84 84 85 85 // enable multibyte username 86 if( ! function_exists( 'sanitize_user_multibyte' ) ){ 87 function sanitize_user_multibyte($username, $raw_username, $strict){ 88 if ($username == "" && $strict){ 89 if ($raw_username == ""){ 90 return $username; 91 } else{ 92 return sanitize_user($raw_username, false); 93 } 94 } else { 95 return $username; 86 if( ! function_exists( 'sanitize_user_multibyte_at_update' ) ){ 87 function sanitize_user_multibyte_at_update($username, $raw_username, $strict){ 88 if (isset($_POST['action']) && $_POST['action'] == 'update'){ 89 if ($raw_username !== "" && $username !== $raw_username){ 90 return $raw_username; 91 } 96 92 } 93 return $username; 97 94 } 98 95 } 99 add_filter('sanitize_user', "sanitize_user_multibyte " ,10,3);96 add_filter('sanitize_user', "sanitize_user_multibyte_at_update" ,10,3); 100 97 101 98 add_action('admin_menu', 'my_plugin_menu');
Note: See TracChangeset
for help on using the changeset viewer.