Quantcast
Channel: WordPress › Support » Forum: Hacks - Recent Topics
Viewing all articles
Browse latest Browse all 8245

fluesey on "get_user_setting for logged out user change WP 3.7"

$
0
0

get_all_user_settings() which is used by get_user_setting now checks that user is logged in - ie get_current_user_id is non-zero - before returning anything. The single line change that makes the difference is that pre-3.7:

if ( ! $user = wp_get_current_user() )

was changed in 3.7 to:

if ( ! $user_id = get_current_user_id() )

This is a bit of a bummer as it was handy to use all the cookie stuff in utils.js before.

The workaround for me was just to copy the pre-3.7 version into my own code.


Viewing all articles
Browse latest Browse all 8245

Trending Articles