This is an example of a plugin as depicted in TaviSuggestions/PlugIns.

Say there is a file, date.php, which is put within the plugin-directory. This file contains:

<?php
  function date_main() {
    // do some magic
    // call internal function
    $text = date_findToday()
    return $text;
  }

  function date_findToday() {
     // more magic, you get the idea...
     return $date;
  }
 ?>

Then if the user wrote [[& date]] into a document it might be replaced by 2003-04-28.