Warning: Array to string conversion in /home/customer/www/docs.automatorplugin.com/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 825
Warning: foreach() argument must be of type array|object, string given in /home/customer/www/docs.automatorplugin.com/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 830
Warning: Array to string conversion in /home/customer/www/docs.automatorplugin.com/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 825
Warning: foreach() argument must be of type array|object, string given in /home/customer/www/docs.automatorplugin.com/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 830
Warning: Array to string conversion in /home/customer/www/docs.automatorplugin.com/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 825
Automator_Get_Data::value_from_trigger_meta( null $trigger_code = null, null $meta = null )
Contents
Warning: foreach() argument must be of type array|object, string given in /home/customer/www/docs.automatorplugin.com/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 830
Warning: Array to string conversion in /home/customer/www/docs.automatorplugin.com/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 825
Warning: foreach() argument must be of type array|object, string given in /home/customer/www/docs.automatorplugin.com/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 830
Warning: Array to string conversion in /home/customer/www/docs.automatorplugin.com/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 825
Parameters Parameters
- $trigger_code
(Optional)
Default value: null
- $meta
(Optional)
Default value: null
Return Return
(mixed|string|null)
Source Source
File: src/core/lib/utilities/class-automator-get-data.php
public function value_from_trigger_meta( $trigger_code = null, $meta = null ) { if ( null === $trigger_code || ! is_string( $trigger_code ) ) { Automator()->error->add_error( 'trigger_priority_from_trigger_code', 'ERROR: You are trying to get a trigger priority from a trigger code without providing a $trigger_code', $this ); return null; } if ( null === $meta || ! is_string( $meta ) ) { Automator()->error->add_error( 'trigger_priority_from_trigger_code', 'ERROR: You are trying to get a trigger priority from a trigger code without providing a $meta', $this ); return null; } // Load all default trigger settings $meta_value = null; $system_triggers = Automator()->get_triggers(); if ( empty( $system_triggers ) ) { return $meta_value; } foreach ( $system_triggers as $system_trigger ) { if ( $system_trigger['code'] === $trigger_code ) { return isset( $system_trigger[ $meta ] ) ? $system_trigger[ $meta ] : $meta_value; } } return $meta_value; }
Expand full source code Collapse full source code View on Github