| 1 |
<?php |
<?php |
| 2 |
|
|
| 3 |
|
/** |
| 4 |
|
* Implementation of hook_help(). |
| 5 |
|
*/ |
| 6 |
function pirate_help($section) { |
function pirate_help($section) { |
| 7 |
switch ($section) { |
switch ($section) { |
| 8 |
case 'admin/modules#description': |
case 'admin/modules#description': |
| 10 |
} |
} |
| 11 |
} |
} |
| 12 |
|
|
| 13 |
|
/** |
| 14 |
|
* Implementation of hook_filter(). |
| 15 |
|
*/ |
| 16 |
function pirate_filter($op, $delta = 0, $format = -1, $text = '') { |
function pirate_filter($op, $delta = 0, $format = -1, $text = '') { |
| 17 |
switch ($op) { |
switch ($op) { |
| 18 |
case 'list': |
case 'list': |
| 132 |
} |
} |
| 133 |
} |
} |
| 134 |
|
|
| 135 |
|
/** |
| 136 |
|
* Implementation of hook_filter_tips(). |
| 137 |
|
*/ |
| 138 |
function pirate_filter_tips($delta, $format, $long = FALSE) { |
function pirate_filter_tips($delta, $format, $long = FALSE) { |
| 139 |
return "Avast! This website be taken over by pirates on September 19th. Yarr!"; |
return "Avast! This website be taken over by pirates on September 19th. Yarr!"; |
| 140 |
} |
} |
| 141 |
|
|
| 142 |
// support function for pirate() |
// Support function for pirate() |
| 143 |
// this could probably be refactored to make it more generic, allowing |
// this could probably be refactored to make it more generic, allowing |
| 144 |
// different filters to pass their own patterns in. |
// different filters to pass their own patterns in. |
| 145 |
function avast($stub = '',$chance = 5) { |
function avast($stub = '',$chance = 5) { |