Use Any Font - Version 3.0

Version Description

*Major update * Supports more font format now. * Better error handling * Added hyperlink (a tag) in default element select.

Download this release

Release Info

Developer dnesscarkey
Plugin Icon 128x128 Use Any Font
Version 3.0
Comparing to
See all releases

Code changes from version 2.1 to 3.0

css/uaf.css CHANGED
@@ -1,13 +0,0 @@
1
- @font-face {
2
- font-family: 'free Script';
3
- font-style: normal;
4
- src: url(http://localhost/plugin/wp-content/uploads/2013/01/130102031430FREESCPT.eot);
5
- src: local('free Script'), url(http://localhost/plugin/wp-content/uploads/2013/01/130102031430FREESCPT.eot) format('embedded-opentype'), url(http://localhost/plugin/wp-content/uploads/2013/01/130102031430FREESCPT.woff) format('woff');
6
- }
7
- @font-face {
8
- font-family: 'free Script';
9
- font-style: normal;
10
- src: url(http://localhost/plugin/wp-content/uploads/2013/01/130110112355FREESCPT.eot);
11
- src: local('free Script'), url(http://localhost/plugin/wp-content/uploads/2013/01/130110112355FREESCPT.eot) format('embedded-opentype'), url(http://localhost/plugin/wp-content/uploads/2013/01/130110112355FREESCPT.woff) format('woff');
12
- }
13
-
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/uaf_font_implement.php CHANGED
@@ -91,7 +91,8 @@ $fontsData = json_decode($fontsRawData, true);
91
  <input name="elements[]" value="h6" type="checkbox" /> Headline 6 (h6 tags)<br/>
92
  <input name="elements[]" value="p" type="checkbox" /> Paragraphs (p tags)<br/>
93
  <input name="elements[]" value="blockquote" type="checkbox" /> Blockquotes<br/>
94
- <input name="elements[]" value="li" type="checkbox" /> Lists (li tags)
 
95
  </td>
96
  </tr>
97
  <tr>
91
  <input name="elements[]" value="h6" type="checkbox" /> Headline 6 (h6 tags)<br/>
92
  <input name="elements[]" value="p" type="checkbox" /> Paragraphs (p tags)<br/>
93
  <input name="elements[]" value="blockquote" type="checkbox" /> Blockquotes<br/>
94
+ <input name="elements[]" value="li" type="checkbox" /> Lists (li tags)<br/>
95
+ <input name="elements[]" value="a" type="checkbox" /> Hyperlink (a tags)
96
  </td>
97
  </tr>
98
  <tr>
includes/uaf_font_upload.php CHANGED
@@ -5,91 +5,97 @@ if ($_POST['submit-uaf-font']){
5
  $font_file_details = pathinfo($_FILES['font_file']['name']);
6
  $file_extension = strtolower($font_file_details['extension']);
7
  $upload_dir = wp_upload_dir();
8
- //if ($file_extension == 'woff'):
9
- //$newFileName = date('ymdhis').$_FILES['font_file']['name'];
10
- //$newFilePath = $upload_dir['path'].'/'.$newFileName;
11
- //$newFileUrl = $upload_dir['url'].'/'.$newFileName;
12
- //move_uploaded_file($_FILES['font_file']['tmp_name'],$newFilePath);
13
- //else:
14
  $fontNameToStore = date('ymdhis').str_replace(' ','_',$font_file_details['filename']);
15
  $fontNameToStoreWithUrl = $upload_dir['url'].'/'.$fontNameToStore;
16
- //CONVERT TO WOFF
17
- $ch = curl_init();
18
- curl_setopt($ch, CURLOPT_HEADER, 0);
19
- curl_setopt($ch, CURLOPT_VERBOSE, 0);
20
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
21
- curl_setopt($ch, CURLOPT_HTTPHEADER, array("Content-type: multipart/form-data"));
22
- curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (X11; Linux i686; rv:6.0) Gecko/20100101 Firefox/6.0Mozilla/4.0 (compatible;)");
23
- curl_setopt($ch, CURLOPT_URL, 'http://dineshkarki.com.np/font-convertor/woff.php');
24
- curl_setopt($ch, CURLOPT_POST, true);
25
- $post = array(
26
- 'ttffile' => "@".$_FILES['font_file']['tmp_name'],
27
- 'api_key' => $uaf_api_key
28
- );
29
- curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
30
- $response = curl_exec($ch);
31
- if(curl_errno($ch)) {
32
- echo 'Error: ' . curl_error($ch);
33
- exit();
34
- }
35
- else {
36
- $http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
37
- if ($http_code == 200) {
38
- $newFileName = $fontNameToStore.'.woff';
39
- $newFilePath = $upload_dir['path'].'/'.$newFileName;
40
- $fh = fopen($newFilePath, 'w') or die("Can't open file");
41
- fwrite($fh, $response);
42
- fclose($fh);
43
- } else {
44
- echo $response;
45
- exit();
46
- }
47
- }
48
 
49
- //CONVERT TO EOT
 
50
  $ch = curl_init();
51
  curl_setopt($ch, CURLOPT_HEADER, 0);
52
  curl_setopt($ch, CURLOPT_VERBOSE, 0);
53
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
54
  curl_setopt($ch, CURLOPT_HTTPHEADER, array("Content-type: multipart/form-data"));
55
  curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (X11; Linux i686; rv:6.0) Gecko/20100101 Firefox/6.0Mozilla/4.0 (compatible;)");
56
- curl_setopt($ch, CURLOPT_URL, 'http://dineshkarki.com.np/font-convertor/eot.php');
57
  curl_setopt($ch, CURLOPT_POST, true);
58
  $post = array(
59
- 'ttffile' => "@".$_FILES['font_file']['tmp_name'],
60
- 'api_key' => $uaf_api_key
 
61
  );
62
  curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
63
- $response = curl_exec($ch);
64
  if(curl_errno($ch)) {
65
  echo 'Error: ' . curl_error($ch);
66
  exit();
67
  }
68
  else {
69
- $http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
70
- if ($http_code == 200) {
71
- $newFileName = $fontNameToStore.'.eot';
72
- $newFilePath = $upload_dir['path'].'/'.$newFileName;
73
- $fh = fopen($newFilePath, 'w') or die("Can't open file");
74
- fwrite($fh, $response);
75
- fclose($fh);
76
- } else {
77
- echo $response;
78
- exit();
79
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
80
  }
81
- //endif;
82
- $fontsRawData = get_option('uaf_font_data');
83
- $fontsData = json_decode($fontsRawData, true);
84
- if (empty($fontsData)):
85
- $fontsData = array();
 
 
 
86
  endif;
87
 
88
- $fontsData[date('ymdhis')] = array('font_name' => $_POST['font_name'], 'font_path' => $fontNameToStoreWithUrl);
89
- $updateFontData = json_encode($fontsData);
90
- update_option('uaf_font_data',$updateFontData);
91
- uaf_write_css();
92
- $show_msg = 'Font Added';
 
 
 
 
 
 
 
 
 
 
 
 
 
93
  }
94
 
95
  if ($_GET['delete_font_key']):
@@ -101,7 +107,8 @@ if ($_GET['delete_font_key']):
101
  unset($fontsData[$key_to_delete]);
102
  $updateFontData = json_encode($fontsData);
103
  update_option('uaf_font_data',$updateFontData);
104
- $show_msg = 'Font Deleted';
 
105
  uaf_write_css();
106
  endif;
107
  ?>
@@ -116,8 +123,8 @@ endif;
116
  <tr>
117
  <td>
118
 
119
- <?php if (!empty($show_msg)):?>
120
- <div class="updated" id="message"><p><?php echo $show_msg ?></p></div>
121
  <?php endif; ?>
122
 
123
  <?php
@@ -137,7 +144,7 @@ $fontsData = json_decode($fontsRawData, true);
137
  <tr>
138
  <td>Font File</td>
139
  <td><input type="file" name="font_file" value="" class="required" /><br/>
140
- <em>Only ttf format.</em>
141
  </td>
142
  </tr>
143
  <tr>
@@ -190,10 +197,10 @@ $fontsData = json_decode($fontsRawData, true);
190
  jQuery("#open_add_font_form").validate({
191
  rules: {
192
  font_name : {required:true, maxlength:40},
193
- font_file : {required:true, accept:'ttf'}
194
  },
195
  messages:{
196
- font_file : {accept:'Only TTF font format accepted'}
197
  }
198
  });
199
  }
5
  $font_file_details = pathinfo($_FILES['font_file']['name']);
6
  $file_extension = strtolower($font_file_details['extension']);
7
  $upload_dir = wp_upload_dir();
8
+ $fontUploadFinalMsg = '';
9
+ $fontUploadFinalStatus = 'updated';
10
+
 
 
 
11
  $fontNameToStore = date('ymdhis').str_replace(' ','_',$font_file_details['filename']);
12
  $fontNameToStoreWithUrl = $upload_dir['url'].'/'.$fontNameToStore;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
13
 
14
+ // SEND FONT CONERSION REQUEST
15
+ set_time_limit(0);
16
  $ch = curl_init();
17
  curl_setopt($ch, CURLOPT_HEADER, 0);
18
  curl_setopt($ch, CURLOPT_VERBOSE, 0);
19
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
20
  curl_setopt($ch, CURLOPT_HTTPHEADER, array("Content-type: multipart/form-data"));
21
  curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (X11; Linux i686; rv:6.0) Gecko/20100101 Firefox/6.0Mozilla/4.0 (compatible;)");
22
+ curl_setopt($ch, CURLOPT_URL, 'http://dnesscarkey.com/font-convertor/convertor/convert.php');
23
  curl_setopt($ch, CURLOPT_POST, true);
24
  $post = array(
25
+ 'fontfile' => "@".$_FILES['font_file']['tmp_name'],
26
+ 'fontfileext' => pathinfo($_FILES['font_file']['name'], PATHINFO_EXTENSION),
27
+ 'api_key' => $uaf_api_key
28
  );
29
  curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
30
+ $convertResponse = curl_exec($ch);
31
  if(curl_errno($ch)) {
32
  echo 'Error: ' . curl_error($ch);
33
  exit();
34
  }
35
  else {
36
+ $CrulStatinfo = curl_getinfo($ch);
37
+ if ($CrulStatinfo['http_code'] == '200'):
38
+ $convertResponseArray = json_decode($convertResponse, true);
39
+ if ($convertResponseArray['global']['status'] == 'ok'):
40
+ $neededFontFormats = array('woff','eot');
41
+ foreach ($neededFontFormats as $neededFontFormat):
42
+ if ($convertResponseArray[$neededFontFormat]['status'] == 'ok'):
43
+ $fontFileContent = '';
44
+ $fontFileContent = wp_remote_fopen($convertResponseArray[$neededFontFormat]['filename']);
45
+ if (!empty($fontFileContent)):
46
+ $newFileName = $fontNameToStore.'.'.$neededFontFormat;
47
+ $newFilePath = $upload_dir['path'].'/'.$newFileName;
48
+ $fh = fopen($newFilePath, 'w') or die("can't open file. Make sure you have write permission to your upload folder");
49
+ fwrite($fh, $fontFileContent);
50
+ fclose($fh);
51
+ $fontUploadMsg[$neededFontFormat]['status'] = 'ok';
52
+ $fontUploadMsg[$neededFontFormat]['text'] = "Done";
53
+ else:
54
+ $fontUploadMsg[$neededFontFormat]['status'] = 'error';
55
+ $fontUploadMsg[$neededFontFormat]['text'] = "Couldn't receive $neededFontFormat file";
56
+ endif;
57
+ else:
58
+ $fontUploadMsg[$neededFontFormat]['status'] = 'error';
59
+ $fontUploadMsg[$neededFontFormat]['text'] = "Problem converting to $neededFontFormat format";
60
+ endif;
61
+ endforeach;
62
+ else:
63
+ $fontUploadFinalStatus = 'error';
64
+ $fontUploadFinalMsg .= $convertResponseArray['global']['msg'].'<br/>';
65
+ endif;
66
+ else:
67
+ $fontUploadFinalStatus = 'error';
68
+ $fontUploadFinalMsg = $convertResponse;
69
+ endif;
70
  }
71
+
72
+ if (!empty($fontUploadMsg)):
73
+ foreach ($fontUploadMsg as $formatKey => $formatData):
74
+ if ($formatData['status'] == 'error'):
75
+ $fontUploadFinalStatus = 'error';
76
+ $fontUploadFinalMsg .= $formatData['text'].'<br/>';
77
+ endif;
78
+ endforeach;
79
  endif;
80
 
81
+ if ($fontUploadFinalStatus != 'error'):
82
+ $fontUploadFinalMsg = 'Font Uploaded';
83
+ endif;
84
+
85
+ if ($fontUploadFinalStatus != 'error'):
86
+ $fontsRawData = get_option('uaf_font_data');
87
+ $fontsData = json_decode($fontsRawData, true);
88
+ if (empty($fontsData)):
89
+ $fontsData = array();
90
+ endif;
91
+
92
+ $fontsData[date('ymdhis')] = array('font_name' => $_POST['font_name'], 'font_path' => $fontNameToStoreWithUrl);
93
+ $updateFontData = json_encode($fontsData);
94
+ update_option('uaf_font_data',$updateFontData);
95
+ uaf_write_css();
96
+ endif;
97
+
98
+
99
  }
100
 
101
  if ($_GET['delete_font_key']):
107
  unset($fontsData[$key_to_delete]);
108
  $updateFontData = json_encode($fontsData);
109
  update_option('uaf_font_data',$updateFontData);
110
+ $fontUploadFinalStatus = 'updated';
111
+ $fontUploadFinalMsg = 'Font Deleted';
112
  uaf_write_css();
113
  endif;
114
  ?>
123
  <tr>
124
  <td>
125
 
126
+ <?php if (!empty($fontUploadFinalMsg)):?>
127
+ <div class="<?php echo $fontUploadFinalStatus; ?>" id="message"><p><?php echo $fontUploadFinalMsg ?></p></div>
128
  <?php endif; ?>
129
 
130
  <?php
144
  <tr>
145
  <td>Font File</td>
146
  <td><input type="file" name="font_file" value="" class="required" /><br/>
147
+ <em>Accepted Font Format : ttf, otf, eot</em>
148
  </td>
149
  </tr>
150
  <tr>
197
  jQuery("#open_add_font_form").validate({
198
  rules: {
199
  font_name : {required:true, maxlength:40},
200
+ font_file : {required:true, accept:'ttf|otf|eot'}
201
  },
202
  messages:{
203
+ font_file : {accept:'Only ttf,otf,eot font format accepted now.'}
204
  }
205
  });
206
  }
includes/uaf_footer.php CHANGED
@@ -9,7 +9,7 @@ if ($_POST['test_server'] || empty($server_status)){
9
  curl_setopt($ch_test, CURLOPT_RETURNTRANSFER, true);
10
  curl_setopt($ch_test, CURLOPT_HTTPHEADER, array("Content-type: multipart/form-data"));
11
  curl_setopt($ch_test, CURLOPT_USERAGENT, "Mozilla/5.0 (X11; Linux i686; rv:6.0) Gecko/20100101 Firefox/6.0Mozilla/4.0 (compatible;)");
12
- curl_setopt($ch_test, CURLOPT_URL, 'http://dineshkarki.com.np/font-convertor/server/check.php');
13
  curl_setopt($ch_test, CURLOPT_POST, true);
14
  $post = array(
15
  'test_code' => $test_code
@@ -56,7 +56,7 @@ $server_message = get_option('uaf_server_msg');
56
  <tr>
57
  <td>
58
  <ol>
59
- <li>Get API key from <a href="http://dineshkarki.com.np/font-convertor/api/" target="_blank">here</a>. You can offer your contribution from (Free to $100) and get the API key. All API key comes with lifetime validity.<br/>
60
  <em><strong>Note:</strong> API key is needed to connect to our server for font conversion.</em>
61
  </li>
62
 
@@ -117,7 +117,7 @@ $server_message = get_option('uaf_server_msg');
117
  <ul class="uaf_list">
118
  <li><a href="http://dineshkarki.com.np/forums/forum/use-any-fonts" target="_blank">View Support Forum</a></li>
119
  <li><a href="http://dineshkarki.com.np/rectify-my-problem" target="_blank">Rectify My Problem</a></li>
120
-
121
  <li><a href="http://dineshkarki.com.np/contact" target="_blank">Contact Us</a></li>
122
  </ul>
123
  </td>
@@ -135,8 +135,9 @@ $server_message = get_option('uaf_server_msg');
135
  <tr>
136
  <td>
137
  <ul class="uaf_list">
138
- <li><a href="http://wordpress.org/extend/plugins/sms/" target="_blank">SMS</a></li>
139
- <li><a href="http://wordpress.org/extend/plugins/any-mobile-theme-switcher/" target="_blank">Any Mobile Theme Switcher</a></li>
 
140
  <li><a href="http://wordpress.org/extend/plugins/add-tags-and-category-to-page/" target="_blank">Add Tags And Category To Page</a></li>
141
  <li><a href="http://wordpress.org/extend/plugins/block-specific-plugin-updates/" target="_blank">Block Specific Plugin Updates</a></li>
142
  <li><a href="http://wordpress.org/extend/plugins/featured-image-in-rss-feed/" target="_blank">Featured Image In RSS Feed</a></li>
9
  curl_setopt($ch_test, CURLOPT_RETURNTRANSFER, true);
10
  curl_setopt($ch_test, CURLOPT_HTTPHEADER, array("Content-type: multipart/form-data"));
11
  curl_setopt($ch_test, CURLOPT_USERAGENT, "Mozilla/5.0 (X11; Linux i686; rv:6.0) Gecko/20100101 Firefox/6.0Mozilla/4.0 (compatible;)");
12
+ curl_setopt($ch_test, CURLOPT_URL, 'http://dnesscarkey.com/font-convertor/server/check.php');
13
  curl_setopt($ch_test, CURLOPT_POST, true);
14
  $post = array(
15
  'test_code' => $test_code
56
  <tr>
57
  <td>
58
  <ol>
59
+ <li>Get API key from <a href="http://dnesscarkey.com/font-convertor/api/" target="_blank">here</a>. You can offer your contribution from (Free to $100) and get the API key. All API key comes with lifetime validity.<br/>
60
  <em><strong>Note:</strong> API key is needed to connect to our server for font conversion.</em>
61
  </li>
62
 
117
  <ul class="uaf_list">
118
  <li><a href="http://dineshkarki.com.np/forums/forum/use-any-fonts" target="_blank">View Support Forum</a></li>
119
  <li><a href="http://dineshkarki.com.np/rectify-my-problem" target="_blank">Rectify My Problem</a></li>
120
+ <li><a href="http://dineshkarki.com.np/use-any-font/use-any-font-known-issues" target="_blank">Check Known Issues</a></li>
121
  <li><a href="http://dineshkarki.com.np/contact" target="_blank">Contact Us</a></li>
122
  </ul>
123
  </td>
135
  <tr>
136
  <td>
137
  <ul class="uaf_list">
138
+ <li><a href="http://wordpress.org/extend/plugins/any-mobile-theme-switcher/" target="_blank">Any Mobile Theme Switcher</a></li>
139
+ <li><a href="http://wordpress.org/extend/plugins/jquery-validation-for-contact-form-7/" target="_blank">Jquery Validation For Contact Form 7</a></li>
140
+ <li><a href="http://wordpress.org/extend/plugins/sms/" target="_blank">SMS</a></li>
141
  <li><a href="http://wordpress.org/extend/plugins/add-tags-and-category-to-page/" target="_blank">Add Tags And Category To Page</a></li>
142
  <li><a href="http://wordpress.org/extend/plugins/block-specific-plugin-updates/" target="_blank">Block Specific Plugin Updates</a></li>
143
  <li><a href="http://wordpress.org/extend/plugins/featured-image-in-rss-feed/" target="_blank">Featured Image In RSS Feed</a></li>
includes/uaf_header.php CHANGED
@@ -1,6 +1,6 @@
1
  <?php
2
  if ($_POST['ucf_api_key_submit']){
3
- $api_key_return = wp_remote_fopen('http://dineshkarki.com.np/font-convertor/api/validate_key.php?license_key='.$_POST['uaf_api_key']);
4
  $api_key_return = json_decode($api_key_return);
5
  if (!empty($api_key_return)){
6
  if ($api_key_return->status == 'success'){
@@ -44,7 +44,7 @@ $uaf_api_key = get_option('uaf_api_key');
44
  <input name="uaf_api_key" type="text" style="width:350px; margin-left:50px;" />
45
  <input type="submit" name="ucf_api_key_submit" class="button-primary" value="Verify" style="padding:2px;" />
46
  <br/> <br/>
47
- Please keep the API key to start using this plugin. Offer your contribution (Free to $100) and get the API key from <a href="http://dineshkarki.com.np/font-convertor/api/" target="_blank">here</a>.<br/>
48
  <?php else: ?>
49
  <span class="active_key"><?php echo $uaf_api_key; ?>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - Active</span> <input type="submit" name="ucf_api_key_remove" class="button-primary" value="Remove Key" style="padding:2px; margin-left:20px;" onclick="if(!confirm('Are you sure ?')){return false;}" />
50
  <?php endif;?>
1
  <?php
2
  if ($_POST['ucf_api_key_submit']){
3
+ $api_key_return = wp_remote_fopen('http://dnesscarkey.com/font-convertor/api/validate_key.php?license_key='.$_POST['uaf_api_key']);
4
  $api_key_return = json_decode($api_key_return);
5
  if (!empty($api_key_return)){
6
  if ($api_key_return->status == 'success'){
44
  <input name="uaf_api_key" type="text" style="width:350px; margin-left:50px;" />
45
  <input type="submit" name="ucf_api_key_submit" class="button-primary" value="Verify" style="padding:2px;" />
46
  <br/> <br/>
47
+ Please keep the API key to start using this plugin. Offer your contribution (Free to $100) and get the API key from <a href="http://dnesscarkey.com/font-convertor/api/" target="_blank">here</a>.<br/>
48
  <?php else: ?>
49
  <span class="active_key"><?php echo $uaf_api_key; ?>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - Active</span> <input type="submit" name="ucf_api_key_remove" class="button-primary" value="Remove Key" style="padding:2px; margin-left:20px;" onclick="if(!confirm('Are you sure ?')){return false;}" />
50
  <?php endif;?>
plugin_interface.php CHANGED
@@ -3,6 +3,7 @@ add_action('admin_menu', 'uaf_create_menu');
3
  add_action("admin_print_scripts", 'adminjslibs');
4
  add_action("admin_print_styles", 'adminCsslibs');
5
  add_action('wp_enqueue_scripts', 'uaf_client_css');
 
6
 
7
  function uaf_client_css() {
8
  wp_register_style( 'uaf_client_css', plugins_url('use-any-font/css/uaf.css'));
@@ -27,6 +28,14 @@ function uaf_activate(){
27
  uaf_write_css(); //rewrite css when plugin is activated after update or somethingelse......
28
  }
29
 
 
 
 
 
 
 
 
 
30
  function uaf_settings_page() {
31
  include('includes/uaf_header.php');
32
  include('includes/uaf_font_upload.php');
3
  add_action("admin_print_scripts", 'adminjslibs');
4
  add_action("admin_print_styles", 'adminCsslibs');
5
  add_action('wp_enqueue_scripts', 'uaf_client_css');
6
+ add_action('plugins_loaded', 'uaf_update_check');
7
 
8
  function uaf_client_css() {
9
  wp_register_style( 'uaf_client_css', plugins_url('use-any-font/css/uaf.css'));
28
  uaf_write_css(); //rewrite css when plugin is activated after update or somethingelse......
29
  }
30
 
31
+ function uaf_update_check() { // MUST CHANGE WITH EVERY VERSION
32
+ $uaf_version_check = get_option('uaf_current_version');
33
+ if ($uaf_version_check != '3.0'):
34
+ update_option('uaf_current_version', '3.0');
35
+ uaf_write_css();
36
+ endif;
37
+ }
38
+
39
  function uaf_settings_page() {
40
  include('includes/uaf_header.php');
41
  include('includes/uaf_font_upload.php');
readme.txt CHANGED
@@ -1,9 +1,9 @@
1
  === Use Any Font ===
2
  Contributors: dnesscarkey
3
- Tags: use any font, any font, embed any font, font embed
4
  Requires at least: 3.0
5
  Tested up to: 3.5.1
6
- Stable tag: 2.1
7
 
8
  Embed any font in your website
9
 
@@ -18,7 +18,9 @@ Features
18
 
19
  * Quick and easy to setup. No css or any rocket science knowledge needed.
20
  * Support all major browsers including IE 6+, Firefox, Chrome, Safari, IOS, Andriod, Opera and more.
21
- * Font conversion within the plugin interface. You just need to upload ttf font, other required font types are generated automatically.
 
 
22
  * Multiple fonts can be used.
23
  * Faster load time as your fonts are stored on your own server.
24
  * Quick font assign interface. You can select pre defined html tags or assign it to custom css.
@@ -27,7 +29,7 @@ Features
27
 
28
  You need API key to connect to our server for font conversion. Our server converts your font and sends it back.
29
 
30
- Offer your contribution (Free to $100) and get the API key from <a href="http://dineshkarki.com.np/font-convertor/api/" target="_blank">here</a>.
31
 
32
  Note : We don't store your fonts in our server neither any of your information except the API key details. Our server deletes the temporary file after the conversion is done.
33
 
@@ -49,7 +51,16 @@ Ya, it works with multiple fonts.
49
 
50
  = Do i need to manually convert fonts ? =
51
 
52
- No, you don't need to do it yourself. Just upload your font in tff font format, and the plugin does the rest.
 
 
 
 
 
 
 
 
 
53
 
54
  == Screenshots ==
55
 
@@ -57,6 +68,12 @@ No, you don't need to do it yourself. Just upload your font in tff font format,
57
 
58
  == Changelog ==
59
 
 
 
 
 
 
 
60
  = 2.1 =
61
  * Added file upload validation.
62
 
1
  === Use Any Font ===
2
  Contributors: dnesscarkey
3
+ Tags: use any font, any font, embed any font, font embed, font uploader, css font embed, @font-face embed, font conversion
4
  Requires at least: 3.0
5
  Tested up to: 3.5.1
6
+ Stable tag: 3.0
7
 
8
  Embed any font in your website
9
 
18
 
19
  * Quick and easy to setup. No css or any rocket science knowledge needed.
20
  * Support all major browsers including IE 6+, Firefox, Chrome, Safari, IOS, Andriod, Opera and more.
21
+ * Font conversion within the plugin interface font uploader.
22
+ * Supports font format including ttf, otf, eot (Upgrading more). The required font are converted automatically.
23
+ * Embed fonts using @font-face css. SEO friendly and quick loading.
24
  * Multiple fonts can be used.
25
  * Faster load time as your fonts are stored on your own server.
26
  * Quick font assign interface. You can select pre defined html tags or assign it to custom css.
29
 
30
  You need API key to connect to our server for font conversion. Our server converts your font and sends it back.
31
 
32
+ Offer your contribution (Free to $100) and get the API key from <a href="http://dnesscarkey.com/font-convertor/api/" target="_blank">here</a>.
33
 
34
  Note : We don't store your fonts in our server neither any of your information except the API key details. Our server deletes the temporary file after the conversion is done.
35
 
51
 
52
  = Do i need to manually convert fonts ? =
53
 
54
+ No, you don't need to do it yourself. Just upload your font(supports most of the font format), and the plugin does the rest.
55
+
56
+ = I moved my server path and the font is not working now. Why ? =
57
+
58
+ The plugin is still searching font from your old path. You can delete your old uploaded font and re-upload and re-assign it.
59
+
60
+ = Not working for me. What can i do ? =
61
+
62
+ You can check our <a href="http://dineshkarki.com.np/forums/forum/use-any-fonts" target="_blank">support forum</a>, or check <a href="http://dineshkarki.com.np/use-any-font/use-any-font-known-issues" target="_blank">known issues</a> or ask to <a href="http://dineshkarki.com.np/rectify-my-problem" target="_blank">Rectify Your Problem</a>
63
+
64
 
65
  == Screenshots ==
66
 
68
 
69
  == Changelog ==
70
 
71
+ = 3.0 =
72
+ *Major update
73
+ * Supports more font format now.
74
+ * Better error handling
75
+ * Added hyperlink (a tag) in default element select.
76
+
77
  = 2.1 =
78
  * Added file upload validation.
79
 
use-any-font.php CHANGED
@@ -4,7 +4,7 @@ Plugin Name: Use Any Font
4
  Plugin URI: http://dineshkarki.com.np/use-any-font
5
  Description: Embed any font in your website
6
  Author: Dinesh Karki
7
- Version: 2.1
8
  Author URI: http://www.dineshkarki.com.np
9
  */
10
 
4
  Plugin URI: http://dineshkarki.com.np/use-any-font
5
  Description: Embed any font in your website
6
  Author: Dinesh Karki
7
+ Version: 3.0
8
  Author URI: http://www.dineshkarki.com.np
9
  */
10