• Resolved qwyrp

    (@qwyrp)


    I’ve one function with a condition and one function withoud an condition. Both function need to print out the same text.

    function conditionFunction {
      print "some kind of text";
      if TRUE then <strong>echo "some kind of shared Text";</strong>
    }
    
    function noConditionFunction {
       print "some other kind of text";
       <strong>echo "some kind of shared Text";</strong>
    }

    So I’ve to shared text and maintain wise that’s not optimal. Is there a way I can call a function, definition or whatsoever to display the shared text. With the result that I only need to maintain it on one place.

    Example

    function conditionFunction {
      print "some kind of text";
      if TRUE then printSharedText();
    }
    
    function noConditionFunction {
       print "some other kind of text";
       printSharedText();
    }
    
    specialKindOfFunction printSharedText() {
       <strong>echo "some kind of shared Text";</strong>
    }
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor Ironikus

    (@ironikus)

    Hey @qwyrp – thanks for reaching out.
    Can you please share some further details on which connection you want to use this logic with our plugin?
    Are you referring to a specific webhook endpoint or plugin code?
    Thank you already a lot. ??

    Thread Starter qwyrp

    (@qwyrp)

    I just noticed that I am in a wrong forum. This question was for ment a general Hook forum. Apologies for this!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Inside a webhook call a function to diplay text’ is closed to new replies.