function get_published_entries_table() {
global $wpdb;
// Store prefix separately to avoid direct "->" usage
$prefix = $wpdb->prefix;
$table_name = $prefix . 'fusion_forms_entries';
// Fetch entries where consent was given
// $query = $wpdb->prepare("SELECT * FROM $table_name WHERE form_id = 1704 AND consent_field = %s", 'I consent to publication of my membership details to other members of //JAR-Association (optional)');
$query = $wpdb->prepare("SELECT * FROM $table_name WHERE form_id = 1704 );
$results = $wpdb->get_results($query);
if (!$results) {
return "';
$output .= '
";
return $output;
}
// Register shortcode for use in Avada pages
add_shortcode('published_entries_table', 'get_published_entries_table');
No records available for publication.
"; } // Start the table using Avada's "fusion-table" class for styling $output = 'Name | |
---|---|
" . esc_html($entry->name) . " | "; $output .= "" . esc_html($entry->email) . " | "; $output .= "