The Add Media button loads forever with my plugin (add_action "shutdown")
-
Since I created my plugin, I see that the “Add Media” button does not load at all. However, when I comment the “shutdown” action, it works.
I created a plugin, it’s basically just two custom post types with a few abilities added to them (https://lespointscom.com/a/misc/tcaan/tcaan_members.zip).
However, I noticed that the “shutdown” action, even without anything in it, creates a BUG :
add_action("shutdown", "tcaan_members_debug");
I made sure to empty the “tcaan_members_debug” function like so :
`function tcaan_members_debug()
{
/*
if(!(isset($_GET[“post”]) && isset($_GET[“action”])))
{
global $TCAAN_Members;
if(get_option(“tcaan_show_debug”) == 1)
{
$TCAAN_Members->tcaan_debug();
}
else{}
}
*/
}
`Still, the bug persisted with the same “infinite” loading.
It was only when I decided to comment the add_action itself, that I noticed everything was working fine ://add_action("shutdown", "tcaan_members_debug");
That seems to mean that “shutdown” does not work at all for wordpress 4.1.1 at least.
- The topic ‘The Add Media button loads forever with my plugin (add_action "shutdown")’ is closed to new replies.