• In get_current_post_type() please add

    if (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 $post to an *integer* value. $post->post_type thus causes an annoying notice for these.

    thx

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Gordan

    (@gordano)

    Noted, thank you!

    Thread Starter drzraf

    (@drzraf)

    I don’t see the change in the codebase, and the notice still happens in latest 2.6 version.

    Do you mind considering the suggestion?

    Thank you

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘get_current_post_type notice’ is closed to new replies.