query($wpdb->prepare("DELETE FROM {$style_table} WHERE id = %d", $id)); } } if (!empty($_POST['duplicate']) && isset($_POST['id']) && is_numeric($_POST['id'])) { $nonce = $_REQUEST['_wpnonce']; if (!wp_verify_nonce($nonce, 'afaq_nonce_field_duplicate')) { die('You do not have sufficient permissions to access this page.'); } else { $id = (int) $_POST['id']; $selectedData = $wpdb->get_row($wpdb->prepare("SELECT * FROM $style_table WHERE id = %d ", $id), ARRAY_A); $dupList = array( $selectedData['name'], $selectedData['style_name'], $selectedData['css'], $selectedData['templateids'], $selectedData['categoryids']); $s = $wpdb->query($wpdb->prepare("INSERT INTO {$style_table} (name, style_name, css, templateids, categoryids) VALUES ( %s, %s, %s, %s, %s )", $dupList)); } } ?>

FAQ for Elementor

get_results('SELECT * FROM ' . $style_table . ' ORDER BY id DESC', ARRAY_A); foreach ($data as $value) { $id = $value['id']; $temp = substr($value['style_name'], -2); if ($temp <= 10) { $temp = "01-10"; } else if ($temp <= 20) { $temp = "11-20"; } else if ($temp <= 30) { $temp = "21-30"; } else if ($temp <= 40) { $temp = "31-40"; } else if ($temp <= 50) { $temp = "41-50"; } else if ($temp <= 60) { $temp = "51-60"; } $style_name = explode("-", $value['style_name']); echo ''; echo ''; echo ''; echo ''; echo ' '; } ?>
Team Name Template Shortcode Edit Delete
' . $value['name'] . '' . ucfirst($style_name[0]) . " " . (int) $style_name[1] . 'Shortcode '; echo '
' . wp_nonce_field("afaq_nonce_field_duplicate") . '
' . wp_nonce_field("tss_nonce_field_delete") . '