aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/actions.php
diff options
context:
space:
mode:
Diffstat (limited to 'engine/lib/actions.php')
-rw-r--r--engine/lib/actions.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/engine/lib/actions.php b/engine/lib/actions.php
index 7e8e43f40..304179828 100644
--- a/engine/lib/actions.php
+++ b/engine/lib/actions.php
@@ -236,5 +236,18 @@ function get_site_secret() {
return $secret;
}
+/**
+ * Check if an action is registered and its file exists.
+ *
+ * @param string $action
+ * @return BOOL
+ * @since 1.8
+ */
+function elgg_action_exist($action) {
+ global $CONFIG;
+
+ return (isset($CONFIG->actions[$action]) && file_exists($CONFIG->actions[$action]['file']));
+}
+
// Register some actions ***************************************************
register_elgg_event_handler("init","system","actions_init");