Skip to content

4AI hooks

Below is a list of all 4AI hooks which allows you to modify or extend its behavior programmatically.

Summary

4AI currently offers 10 actions in 2 groups.
4AI currently offers 4 filters in 3 groups.

Actions

4AI currently offers 10 actions in 2 groups.

Group: Content

forai_content_prepared

Content action

Action to let plugins obtain the finalized content for the current request

@param string $context The context of the content being passed to the plugin. @param mixed $row An object with a "text" property @param mixed $params Additional parameters. See {@see PlgContentContent()}. @param integer $page Optional page number. Unused. Defaults to zero.

@since 1.0.0

in /plugins/system/forai/forai.php
@line 253

Group: Events

forai_onAfterDispatch

Events action

Hook to run the registered onAfterDispatch handlers.

@since 1.0.0

in /plugins/system/forai/forai.php
@line 292

forai_onAfterDispatchComplete

Events action

Hook to run the registered onAfterDispatchComplete handlers.

@since 1.0.0

in /plugins/system/forai/forai.php
@line 325

forai_onAfterInitialise

Events action

Hook to run the registered onAfterInitialise handlers.

@since 1.0.0

in /plugins/system/forai/forai.php
@line 106

forai_onAfterRender

Events action

Hook to run the registered onAfterRoute handlers.

@since 1.0.0

in /plugins/system/forai/forai.php
@line 406

forai_onAfterRenderComplete

Events action

Hook to run the registered onAfterRoute handlers.

@since 1.0.0

in /plugins/system/forai/forai.php
@line 462

forai_onAfterRespond

Events action

Hook to run the registered onAfterRespond handlers.
Warning: body may be gzipped at this time.

@since 1.0.0

in /plugins/system/forai/forai.php
@line 507

forai_onAfterRoute

Events action

Hook to run the registered onAfterRoute handlers.

@since 1.0.0

in /plugins/system/forai/forai.php
@line 181

forai_onBeforeCompileHead

Events action

Hook to run the registered onBeforeCompileHead handlers.

@since 1.0.0

in /plugins/system/forai/forai.php
@line 384

forai_onBeforeRender

Events action

Hook to run the registered onBeforeRender handlers.

@since 1.0.0

in /plugins/system/forai/forai.php
@line 352

Filters

4AI currently offers 4 filters in 3 groups.

Group: Content

forai_onContentPrepare

Content filter

Hook to run the registered onContentPrepare handlers.

@param bool $modified Whether the content was modified. @param string $context The context of the content being passed to the plugin. @param mixed & $row An object with a "text" property @param mixed & $params Additional parameters. See {@see PlgContentContent()}. @param integer $page Optional page number. Unused. Defaults to zero.

@since 1.0.0

in /plugins/system/forai/forai.php
@line 219

Group: Events

forai_onPrivacyCollectAdminCapabilities

Events filter

Hook to run the registered onAfterInitialise handlers.

@since 1.0.0

in /plugins/system/forai/forai.php
@line 128

Group: Output

forai_onAfterRenderComplete_body

Output filter

Filter the body of the CMS response at onAfterRender.

@param string $body Body of the current request.

@since 1.0.0

in /plugins/system/forai/forai.php
@line 475

forai_onAfterRender_body

Output filter

Filter the body of the CMS response at onAfterRender.

@param string $body Body of the current request.

@since 1.0.0

in /plugins/system/forai/forai.php
@line 419