mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-01 15:50:09 +00:00
Add magic get/set/isset methods to WP_User to avoid data duplication. Standardize on WP_User::ID. Props scribu. see #15458
git-svn-id: https://develop.svn.wordpress.org/trunk@18504 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -783,7 +783,7 @@ if ( !function_exists('is_user_logged_in') ) :
|
||||
function is_user_logged_in() {
|
||||
$user = wp_get_current_user();
|
||||
|
||||
if ( $user->id == 0 )
|
||||
if ( $user->ID == 0 )
|
||||
return false;
|
||||
|
||||
return true;
|
||||
@@ -1308,7 +1308,7 @@ if ( !function_exists('wp_verify_nonce') ) :
|
||||
*/
|
||||
function wp_verify_nonce($nonce, $action = -1) {
|
||||
$user = wp_get_current_user();
|
||||
$uid = (int) $user->id;
|
||||
$uid = (int) $user->ID;
|
||||
|
||||
$i = wp_nonce_tick();
|
||||
|
||||
@@ -1334,7 +1334,7 @@ if ( !function_exists('wp_create_nonce') ) :
|
||||
*/
|
||||
function wp_create_nonce($action = -1) {
|
||||
$user = wp_get_current_user();
|
||||
$uid = (int) $user->id;
|
||||
$uid = (int) $user->ID;
|
||||
|
||||
$i = wp_nonce_tick();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user