| | 195 | // Catch tags in the format {hi:command:parameter} |
| | 196 | if(preg_match('%^(\w+):(.+)$%', $cmd, $cmd_matches)) { |
| | 197 | switch(strtolower($cmd_matches[1])) { |
| | 198 | case 'display': |
| | 199 | return '<?php $theme->display(\'' . $cmd_matches[2] . '\'); ?>'; |
| | 200 | case 'option': |
| | 201 | case 'options': |
| | 202 | return '<?php Options::out(\'' . $cmd_matches[2] . '\'); ?>'; |
| | 203 | case 'siteurl': |
| | 204 | return '<?php Site::out_url( \'' . $cmd_matches[2] . '\' ); ?>'; |
| | 205 | case 'url': |
| | 206 | return '<?php URL::out( \'' . $cmd_matches[2] . '\' ); ?>'; |
| | 207 | } |
| | 208 | } |
| | 209 | |
| | 210 | // Use tags in the format {hi:@foo} as theme functions, ala $theme->foo(); |
| | 211 | if($cmd[0] == '@') { |
| | 212 | return '<?php $theme->' . substr($cmd, 1) . '(); ?>'; |
| | 213 | } |
| | 214 | |