HEX
Server: Apache
System: Linux sg2plzcpnl508499.prod.sin2.secureserver.net 4.18.0-553.83.1.lve.el8.x86_64 #1 SMP Wed Nov 12 10:04:12 UTC 2025 x86_64
User: s76vzjg2kvav (10209820)
PHP: 8.4.18
Disabled: NONE
Upload Files
File: /home/s76vzjg2kvav/public_html/wp-content/plugins/forminator/library/mixpanel/class-feedback.php
<?php
/**
 * The Forminator_Mixpanel_Feedback class.
 *
 * @package Forminator
 */

/**
 * Mixpanel Feedback Events class
 */
class Forminator_Mixpanel_Feedback extends Events {

	/**
	 * Initialize class.
	 *
	 * @since 1.49.0
	 */
	public static function init() {
		add_action( 'forminator_share_feedback_to_mixpanel', array( __CLASS__, 'share_feedback' ), 10, 2 );
	}

	/**
	 * Share Feedback
	 *
	 * @param integer $rating Rating.
	 * @param string  $message Message.
	 *
	 * @return void
	 * @since 1.49.0
	 */
	public static function share_feedback( $rating, $message = '' ) {
		self::track_event(
			'for_feedback_survey',
			array(
				'Survey Topic' => 'Form editor phase one',
				'rating'       => $rating,
				'message'      => ! empty( $message ) ? self::limit_text( $message ) : '',
			)
		);
	}
}