Ejemplo n.º 1
0
                $encode_options = json_decode($encode_options, true);
                //var_dump($encode_options);
                if (array_key_exists('settings', $encode_options) && array_key_exists('plugin', $encode_options) && array_key_exists('version', $encode_options)) {
                    if ($encode_options['plugin'] == 'Composium - Visual Composer Extensions') {
                        foreach ($encode_options['settings'] as $key => $value) {
                            update_option($key, $value);
                        }
                        TS_VCSC_CustomFontImportMessages('success', 'All settings for "Composium - Visual Composer Extensions" have been successfully imported and restored.');
                    } else {
                        TS_VCSC_CustomFontImportMessages('warning', 'The file you are using does not seem to be a valid setting file for "Composium - Visual Composer Extensions&quot. Please try a different file.');
                    }
                } else {
                    TS_VCSC_CustomFontImportMessages('warning', 'The file you are using does not seem to be a valid setting file for "Composium - Visual Composer Extensions&quot. Please try a different file.');
                }
            } else {
                TS_VCSC_CustomFontImportMessages('warning', 'The file you are trying to upload is not a .json file. Please try again.');
            }
        }
    }
}
$TS_VCSC_Export_Options = array();
// Retrieve Saved or Default Settings
// ----------------------------------
$ts_vcsc_extend_settings_tinymceIcon = get_option('ts_vcsc_extend_settings_tinymceIcon', 1);
$TS_VCSC_Export_Options['ts_vcsc_extend_settings_tinymceIcon'] = $ts_vcsc_extend_settings_tinymceIcon;
$ts_vcsc_extend_settings_loadForcable = get_option('ts_vcsc_extend_settings_loadForcable', 0);
$TS_VCSC_Export_Options['ts_vcsc_extend_settings_loadForcable'] = $ts_vcsc_extend_settings_loadForcable;
$ts_vcsc_extend_settings_loadLightbox = get_option('ts_vcsc_extend_settings_loadLightbox', 0);
$TS_VCSC_Export_Options['ts_vcsc_extend_settings_loadLightbox'] = $ts_vcsc_extend_settings_loadLightbox;
$ts_vcsc_extend_settings_loadFonts = get_option('ts_vcsc_extend_settings_loadFonts', 0);
$TS_VCSC_Export_Options['ts_vcsc_extend_settings_loadFonts'] = $ts_vcsc_extend_settings_loadFonts;
Ejemplo n.º 2
0
            TS_VCSC_ResetCustomFont();
            echo '<script>
					jQuery(document).ready(function() {
						jQuery(".fontPackUploadedSuccess").parent("div").after("<div class=error><p>There was a problem while unzipping the custom font package file.</p></div>");
					});
				</script>';
            TS_VCSC_CustomFontImportMessages('warning', 'There was a problem while unzipping the custom font package file.');
        }
    } else {
        TS_VCSC_ResetCustomFont();
        echo '<script>
				jQuery(document).ready(function() {
					jQuery(".ts-vcsc-custom-pack-buttons").after("<div class=error><p class=fontPackUploadedError>There was a problem while uploading the custom font package file.</p></div>");
				});
			</script>';
        TS_VCSC_CustomFontImportMessages('warning', 'There was a problem while uploading the custom font package.');
    }
}
?>
	<div class="ts-vcsc-settings-group-header">
		<div class="display_header">
			<h2><span class="dashicons dashicons-upload"></span>Visual Composer Extensions - Custom Icon Font Upload</h2>
		</div>
		<div class="clear"></div>
	</div>
	<div class="ts-vcsc-custom-upload-wrap wrap" style="margin-top: 0px;">
	<div class="ts-vcsc-section-main">
		<div class="ts-vcsc-section-title ts-vcsc-section-show"><i class="dashicons-info"></i>General Information</div>
		<div class="ts-vcsc-section-content">
			<a class="button-secondary" style="width: 200px; margin: 15px auto 10px auto; text-align: center;" href="<?php 
echo $VISUAL_COMPOSER_EXTENSIONS->settingsLink;