/** * Delete Font Control Instance - Ajax Function * * Checks WordPress nonce and upon successful validation * it deletes the font control instance from the database. * * @since 1.0 * @version 1.1.1 * */ public function delete_control_instance() { // Check admin nonce for security check_ajax_referer('tt_font_delete_control_instance', 'tt_font_delete_control_instance_nonce'); // Make sure user has the required access level if (!current_user_can('edit_theme_options')) { wp_die(-1); } if (isset($_POST['controlId'])) { EGF_Posttype::delete_font_control($_POST['controlId']); } wp_die(); }