Support » Plugin: Insert PHP » Code executed twice

  • Resolved dskowronski

    (@dskowronski)


    Hello,

    I am using php_insert for long time but recently (probably after update to 3.8.2 but there is no way I can check it) my code started to be executed twice.

    Normally I use require_once for external script – and it works. But now script does not produce output – even file with echo "OK";
    When I changed require_once into require PHP complained about redeclaration of function. Quick way around is using if (!function_exist('foo')){ function foo(){ ... } }

    My script downloads content from other website it’s quite slow and executing it twice is really bad.

    I beleive that there is something in wordpress core that checks content of article with executing [php_insert].
    I know PHP well but I do not have idea how to debug which function is guilty except reading source code of everything in /wp-include

    Is there anything I can do not to execute code twice by modyfying only plugin?

    https://wordpress.org/plugins/insert-php/

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Code executed twice’ is closed to new replies.