Version Description
- Fixed font not loading issue when there is space in font file name.
- Added Instructions in Plugin Interface.
Download this release
Release Info
Developer | dnesscarkey |
Plugin | Use Any Font |
Version | 1.1 |
Comparing to | |
See all releases |
Code changes from version 1.0 to 1.1
- includes/uaf_font_upload.php +11 -9
- includes/uaf_footer.php +30 -4
- includes/uaf_header.php +11 -3
- readme.txt +12 -5
- use-any-font.php +1 -1
includes/uaf_font_upload.php
CHANGED
@@ -5,13 +5,13 @@ 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 |
-
|
10 |
-
|
11 |
-
|
12 |
-
move_uploaded_file($_FILES['font_file']['tmp_name'],$newFilePath);
|
13 |
-
else:
|
14 |
-
$fontNameToStore = date('ymdhis')
|
15 |
$fontNameToStoreWithUrl = $upload_dir['url'].'/'.$fontNameToStore;
|
16 |
//CONVERT TO WOFF
|
17 |
$ch = curl_init();
|
@@ -78,7 +78,7 @@ if ($_POST['submit-uaf-font']){
|
|
78 |
exit();
|
79 |
}
|
80 |
}
|
81 |
-
endif;
|
82 |
$fontsRawData = get_option('uaf_font_data');
|
83 |
$fontsData = json_decode($fontsRawData, true);
|
84 |
if (empty($fontsData)):
|
@@ -136,7 +136,9 @@ $fontsData = json_decode($fontsRawData, true);
|
|
136 |
</tr>
|
137 |
<tr>
|
138 |
<td>Font File</td>
|
139 |
-
<td><input type="file" name="font_file" value="" class="required"
|
|
|
|
|
140 |
</tr>
|
141 |
<tr>
|
142 |
<td>
|
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();
|
78 |
exit();
|
79 |
}
|
80 |
}
|
81 |
+
//endif;
|
82 |
$fontsRawData = get_option('uaf_font_data');
|
83 |
$fontsData = json_decode($fontsRawData, true);
|
84 |
if (empty($fontsData)):
|
136 |
</tr>
|
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>
|
144 |
<td>
|
includes/uaf_footer.php
CHANGED
@@ -1,3 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
</td>
|
2 |
<td width="15"> </td>
|
3 |
<td width="250" valign="top">
|
@@ -44,16 +73,13 @@
|
|
44 |
</thead>
|
45 |
<tbody>
|
46 |
<tr>
|
47 |
-
<td><iframe src="//www.facebook.com/plugins/likebox.php?href=https%3A%2F%2Fwww.facebook.com%2Fpages%2FDnessCarKey%2F77553779916&width=185&height=258&show_faces=true&colorscheme=light&stream=false&border_color=%23f9f9f9&header=false&appId=215419415167468" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:240px; height:
|
48 |
</td>
|
49 |
</tr>
|
50 |
</tbody>
|
51 |
</table>
|
52 |
<br/>
|
53 |
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
</td>
|
58 |
</tr>
|
59 |
</table>
|
1 |
+
<br/>
|
2 |
+
<table class="wp-list-table widefat fixed bookmarks">
|
3 |
+
<thead>
|
4 |
+
<tr>
|
5 |
+
<th>Instruction</th>
|
6 |
+
</tr>
|
7 |
+
</thead>
|
8 |
+
<tbody>
|
9 |
+
<tr>
|
10 |
+
<td>
|
11 |
+
<ol>
|
12 |
+
<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/>
|
13 |
+
<em><strong>Note:</strong> API key is needed to connect to our server for font conversion.</em>
|
14 |
+
</li>
|
15 |
+
|
16 |
+
<li>Upload your font in ttf format from <strong>Upload Fonts</strong> section. The required font format will be converted automatically by the plugin and stores in your server.
|
17 |
+
<em><strong>Note:</strong> We don't store any font in our server. We delete the temporary files after conversion has been done.</em>
|
18 |
+
</li>
|
19 |
+
|
20 |
+
<li>Assign your font to you html elements from <strong>Assign Font</strong> section.</li>
|
21 |
+
|
22 |
+
<li>You are ready now. If you still have any problem visit our <a href="http://dineshkarki.com.np/forums/forum/use-any-fonts" target="_blank">support forum</a> or you can write to us directly using our contact form.</li>
|
23 |
+
|
24 |
+
</ol>
|
25 |
+
</td>
|
26 |
+
</tr>
|
27 |
+
</tbody>
|
28 |
+
</table>
|
29 |
+
|
30 |
</td>
|
31 |
<td width="15"> </td>
|
32 |
<td width="250" valign="top">
|
73 |
</thead>
|
74 |
<tbody>
|
75 |
<tr>
|
76 |
+
<td><iframe src="//www.facebook.com/plugins/likebox.php?href=https%3A%2F%2Fwww.facebook.com%2Fpages%2FDnessCarKey%2F77553779916&width=185&height=258&show_faces=true&colorscheme=light&stream=false&border_color=%23f9f9f9&header=false&appId=215419415167468" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:240px; height:258px;" allowTransparency="true"></iframe>
|
77 |
</td>
|
78 |
</tr>
|
79 |
</tbody>
|
80 |
</table>
|
81 |
<br/>
|
82 |
|
|
|
|
|
|
|
83 |
</td>
|
84 |
</tr>
|
85 |
</table>
|
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/
|
4 |
$api_key_return = json_decode($api_key_return);
|
5 |
if (!empty($api_key_return)){
|
6 |
if ($api_key_return->status == 'success'){
|
@@ -11,6 +11,14 @@ if ($_POST['ucf_api_key_submit']){
|
|
11 |
$api_message = 'Sorry there was an error. Please try again.';
|
12 |
}
|
13 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
$uaf_api_key = get_option('uaf_api_key');
|
15 |
?>
|
16 |
<?php if (!empty($api_message)):?>
|
@@ -36,9 +44,9 @@ $uaf_api_key = get_option('uaf_api_key');
|
|
36 |
<input name="uaf_api_key" type="text" style="width:350px; margin-left:50px;" />
|
37 |
<input type="submit" name="ucf_api_key_submit" class="button-primary" value="Verify" style="padding:2px;" />
|
38 |
<br/> <br/>
|
39 |
-
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/
|
40 |
<?php else: ?>
|
41 |
-
<span class="active_key"><?php echo $uaf_api_key; ?> - Active</span>
|
42 |
<?php endif;?>
|
43 |
</form>
|
44 |
<br/>
|
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'){
|
11 |
$api_message = 'Sorry there was an error. Please try again.';
|
12 |
}
|
13 |
}
|
14 |
+
|
15 |
+
if ($_POST['ucf_api_key_remove']){
|
16 |
+
delete_option('uaf_api_key');
|
17 |
+
$api_message = 'Your Activation key has been removed';
|
18 |
+
}
|
19 |
+
|
20 |
+
|
21 |
+
|
22 |
$uaf_api_key = get_option('uaf_api_key');
|
23 |
?>
|
24 |
<?php if (!empty($api_message)):?>
|
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; ?> - 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;?>
|
51 |
</form>
|
52 |
<br/>
|
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.
|
6 |
-
Stable tag: 1.
|
7 |
|
8 |
Embed any font in your website
|
9 |
|
@@ -12,6 +12,8 @@ Use any font you wish and give your site a elegant look. No css knowledge requir
|
|
12 |
|
13 |
Click <a href="http://dineshkarki.com.np/use-any-font/demo" target="_blank">here</a> for Use Any Font working demo.
|
14 |
|
|
|
|
|
15 |
Features
|
16 |
|
17 |
* Quick and easy to setup. No css or any rocket science knowledge needed.
|
@@ -24,7 +26,7 @@ Features
|
|
24 |
|
25 |
You need API key to connect to our server for font conversion. Our server converts your font and sends it back.
|
26 |
|
27 |
-
Offer your contribution (Free to $100) and get the API key from <a href="http://dineshkarki.com.np/
|
28 |
|
29 |
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.
|
30 |
|
@@ -32,6 +34,7 @@ Note : We don't store your fonts in our server neither any of your information e
|
|
32 |
|
33 |
1. Upload the plugin use-any-font files to the `/wp-content/plugins/` directory
|
34 |
1. Activate the use-any-font plugin through the 'Plugins' menu in WordPress.
|
|
|
35 |
1. Select Use Any Font under Settings
|
36 |
1. Upload your font.
|
37 |
1. Assign your font to element.
|
@@ -53,5 +56,9 @@ No, you don't need to do it yourself. Just upload your font in tff font format,
|
|
53 |
|
54 |
== Changelog ==
|
55 |
|
|
|
|
|
|
|
|
|
56 |
= 1.0 =
|
57 |
-
First Release
|
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
|
6 |
+
Stable tag: 1.1
|
7 |
|
8 |
Embed any font in your website
|
9 |
|
12 |
|
13 |
Click <a href="http://dineshkarki.com.np/use-any-font/demo" target="_blank">here</a> for Use Any Font working demo.
|
14 |
|
15 |
+
Use Any Font gives you freedom to use any font in your website. It is not like other font embed services which gives you countable number of fonts to select from neither the one that stores your font in remote server. You can use any font if you have its ttf font format without being dependent to other's server uptime.
|
16 |
+
|
17 |
Features
|
18 |
|
19 |
* Quick and easy to setup. No css or any rocket science knowledge needed.
|
26 |
|
27 |
You need API key to connect to our server for font conversion. Our server converts your font and sends it back.
|
28 |
|
29 |
+
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>.
|
30 |
|
31 |
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.
|
32 |
|
34 |
|
35 |
1. Upload the plugin use-any-font files to the `/wp-content/plugins/` directory
|
36 |
1. Activate the use-any-font plugin through the 'Plugins' menu in WordPress.
|
37 |
+
1. Get the API key and verify it (Needed to connect to server for font conversion).
|
38 |
1. Select Use Any Font under Settings
|
39 |
1. Upload your font.
|
40 |
1. Assign your font to element.
|
56 |
|
57 |
== Changelog ==
|
58 |
|
59 |
+
= 1.1 =
|
60 |
+
* Fixed font not loading issue when there is space in font file name.
|
61 |
+
* Added Instructions in Plugin Interface.
|
62 |
+
|
63 |
= 1.0 =
|
64 |
+
* First Release
|
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: 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: 1.1
|
8 |
Author URI: http://www.dineshkarki.com.np
|
9 |
*/
|
10 |
|