/**
 * Delete specific settings preset
 *
 * Include freshly rendered html in response
 *
 * Required _POST params:
 * - shortcode_name string
 * - id int
 *
 * @since 4.7
 */
function vc_action_delete_settings_preset()
{
    vc_include_settings_preset_class();
    vc_user_access()->part('presets')->checkStateAny(true, null)->validateDie();
    // user must have permission to delete presets
    $default = get_post_meta(vc_post_param('id'), '_vc_default', true);
    $status = Vc_Settings_Preset::deleteSettingsPreset(vc_post_param('id'));
    $response = array('success' => $status, 'default' => $default, 'html' => Vc_Settings_Preset::getRenderedSettingsPresetPopup(vc_post_param('shortcode_name')));
    wp_send_json($response);
}
/**
 * Delete specific settings preset
 *
 * Include freshly rendered html in response
 *
 * Required _POST params:
 * - shortcode_name string
 * - id int
 *
 * @since 4.7
 */
function vc_action_delete_settings_preset()
{
    vc_include_settings_preset_class();
    $default = get_post_meta(vc_post_param('id'), '_vc_default', true);
    $status = Vc_Settings_Preset::deleteSettingsPreset(vc_post_param('id'));
    $response = array('success' => $status, 'default' => $default, 'html' => Vc_Settings_Preset::getRenderedSettingsPresetPopup(vc_post_param('shortcode_name')));
    wp_send_json($response);
}