/**
 * Unmark current default preset as default
 *
 * Include freshly rendered html in response
 *
 * Required _POST params:
 * - shortcode_name string
 *
 * @since 4.7
 */
function vc_action_restore_default_settings_preset()
{
    vc_include_settings_preset_class();
    $shortcode_name = vc_post_param('shortcode_name');
    $status = Vc_Settings_Preset::setAsDefaultSettingsPreset(null, $shortcode_name);
    $response = array('success' => $status, 'html' => Vc_Settings_Preset::getRenderedSettingsPresetPopup($shortcode_name));
    wp_send_json($response);
}
/**
 * Unmark current default preset as default
 *
 * Include freshly rendered html in response
 *
 * Required _POST params:
 * - shortcode_name string
 *
 * @since 4.7
 */
function vc_action_restore_default_settings_preset()
{
    vc_include_settings_preset_class();
    vc_user_access()->part('presets')->checkStateAny(true, null)->validateDie();
    // user must have permission to restore presets
    $shortcode_name = vc_post_param('shortcode_name');
    $status = Vc_Settings_Preset::setAsDefaultSettingsPreset(null, $shortcode_name);
    $response = array('success' => $status, 'html' => Vc_Settings_Preset::getRenderedSettingsPresetPopup($shortcode_name));
    wp_send_json($response);
}