WPF_TOPIC_ADDED_TOKENS::get_form_data_from_trigger_meta( $meta_key,  $trigger_id )


Parameters Parameters

$meta_key

(Required)

$trigger_id

(Required)


Top ↑

Return Return

(mixed|string)


Source Source

File: src/integrations/wpforo/tokens/wpf-topic-added-tokens.php

	public function get_form_data_from_trigger_meta( $meta_key, $trigger_id ) {
		global $wpdb;
		if ( empty( $meta_key ) || empty( $trigger_id ) ) {
			return '';
		}

		$meta_value = $wpdb->get_var( $wpdb->prepare( "SELECT meta_value FROM {$wpdb->prefix}uap_trigger_log_meta WHERE meta_key = %s AND automator_trigger_id = %d ORDER BY ID DESC LIMIT 0,1", $meta_key, $trigger_id ) );

		if ( ! empty( $meta_value ) ) {
			return maybe_unserialize( $meta_value );
		}

		return '';
	}