get_current_post_type notice
-
In
get_current_post_type()please addif (is_integer($post)) return null;It’s because multiple plugins (I’ve wp-pop-up in mind, but other do too), may very well, during the early page bootstrap, set
$postto an *integer* value.$post->post_typethus causes an annoying notice for these.thx
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
The topic ‘get_current_post_type notice’ is closed to new replies.