| 1 | <?php |
||
| 6 | class Timber_WP_CLI_Command extends WP_CLI_Command { |
||
| 7 | |||
| 8 | /** |
||
| 9 | * Clears Timber and Twig's Cache |
||
| 10 | * |
||
| 11 | * ## EXAMPLES |
||
| 12 | * |
||
| 13 | * wp timber clear_cache |
||
| 14 | * |
||
| 15 | */ |
||
| 16 | public function clear_cache($mode = 'all') { |
||
| 19 | |||
| 20 | /** |
||
| 21 | * Clears Twig's Cache |
||
| 22 | * |
||
| 23 | * ## EXAMPLES |
||
| 24 | * |
||
| 25 | * wp timber clear_cache_twig |
||
| 26 | * |
||
| 27 | */ |
||
| 28 | function clear_cache_twig(){ |
||
| 36 | |||
| 37 | /** |
||
| 38 | * Clears Timber's Cache |
||
| 39 | * |
||
| 40 | * ## EXAMPLES |
||
| 41 | * |
||
| 42 | * wp timber clear_cache_timber |
||
| 43 | * |
||
| 44 | */ |
||
| 45 | function clear_cache_timber() { |
||
| 56 | |||
| 57 | } |
||
| 58 |
Adding explicit visibility (
private,protected, orpublic) is generally recommend to communicate to other developers how, and from where this method is intended to be used.