Plugin infinite loop

Hello elgg community,

I have a problem when enabling a plugin with following code in the start php:

<?php
thewire_save_post("hello");

?>

(Actually in my plugin there is more code but the problem is the same) This will give me an infinite loop posting hello on the wire, but I want to post "hello" only one time on the wire when enabling the plugin. How do I have to expand the code so my problem will be solved?

I'm new to elgg and need help.

Beginning Developers

Beginning Developers

This space is for newcomers, who wish to build a new plugin or to customize an existing one to their liking