• 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)
  • Plugin Author WillBontrager

    (@willbontrager)

    dskowronski, there may be another plugin that scans the post. A social media plugin, perhaps, or an SEO one. According to what you’ve told me, I’m thinking something is making the page load twice.

    The procedure described at this support cycle
    http://www.willmaster.com/support/forum/viewtopic.php?t=534
    revealed that a Facebook plugin or extension was the culprit.

    Let me know what you find out.

    Will

    Plugin Author WillBontrager

    (@willbontrager)

    Because there has been no response, I’m assuming the original poster resolved the issue.

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