Example #1
0
function uaf_update_check()
{
    // MUST CHANGE WITH EVERY VERSION
    $uaf_version_check = get_option('uaf_current_version');
    if ($uaf_version_check != '4.2.2') {
        update_option('uaf_current_version', '4.2.2');
        if ($uaf_version_check < 4.0) {
            uaf_create_folder();
            uaf_move_file_to_newPath();
        }
        uaf_write_css();
    }
}
        $fontUploadFinalStatus = 'error';
        $fontUploadFinalMsg = 'Only ' . join(", ", $allowedFontFormats) . ' format and font less than ' . $allowedFontSize . ' Mb accepted';
    }
}
if (isset($_GET['delete_font_key'])) {
    $fontsRawData = get_option('uaf_font_data');
    $fontsData = json_decode($fontsRawData, true);
    $key_to_delete = $_GET['delete_font_key'];
    @unlink(realpath($uaf_upload_dir . $fontsData[$key_to_delete]['font_path'] . '.woff'));
    @unlink(realpath($uaf_upload_dir . $fontsData[$key_to_delete]['font_path'] . '.eot'));
    unset($fontsData[$key_to_delete]);
    $updateFontData = json_encode($fontsData);
    update_option('uaf_font_data', $updateFontData);
    $fontUploadFinalStatus = 'updated';
    $fontUploadFinalMsg = 'Font Deleted';
    uaf_write_css();
}
?>

<table class="wp-list-table widefat fixed bookmarks">
    <thead>
        <tr>
            <th>Upload Fonts</th>
        </tr>
    </thead>
    <tbody>
    <tr>
        <td>

<?php 
if (!empty($fontUploadFinalMsg)) {