user_login; $user_email = $user->user_email; $user_id = $user->ID; $abilities = array( 'create-automations' => array( 'label' => __( 'Create New Automations', 'automatorwp' ), 'icon' => 'heart', 'desc' => __( 'I\'m able to create new automations with multiples triggers and actions in the same prompt.', 'automatorwp' ), 'prompts' => automatorwp_ai_assistant_get_random_prompts( 'create-automations' ), ), 'run-actions' => array( 'label' => __( 'Run Actions', 'automatorwp' ), 'icon' => 'controls-play', 'desc' => __( 'I\'m able to execute any action available in AutomatorWP.', 'automatorwp' ) . ' ' . __( 'For points types, I can also define points awards and deductions in the same prompt.', 'automatorwp' ) , 'prompts' => automatorwp_ai_assistant_get_random_prompts( 'run-actions' ), ), 'create-triggers-actions' => array( 'label' => __( 'Set Up Triggers & Actions', 'automatorwp' ), 'icon' => 'admin-tools', 'desc' => __( 'I can configure new triggers an actions for existent automations.', 'automatorwp' ), 'prompts' => automatorwp_ai_assistant_get_random_prompts( 'create-triggers-actions' ), ), ); $first_ability = array_keys( $abilities )[0]; ?>
AI assistant specially designed to help you manage AutomatorWP using natural language.', 'automatorwp' ); ?>

$data ) : ?>

user_login; $user_email = $user->user_email; $user_id = $user->ID; switch ( $plugin ) { case 'GamiPress': case 'LearnDash': case 'LearnPress': case 'LifterLMS': case 'Tutor LMS': case 'H5P': $options = array( sprintf( __( 'Award 10 points to %s', 'automatorwp' ), $user_first ), sprintf( __( 'Award the badge "Sample Badge" to %s', 'automatorwp' ), $user_first ), sprintf( __( 'Award the rank "Sample Rank" to %s', 'automatorwp' ), $user_first ), sprintf( __( 'Enroll %s in course "Sample Course"', 'automatorwp' ), $user_first ), ); break; case 'Easy Digital Downloads': case 'SureCart': case 'WooCommerce': $options = array( sprintf( __( 'Add %1$s to coupon "%2$s"', 'automatorwp' ), $user_first, 'BFCM' . date('Y') ), ); break; case 'BuddyBoss': case 'BuddyPress': $options = array( sprintf( __( 'Add %s to group "Sample Group"', 'automatorwp' ), $user_first ), sprintf( __( 'Set the profile type "Member" to %s', 'automatorwp' ), $user_first ), ); break; case 'WordPress': default: $options = array( sprintf( __( 'Set the role "Contributor" to %s', 'automatorwp' ), $user_first ), sprintf( __( 'Send a congratulations email to %s', 'automatorwp' ), $user_first ), sprintf( __( 'Update %s user meta "approved" to "yes"', 'automatorwp' ), $user_first ), sprintf( __( 'Create a privacy policy page and a link for that page in ShortLinks Pro', 'automatorwp' ), $user_first ), sprintf( __( 'Create an about us page and a link for that page in ShortLinks Pro', 'automatorwp' ), $user_first ), sprintf( __( 'Delete the page "Sample Page"', 'automatorwp' ), $user_first ), sprintf( __( 'Delete the user "Test"', 'automatorwp' ), $user_first ), sprintf( __( 'Delete the user "Test"', 'automatorwp' ), $user_first ), // External sprintf( __( 'Add the tag "New" to %s in ActiveCampaign', 'automatorwp' ), $user_first ), sprintf( __( 'Add %s to Mailchimp', 'automatorwp' ), $user_first ), sprintf( __( 'Publish a post in Bluesky about this site', 'automatorwp' ), $user_first ), ); break; } return $options; } /** * Get a random plugin name * * @since 1.0.0 * * @return string */ function automatorwp_ai_assistant_get_random_plugin() { return automatorwp_assoc_array_rand( automatorwp_ai_assistant_get_available_plugins(), 'WordPress' ); } /** * Get a list of random plugins names * * @since 1.0.0 * * @return string */ function automatorwp_ai_assistant_get_random_plugins( $desired = 3 ) { $available = automatorwp_ai_assistant_get_available_plugins(); if( $desired === 1 ) return automatorwp_ai_assistant_get_random_plugin(); if( count( $available ) < $desired ) return automatorwp_join_words( $available ); $results = array(); for( $i = 0; $i < $desired; $i++ ) { $result = automatorwp_assoc_array_rand( $available, 'WordPress' ); $k = array_search( $result, $available ); unset( $available[$k] ); $results[] = $result; } return automatorwp_join_words( array_unique( $results ) ); } /** * Get available plugins names * * @since 1.0.0 * * @return array */ function automatorwp_ai_assistant_get_available_plugins() { $options = array(); if( class_exists( 'GamiPress' ) ) $options[] = 'GamiPress'; // if( class_exists( 'AutomatorWP' ) ) $options[] = 'AutomatorWP'; if( class_exists( 'ShortLinksPro' ) ) $options[] = 'ShortLinks Pro'; if( class_exists( 'BBForms' ) ) $options[] = 'BBForms'; if( defined( 'BP_PLATFORM_VERSION' ) ) $options[] = 'BuddyBoss'; if( class_exists( 'BuddyPress' ) && ! defined( 'BP_PLATFORM_VERSION' ) ) $options[] = 'BuddyPress'; if( class_exists( 'SFWD_LMS' ) ) $options[] = 'LearnDash'; if( class_exists( 'LearnPress' ) ) $options[] = 'LearnPress'; if( class_exists( 'LifterLMS' ) ) $options[] = 'LifterLMS'; if( function_exists( 'tutor' ) ) $options[] = 'Tutor LMS'; if( class_exists( 'H5P_Plugin' ) ) $options[] = 'H5P'; if( class_exists( 'Easy_Digital_Downloads' ) ) $options[] = 'Easy Digital Downloads'; if( class_exists( 'SureCart' ) ) $options[] = 'SureCart'; if( class_exists( 'WooCommerce' ) ) $options[] = 'WooCommerce'; $options[] = 'WordPress'; return $options; }