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
PeepSo_Tokens::peepso_possible_tokens( array $tokens = array(), array $args = array() )
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
- $tokens
(Optional)
Default value: array()
- $args
(Optional)
Default value: array()
Return Return
(array)
Source Source
File: src/integrations/peepso/tokens/peepso-tokens.php
public function peepso_possible_tokens( $tokens = array(), $args = array() ) { if ( ! automator_do_identify_tokens() ) { return $tokens; } if ( isset( $args['triggers_meta']['code'] ) && ( 'PPUSERUPDATESAVATAR' === $args['triggers_meta']['code'] ) ) { $fields = array( array( 'tokenId' => 'AVATARURL', 'tokenName' => __( 'User avatar URL', 'uncanny-automator' ), 'tokenType' => 'text', 'tokenIdentifier' => 'PPAVATARURL', ), array( 'tokenId' => 'FL_GENDER', 'tokenName' => __( 'User gender', 'uncanny-automator' ), 'tokenType' => 'text', 'tokenIdentifier' => 'PPFL_GENDER', ), array( 'tokenId' => 'FL_BIRTHDATE', 'tokenName' => __( 'User birthdate', 'uncanny-automator' ), 'tokenType' => 'text', 'tokenIdentifier' => 'PPFL_BIRTHDATE', ), array( 'tokenId' => 'FL_FOLLOWERS', 'tokenName' => __( 'User total number of followers', 'uncanny-automator' ), 'tokenType' => 'text', 'tokenIdentifier' => 'PPFL_FOLLOWERS', ), array( 'tokenId' => 'FL_FOLLOWING', 'tokenName' => __( 'User total following count of followers', 'uncanny-automator' ), 'tokenType' => 'text', 'tokenIdentifier' => 'PPFL_FOLLOWING', ), array( 'tokenId' => 'FL_PROFILEURL', 'tokenName' => __( 'User profile URL', 'uncanny-automator' ), 'tokenType' => 'text', 'tokenIdentifier' => 'PPFL_PROFILEURL', ), array( 'tokenId' => 'USR_ABOUTME', 'tokenName' => __( 'User bio', 'uncanny-automator' ), 'tokenType' => 'text', 'tokenIdentifier' => 'PPUSR_ABOUTME', ), array( 'tokenId' => 'USR_WEBSITE', 'tokenName' => __( 'User website address', 'uncanny-automator' ), 'tokenType' => 'text', 'tokenIdentifier' => 'PPUSR_WEBSITE', ), array( 'tokenId' => 'USR_USERROLE', 'tokenName' => __( 'User PeepSo role', 'uncanny-automator' ), 'tokenType' => 'text', 'tokenIdentifier' => 'PPUSR_USERROLE', ), ); $tokens = array_merge( $tokens, $fields ); } if ( isset( $args['triggers_meta']['code'] ) && ( 'PPUSERUPDATESPROFILE' === $args['triggers_meta']['code'] ) ) { $fields = array( array( 'tokenId' => 'AVATARURL', 'tokenName' => __( 'User avatar URL', 'uncanny-automator' ), 'tokenType' => 'text', 'tokenIdentifier' => 'PPAVATARURL', ), array( 'tokenId' => 'FL_USERNAME', 'tokenName' => __( 'Username', 'uncanny-automator' ), 'tokenType' => 'text', 'tokenIdentifier' => 'PPFL_USERNAME', ), array( 'tokenId' => 'FL_FIRST_NAME', 'tokenName' => __( 'User first name', 'uncanny-automator' ), 'tokenType' => 'text', 'tokenIdentifier' => 'PPFL_FIRST_NAME', ), array( 'tokenId' => 'FL_LAST_NAME', 'tokenName' => __( 'User last name', 'uncanny-automator' ), 'tokenType' => 'text', 'tokenIdentifier' => 'PPFL_LAST_NAME', ), array( 'tokenId' => 'FL_GENDER', 'tokenName' => __( 'User gender', 'uncanny-automator' ), 'tokenType' => 'text', 'tokenIdentifier' => 'PPFL_GENDER', ), array( 'tokenId' => 'FL_BIRTHDATE', 'tokenName' => __( 'User birthdate', 'uncanny-automator' ), 'tokenType' => 'text', 'tokenIdentifier' => 'PPFL_BIRTHDATE', ), array( 'tokenId' => 'FL_FOLLOWERS', 'tokenName' => __( 'User total number of followers', 'uncanny-automator' ), 'tokenType' => 'text', 'tokenIdentifier' => 'PPFL_FOLLOWERS', ), array( 'tokenId' => 'FL_FOLLOWING', 'tokenName' => __( 'User total following count of followers', 'uncanny-automator' ), 'tokenType' => 'text', 'tokenIdentifier' => 'PPFL_FOLLOWING', ), array( 'tokenId' => 'FL_PROFILEURL', 'tokenName' => __( 'User profile URL', 'uncanny-automator' ), 'tokenType' => 'text', 'tokenIdentifier' => 'PPFL_PROFILEURL', ), array( 'tokenId' => 'FL_EMAIL', 'tokenName' => __( 'User email', 'uncanny-automator' ), 'tokenType' => 'text', 'tokenIdentifier' => 'PPFL_EMAIL', ), ); $tokens = array_merge( $tokens, $fields ); } if ( isset( $args['triggers_meta']['code'] ) && ( 'PPUSERFOLLOWSAUSER' === $args['triggers_meta']['code'] || 'PPUSERGAINSFOLLOWER' === $args['triggers_meta']['code'] || 'PPUSERLOSESFOLLOWER' === $args['triggers_meta']['code'] ) ) { $fields = array( array( 'tokenId' => 'AVATARURL', 'tokenName' => __( 'PeepSo member avatar URL', 'uncanny-automator' ), 'tokenType' => 'text', 'tokenIdentifier' => 'PPAVATARURL', ), array( 'tokenId' => 'FL_USERID', 'tokenName' => __( 'PeepSo member user ID', 'uncanny-automator' ), 'tokenType' => 'text', 'tokenIdentifier' => 'PPFL_USERID', ), array( 'tokenId' => 'FL_USERNAME', 'tokenName' => __( 'PeepSo member username', 'uncanny-automator' ), 'tokenType' => 'text', 'tokenIdentifier' => 'PPFL_USERNAME', ), array( 'tokenId' => 'FL_FIRST_NAME', 'tokenName' => __( 'PeepSo member first name', 'uncanny-automator' ), 'tokenType' => 'text', 'tokenIdentifier' => 'PPFL_FIRST_NAME', ), array( 'tokenId' => 'FL_LAST_NAME', 'tokenName' => __( 'PeepSo member last name', 'uncanny-automator' ), 'tokenType' => 'text', 'tokenIdentifier' => 'PPFL_LAST_NAME', ), array( 'tokenId' => 'FL_GENDER', 'tokenName' => __( 'PeepSo member gender', 'uncanny-automator' ), 'tokenType' => 'text', 'tokenIdentifier' => 'PPFL_GENDER', ), array( 'tokenId' => 'FL_BIRTHDATE', 'tokenName' => __( 'PeepSo member birthdate', 'uncanny-automator' ), 'tokenType' => 'text', 'tokenIdentifier' => 'PPFL_BIRTHDATE', ), array( 'tokenId' => 'FL_FOLLOWERS', 'tokenName' => __( 'PeepSo member total number of followers', 'uncanny-automator' ), 'tokenType' => 'text', 'tokenIdentifier' => 'PPFL_FOLLOWERS', ), array( 'tokenId' => 'FL_FOLLOWING', 'tokenName' => __( 'PeepSo member total following count of followers', 'uncanny-automator' ), 'tokenType' => 'text', 'tokenIdentifier' => 'PPFL_FOLLOWING', ), array( 'tokenId' => 'FL_PROFILEURL', 'tokenName' => __( 'PeepSo member profile URL', 'uncanny-automator' ), 'tokenType' => 'text', 'tokenIdentifier' => 'PPFL_PROFILEURL', ), array( 'tokenId' => 'FL_EMAIL', 'tokenName' => __( 'PeepSo member email', 'uncanny-automator' ), 'tokenType' => 'text', 'tokenIdentifier' => 'PPFL_EMAIL', ), array( 'tokenId' => 'FL_ABOUTME', 'tokenName' => __( 'PeepSo member bio', 'uncanny-automator' ), 'tokenType' => 'text', 'tokenIdentifier' => 'PPFL_ABOUTME', ), array( 'tokenId' => 'FL_WEBSITE', 'tokenName' => __( 'PeepSo member website address', 'uncanny-automator' ), 'tokenType' => 'text', 'tokenIdentifier' => 'PPFL_WEBSITE', ), array( 'tokenId' => 'FL_ROLE', 'tokenName' => __( 'PeepSo member PeepSo role', 'uncanny-automator' ), 'tokenType' => 'text', 'tokenIdentifier' => 'PPFL_ROLE', ), array( 'tokenId' => 'USR_AVATARURL', 'tokenName' => __( 'User avatar URL', 'uncanny-automator' ), 'tokenType' => 'text', 'tokenIdentifier' => 'PPUSERAVATARURL', ), array( 'tokenId' => 'USR_GENDER', 'tokenName' => __( 'User gender', 'uncanny-automator' ), 'tokenType' => 'text', 'tokenIdentifier' => 'PPUSR_GENDER', ), array( 'tokenId' => 'USR_BIRTHDATE', 'tokenName' => __( 'User birthdate', 'uncanny-automator' ), 'tokenType' => 'text', 'tokenIdentifier' => 'PPUSR_BIRTHDATE', ), array( 'tokenId' => 'USR_FOLLOWERS', 'tokenName' => __( 'User total number of followers', 'uncanny-automator' ), 'tokenType' => 'text', 'tokenIdentifier' => 'PPUSR_FOLLOWERS', ), array( 'tokenId' => 'USR_FOLLOWING', 'tokenName' => __( 'User total following count of followers', 'uncanny-automator' ), 'tokenType' => 'text', 'tokenIdentifier' => 'PPUSR_FOLLOWING', ), array( 'tokenId' => 'USR_PROFILEURL', 'tokenName' => __( 'User profile URL', 'uncanny-automator' ), 'tokenType' => 'text', 'tokenIdentifier' => 'PPUSR_PROFILEURL', ), array( 'tokenId' => 'USR_ABOUTME', 'tokenName' => __( 'User bio', 'uncanny-automator' ), 'tokenType' => 'text', 'tokenIdentifier' => 'PPUSR_ABOUTME', ), array( 'tokenId' => 'USR_WEBSITE', 'tokenName' => __( 'User website address', 'uncanny-automator' ), 'tokenType' => 'text', 'tokenIdentifier' => 'PPUSR_WEBSITE', ), array( 'tokenId' => 'USR_USERROLE', 'tokenName' => __( 'User PeepSo role', 'uncanny-automator' ), 'tokenType' => 'text', 'tokenIdentifier' => 'PPUSR_USERROLE', ), ); $tokens = array_merge( $tokens, $fields ); } if ( isset( $args['triggers_meta']['code'] ) && 'PPUSERUPDATESPECIFICFIELD' === $args['triggers_meta']['code'] ) { $fields = array( array( 'tokenId' => 'PPFIELD_NAME', 'tokenName' => __( 'Updated field name', 'uncanny-automator' ), 'tokenType' => 'text', 'tokenIdentifier' => 'PPFIELD_NAME', ), array( 'tokenId' => 'PPFIELD_VALUE', 'tokenName' => __( 'Updated field value', 'uncanny-automator' ), 'tokenType' => 'text', 'tokenIdentifier' => 'PPFIELD_VALUE', ), array( 'tokenId' => 'USR_AVATARURL', 'tokenName' => __( 'User avatar URL', 'uncanny-automator' ), 'tokenType' => 'text', 'tokenIdentifier' => 'PPUSERAVATARURL', ), array( 'tokenId' => 'USR_GENDER', 'tokenName' => __( 'User gender', 'uncanny-automator' ), 'tokenType' => 'text', 'tokenIdentifier' => 'PPUSR_GENDER', ), array( 'tokenId' => 'USR_BIRTHDATE', 'tokenName' => __( 'User birthdate', 'uncanny-automator' ), 'tokenType' => 'text', 'tokenIdentifier' => 'PPUSR_BIRTHDATE', ), array( 'tokenId' => 'USR_FOLLOWERS', 'tokenName' => __( 'User total number of followers', 'uncanny-automator' ), 'tokenType' => 'text', 'tokenIdentifier' => 'PPUSR_FOLLOWERS', ), array( 'tokenId' => 'USR_FOLLOWING', 'tokenName' => __( 'User total following count of followers', 'uncanny-automator' ), 'tokenType' => 'text', 'tokenIdentifier' => 'PPUSR_FOLLOWING', ), array( 'tokenId' => 'USR_PROFILEURL', 'tokenName' => __( 'User profile URL', 'uncanny-automator' ), 'tokenType' => 'text', 'tokenIdentifier' => 'PPUSR_PROFILEURL', ), array( 'tokenId' => 'USR_ABOUTME', 'tokenName' => __( 'User bio', 'uncanny-automator' ), 'tokenType' => 'text', 'tokenIdentifier' => 'PPUSR_ABOUTME', ), array( 'tokenId' => 'USR_WEBSITE', 'tokenName' => __( 'User website address', 'uncanny-automator' ), 'tokenType' => 'text', 'tokenIdentifier' => 'PPUSR_WEBSITE', ), array( 'tokenId' => 'USR_USERROLE', 'tokenName' => __( 'User PeepSo role', 'uncanny-automator' ), 'tokenType' => 'text', 'tokenIdentifier' => 'PPUSR_USERROLE', ), ); $tokens = array_merge( $tokens, $fields ); } return $tokens; }
Expand full source code Collapse full source code View on Github