Thread Starter
anver
(@anver)
The use case is like a carousel which has unique id for each section, so it should have some unique id as an attribute which is persistant. ClientId is not meant for this purpose.
This problem mainly occurs when you call the function before it is loaded, So to avoid this error use ‘init’ or ‘wp_loaded’. These are the best hooks to process your post or get variables as far as I know. I got the same error and after diving into the core files I ended up using these hooks and everything went ok. WordPress Rocks !
Same error for me but solved by putting require_once(ABSPATH .’wp-includes/pluggable.php’); on the construct of my class. This is a strange behavior.