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
Tokens::is_valid_user_token( $token )
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
- $meta
(Required)
- $token
(Required)
Return Return
(bool)
Source Source
File: src/core/lib/recipe-parts/trait-tokens.php
public static function is_valid_user_token( $token ) { /** * @var mixed $value * @var array $pieces * @var int $recip_id * @var array $trigger_data * @var int $user_id * @var array $replace_args */ extract( $token ); // phpcs:ignore WordPress.PHP.DontExtract.extract_extract if ( ! $pieces ) { // Token array is empty. return false; } $replaceable = str_replace( array( '{{', '}}', '', $pieces ) ); if ( ! in_array( $replaceable, self::$user_tokens, false ) ) { // Token is missing. return false; } return true; }
Expand full source code Collapse full source code View on Github