Own plugin calling function twice
-
I have created an own plugin. I added it to a wordpress page with following action:
add_shortcode("myplugin", "MyFunction");
I am posting some information via form/POST to this plugin. Unfortunately one important function (calling external URL/API via CURL) is processed twice every time I am posting this information in function1().
Do you have any idea why/how to avoid this?
function MyFunction($atts) { $content = "Content..."; // [...] // switching tasks by GET/POST-parameters switch ($task) { case "task1": $content = function1($value1, $value2); break; default: $content = showform(); } return $content; }
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Own plugin calling function twice’ is closed to new replies.