Automator_Get_Data::action_execution_function_from_action_code( null $action_code = null )
Accepts an action code(most like from trigger meta) and returns that associated action execution function
Contents
Parameters Parameters
- $action_code
-
(Optional)
Default value: null
Return Return
(null) |array String is the function is not within a class and array if it is
Source Source
File: src/core/lib/utilities/class-automator-get-data.php
public function action_execution_function_from_action_code( $action_code = null ) { if ( null === $action_code || ! is_string( $action_code ) ) { Automator()->error->add_error( 'action_execution_function_from_action_code', 'ERROR: You are trying to get an action execution function from an action code without providing a $action_code', $this ); return null; } // Load all default trigger settings $system_actions = Automator()->get_actions(); if ( empty( $system_actions ) ) { return null; } foreach ( $system_actions as $system_action ) { if ( $system_action['code'] === $action_code ) { return $system_action['execution_function']; } } return null; }
Expand full source code Collapse full source code View on Github