| 1 |
<?php |
<?php |
| 2 |
// $Id: actions.module,v 1.33 2008/04/10 14:12:57 jvandyk Exp $ |
// $Id: actions.module,v 1.34 2008/04/17 18:40:47 jvandyk Exp $ |
| 3 |
|
|
| 4 |
/** |
/** |
| 5 |
* @file |
* @file |
| 574 |
// Restrict the options list to actions that declare support for this hook-op |
// Restrict the options list to actions that declare support for this hook-op |
| 575 |
// combination. |
// combination. |
| 576 |
foreach (actions_list() as $func => $metadata) { |
foreach (actions_list() as $func => $metadata) { |
| 577 |
if (isset($metadata['hooks']['any']) || (isset($metadata['hooks'][$hook]) && is_array($metadata['hooks'][$hook]) && (in_array($op, $metadata['hooks'][$hook])))) { |
if (isset($metadata['hooks']['any']) // The action supports any hook. |
| 578 |
$functions[] = $func; |
|| (isset($metadata['hooks'][$hook]) // The action has declared which hooks it supports |
| 579 |
|
&& is_array($metadata['hooks'][$hook]) // by defining an array. |
| 580 |
|
// Either the current op must be in the array or the token 'any' must be in the array. |
| 581 |
|
&& ((in_array($op, $metadata['hooks'][$hook])) || in_array('any', $metadata['hooks'][$hook])))) { |
| 582 |
|
$functions[] = $func; |
| 583 |
} |
} |
| 584 |
} |
} |
| 585 |
foreach (actions_actions_map(actions_get_all_actions()) as $aid => $action) { |
foreach (actions_actions_map(actions_get_all_actions()) as $aid => $action) { |