timekeeper_shortcodes.php 893 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <?php
  2. /*
  3. * To change this license header, choose License Headers in Project Properties.
  4. * To change this template file, choose Tools | Templates
  5. * and open the template in the editor.
  6. */
  7. class timekeeper_shortcodes extends e_shortcode
  8. {
  9. function sc_say_hello($parm='')
  10. {
  11. return "Hello ".USERNAME;
  12. }
  13. function sc_element_number($parm='')
  14. {
  15. return vartrue($this->var['number']);
  16. }
  17. function sc_element_symbol($parm='')
  18. {
  19. return vartrue($this->var['symbol']);
  20. }
  21. function sc_element_name($parm='')
  22. {
  23. return vartrue($this->var['name']);
  24. }
  25. function sc_element_phase($parm='')
  26. {
  27. return vartrue($this->var['phase']);
  28. }
  29. function sc_element_atomic_mass($parm='')
  30. {
  31. return '('.vartrue($this->var['atomic_mass']).')';
  32. }
  33. //{SAY_HELLO},{ELEMENT_SYMBOL}
  34. }