function TS_VCSC_DeleteCustomPack_Ajax()
 {
     $dest = wp_upload_dir();
     $dest_path = $dest['path'];
     $this_year = date('Y');
     $this_month = date('m');
     $the_date_string = $this_year . '/' . $this_month . '/';
     $customFontPackPath = $dest_path . '/ts-vcsc-icons/custom-pack/';
     $newCustomFontPackPath = str_replace($the_date_string, '', $customFontPackPath);
     $fileName = 'ts-vcsc-custom-pack.zip';
     $deleteZip = TS_VCSC_RemoveDirectory($newCustomFontPackPath, false);
     TS_VCSC_RemoveDirectory($newCustomFontPackPath, false);
     TS_VCSC_ResetCustomFont();
     $this->TS_VCSC_tinymceCustomCount = 0;
     $this->TS_VCSC_Icons_Custom = array();
 }
Beispiel #2
0
							jQuery(".fontPackUploadedSuccess").parent("div").after("<div class=error><p>This font package is missing a valid JSON data file and/or style.css file. Please upload only complete font packages created via IcoMoon.</p></div>");
						});
					</script>';
                TS_VCSC_CustomFontImportMessages('warning', 'This font package is missing a valid JSON data file and/or style.css file. Please upload only complete font packages created via IcoMoon.');
            }
        } else {
            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>