Version Description
- Fixed SSL font loading issue.
Download this release
Release Info
Developer | dnesscarkey |
Plugin | Use Any Font |
Version | 4.5 |
Comparing to | |
See all releases |
Code changes from version 4.4.4 to 4.5
- includes/uaf_font_upload_js.php +2 -0
- includes/uaf_font_upload_php.php +4 -3
- includes/uaf_footer.php +3 -3
- includes/uaf_header.php +29 -9
- plugin_interface.php +2 -2
- readme.txt +6 -3
- use-any-font.php +1 -1
includes/uaf_font_upload_js.php
CHANGED
@@ -134,6 +134,7 @@ $fontsData = json_decode($fontsRawData, true);
|
|
134 |
</td>
|
135 |
<td>
|
136 |
<input type="hidden" name="api_key" value="<?php echo $uaf_api_key; ?>" />
|
|
|
137 |
<input type="hidden" name="convert_response" id="convert_response" value="" />
|
138 |
<input type="submit" name="submit-uaf-font" id="submit-uaf-font" class="button-primary" value="Upload" />
|
139 |
<div id="font_upload_message" class=""></div>
|
@@ -216,6 +217,7 @@ jQuery('#open_add_font_form')
|
|
216 |
if (status == 'error'){
|
217 |
jQuery('#font_upload_message').attr('class',status);
|
218 |
jQuery('#font_upload_message').html(msg);
|
|
|
219 |
} else {
|
220 |
woffStatus = dataReturn.woff.status;
|
221 |
eotStatus = dataReturn.eot.status;
|
134 |
</td>
|
135 |
<td>
|
136 |
<input type="hidden" name="api_key" value="<?php echo $uaf_api_key; ?>" />
|
137 |
+
<input type="hidden" name="font_count" value="<?php echo count($fontsData); ?>" />
|
138 |
<input type="hidden" name="convert_response" id="convert_response" value="" />
|
139 |
<input type="submit" name="submit-uaf-font" id="submit-uaf-font" class="button-primary" value="Upload" />
|
140 |
<div id="font_upload_message" class=""></div>
|
217 |
if (status == 'error'){
|
218 |
jQuery('#font_upload_message').attr('class',status);
|
219 |
jQuery('#font_upload_message').html(msg);
|
220 |
+
e.preventDefault();
|
221 |
} else {
|
222 |
woffStatus = dataReturn.woff.status;
|
223 |
eotStatus = dataReturn.eot.status;
|
includes/uaf_font_upload_php.php
CHANGED
@@ -23,7 +23,7 @@ if (isset($_POST['submit-uaf-font'])){
|
|
23 |
$fontNameToStoreWithUrl = $fontNameToStore;
|
24 |
|
25 |
// SEND FONT CONERSION REQUEST
|
26 |
-
set_time_limit(0);
|
27 |
$ch = curl_init();
|
28 |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
29 |
curl_setopt($ch, CURLOPT_URL, 'http://dnesscarkey.xyz/font-convertor/convertor/convert.php');
|
@@ -31,7 +31,8 @@ if (isset($_POST['submit-uaf-font'])){
|
|
31 |
$post = array(
|
32 |
'fontfile' => "@".$_FILES['font_file']['tmp_name'],
|
33 |
'fontfileext' => pathinfo($_FILES['font_file']['name'], PATHINFO_EXTENSION),
|
34 |
-
'api_key' => $uaf_api_key
|
|
|
35 |
);
|
36 |
curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
|
37 |
$convertResponse = curl_exec($ch);
|
@@ -164,7 +165,7 @@ $fontsData = json_decode($fontsRawData, true);
|
|
164 |
<td>
|
165 |
|
166 |
</td>
|
167 |
-
<td><input type="submit" name="submit-uaf-font" class="button-primary" value="Upload" />
|
168 |
<p>By clicking on Upload, you confirm that you have rights to use this font.</p>
|
169 |
</td>
|
170 |
</tr>
|
23 |
$fontNameToStoreWithUrl = $fontNameToStore;
|
24 |
|
25 |
// SEND FONT CONERSION REQUEST
|
26 |
+
@set_time_limit(0);
|
27 |
$ch = curl_init();
|
28 |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
29 |
curl_setopt($ch, CURLOPT_URL, 'http://dnesscarkey.xyz/font-convertor/convertor/convert.php');
|
31 |
$post = array(
|
32 |
'fontfile' => "@".$_FILES['font_file']['tmp_name'],
|
33 |
'fontfileext' => pathinfo($_FILES['font_file']['name'], PATHINFO_EXTENSION),
|
34 |
+
'api_key' => $uaf_api_key,
|
35 |
+
'font_count' => $_POST['font_count']
|
36 |
);
|
37 |
curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
|
38 |
$convertResponse = curl_exec($ch);
|
165 |
<td>
|
166 |
|
167 |
</td>
|
168 |
+
<td><input type="hidden" name="font_count" value="<?php echo count($fontsData); ?>" /><input type="submit" name="submit-uaf-font" class="button-primary" value="Upload" />
|
169 |
<p>By clicking on Upload, you confirm that you have rights to use this font.</p>
|
170 |
</td>
|
171 |
</tr>
|
includes/uaf_footer.php
CHANGED
@@ -94,7 +94,7 @@ $server_message = get_option('uaf_server_msg');
|
|
94 |
<tr>
|
95 |
<td>
|
96 |
<ol>
|
97 |
-
<li>Get API key from <a href="http://dnesscarkey.com/font-convertor/api/" target="_blank">here</a>.
|
98 |
<em><strong>Note:</strong> API key is needed to connect to our server for font conversion.</em>
|
99 |
</li>
|
100 |
|
@@ -106,9 +106,9 @@ $server_message = get_option('uaf_server_msg');
|
|
106 |
|
107 |
<li>You can also assign uploaded font directly from Post/Page Wordpress Editor.</li>
|
108 |
|
109 |
-
<li>
|
110 |
|
111 |
-
<li>
|
112 |
|
113 |
</ol>
|
114 |
</td>
|
94 |
<tr>
|
95 |
<td>
|
96 |
<ol>
|
97 |
+
<li>Get API key from <a href="http://dnesscarkey.com/font-convertor/api/" target="_blank">here</a>. Offer your contribution (Free for 1 font, 10 to $100) and get the API key. All API key comes with lifetime validity.<br/>
|
98 |
<em><strong>Note:</strong> API key is needed to connect to our server for font conversion.</em>
|
99 |
</li>
|
100 |
|
106 |
|
107 |
<li>You can also assign uploaded font directly from Post/Page Wordpress Editor.</li>
|
108 |
|
109 |
+
<li>Have any issue related to our plugin ? Please visit <a href="http://dnesscarkey.com/virtual-support/use-any-font.php">Virtual Support</a>. Our virtual support covers around 80% of repeated issue and setup instructions.</li>
|
110 |
|
111 |
+
<li>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>
|
112 |
|
113 |
</ol>
|
114 |
</td>
|
includes/uaf_header.php
CHANGED
@@ -1,30 +1,50 @@
|
|
1 |
<?php
|
2 |
if (isset($_POST['ucf_api_key_submit'])){
|
3 |
$uaf_api_key = trim($_POST['uaf_api_key']);
|
4 |
-
$api_key_return = wp_remote_get('http://dnesscarkey.xyz/font-convertor/api/validate_key.php?license_key='.$uaf_api_key, array('timeout'=>300,'sslverify'=>false));
|
5 |
-
|
6 |
if ( is_wp_error( $api_key_return ) ) {
|
7 |
-
$error_message
|
8 |
$api_message = "Something went wrong: $error_message";
|
|
|
9 |
} else {
|
10 |
$api_key_return = json_decode($api_key_return['body']);
|
11 |
if ($api_key_return->status == 'success'){
|
12 |
update_option('uaf_api_key', $uaf_api_key);
|
|
|
13 |
}
|
|
|
14 |
$api_message = $api_key_return->msg;
|
15 |
}
|
16 |
-
update_option('uaf_api_key', $uaf_api_key);
|
17 |
}
|
18 |
|
19 |
if (isset($_POST['ucf_api_key_remove'])){
|
20 |
-
|
21 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
}
|
23 |
|
24 |
-
$uaf_api_key = get_option('uaf_api_key');
|
25 |
?>
|
26 |
<?php if (!empty($api_message)):?>
|
27 |
-
<div class="updated" id="message"><p><?php echo $api_message ?></p></div>
|
28 |
<?php endif; ?>
|
29 |
<div class="wrap">
|
30 |
<h2>Use Any Font</h2>
|
@@ -48,7 +68,7 @@ $uaf_api_key = get_option('uaf_api_key');
|
|
48 |
<br/> <br/>
|
49 |
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/>
|
50 |
<?php else: ?>
|
51 |
-
<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('
|
52 |
<?php endif;?>
|
53 |
</form>
|
54 |
<br/>
|
1 |
<?php
|
2 |
if (isset($_POST['ucf_api_key_submit'])){
|
3 |
$uaf_api_key = trim($_POST['uaf_api_key']);
|
4 |
+
$api_key_return = wp_remote_get('http://dnesscarkey.xyz/font-convertor/api/validate_key.php?license_key='.$uaf_api_key, array('timeout'=>300,'sslverify'=>false,'user-agent'=>get_bloginfo( 'url' )));
|
|
|
5 |
if ( is_wp_error( $api_key_return ) ) {
|
6 |
+
$error_message = $api_key_return->get_error_message();
|
7 |
$api_message = "Something went wrong: $error_message";
|
8 |
+
$api_msg_type = 'error';
|
9 |
} else {
|
10 |
$api_key_return = json_decode($api_key_return['body']);
|
11 |
if ($api_key_return->status == 'success'){
|
12 |
update_option('uaf_api_key', $uaf_api_key);
|
13 |
+
update_option('uaf_api_package', $api_key_return->package);
|
14 |
}
|
15 |
+
$api_msg_type = $api_key_return->status;
|
16 |
$api_message = $api_key_return->msg;
|
17 |
}
|
|
|
18 |
}
|
19 |
|
20 |
if (isset($_POST['ucf_api_key_remove'])){
|
21 |
+
$uaf_api_key = get_option('uaf_api_key');
|
22 |
+
$api_key_return = wp_remote_get('https://dnesscarkey.xyz/font-convertor/api/deactivate_key.php?license_key='.$uaf_api_key, array('timeout'=>300,'sslverify'=>false,'user-agent'=>get_bloginfo( 'url' )));
|
23 |
+
if ( is_wp_error( $api_key_return ) ) {
|
24 |
+
$error_message = $api_key_return->get_error_message();
|
25 |
+
$api_message = "Something went wrong: $error_message";
|
26 |
+
$api_msg_type = 'error';
|
27 |
+
} else {
|
28 |
+
$api_key_return = json_decode($api_key_return['body']);
|
29 |
+
if ($api_key_return->status == 'success'){
|
30 |
+
delete_option('uaf_api_key');
|
31 |
+
delete_option('uaf_api_package');
|
32 |
+
}
|
33 |
+
$api_msg_type = $api_key_return->status;
|
34 |
+
$api_message = $api_key_return->msg;
|
35 |
+
}
|
36 |
+
}
|
37 |
+
|
38 |
+
$uaf_api_key = get_option('uaf_api_key');
|
39 |
+
$uaf_api_package = get_option('uaf_api_package');
|
40 |
+
$delete_confirmation_msg = 'Are you sure ?';
|
41 |
+
if ($uaf_api_package == 'lite'){
|
42 |
+
$delete_confirmation_msg = "Are you sure ? Since you are using lite(Free) key, deactivating it will delete the key record from our server as well and you won\'t be able to upgrade it.";
|
43 |
}
|
44 |
|
|
|
45 |
?>
|
46 |
<?php if (!empty($api_message)):?>
|
47 |
+
<div class="updated <?php echo $api_msg_type; ?>" id="message"><p><?php echo $api_message ?></p></div>
|
48 |
<?php endif; ?>
|
49 |
<div class="wrap">
|
50 |
<h2>Use Any Font</h2>
|
68 |
<br/> <br/>
|
69 |
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/>
|
70 |
<?php else: ?>
|
71 |
+
<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('<?php echo $delete_confirmation_msg; ?>')){return false;}" />
|
72 |
<?php endif;?>
|
73 |
</form>
|
74 |
<br/>
|
plugin_interface.php
CHANGED
@@ -42,7 +42,7 @@ endif;
|
|
42 |
|
43 |
function uaf_client_css() {
|
44 |
$uaf_upload = wp_upload_dir();
|
45 |
-
$uaf_upload_url = $uaf_upload['baseurl'];
|
46 |
$uaf_upload_url = $uaf_upload_url . '/useanyfont/';
|
47 |
wp_register_style( 'uaf_client_css', $uaf_upload_url.'uaf.css', array(),get_option('uaf_css_updated_timestamp'));
|
48 |
wp_enqueue_style( 'uaf_client_css' );
|
@@ -55,7 +55,7 @@ function adminjslibs(){
|
|
55 |
|
56 |
function adminCsslibs(){
|
57 |
$uaf_upload = wp_upload_dir();
|
58 |
-
$uaf_upload_url = $uaf_upload['baseurl'];
|
59 |
$uaf_upload_url = $uaf_upload_url . '/useanyfont/';
|
60 |
wp_register_style('uaf-admin-style', plugins_url('use-any-font/css/uaf_admin.css'));
|
61 |
wp_enqueue_style('uaf-admin-style');
|
42 |
|
43 |
function uaf_client_css() {
|
44 |
$uaf_upload = wp_upload_dir();
|
45 |
+
$uaf_upload_url = set_url_scheme($uaf_upload['baseurl']);
|
46 |
$uaf_upload_url = $uaf_upload_url . '/useanyfont/';
|
47 |
wp_register_style( 'uaf_client_css', $uaf_upload_url.'uaf.css', array(),get_option('uaf_css_updated_timestamp'));
|
48 |
wp_enqueue_style( 'uaf_client_css' );
|
55 |
|
56 |
function adminCsslibs(){
|
57 |
$uaf_upload = wp_upload_dir();
|
58 |
+
$uaf_upload_url = set_url_scheme($uaf_upload['baseurl']);
|
59 |
$uaf_upload_url = $uaf_upload_url . '/useanyfont/';
|
60 |
wp_register_style('uaf-admin-style', plugins_url('use-any-font/css/uaf_admin.css'));
|
61 |
wp_enqueue_style('uaf-admin-style');
|
readme.txt
CHANGED
@@ -2,8 +2,8 @@
|
|
2 |
Contributors: dnesscarkey
|
3 |
Tags: use any font, any font, embed any font, font embed, font uploader, css3 font embed, @font-face embed, font conversion, webfont, ttf, opentype, custom fonts
|
4 |
Requires at least: 3.0
|
5 |
-
Tested up to: 4.5
|
6 |
-
Stable tag: 4.
|
7 |
|
8 |
Embed any font in your website
|
9 |
|
@@ -12,7 +12,7 @@ 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 |
-
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 font format (ttf,otf) without being dependent to other's server uptime.
|
16 |
|
17 |
Features
|
18 |
|
@@ -109,6 +109,9 @@ You can check our <a href="http://dineshkarki.com.np/forums/forum/use-any-fonts"
|
|
109 |
|
110 |
== Changelog ==
|
111 |
|
|
|
|
|
|
|
112 |
= 4.4.4 =
|
113 |
* Font upload issue fixed.
|
114 |
|
2 |
Contributors: dnesscarkey
|
3 |
Tags: use any font, any font, embed any font, font embed, font uploader, css3 font embed, @font-face embed, font conversion, webfont, ttf, opentype, custom fonts
|
4 |
Requires at least: 3.0
|
5 |
+
Tested up to: 4.5.2
|
6 |
+
Stable tag: 4.5
|
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 font format (ttf,otf,woff) without being dependent to other's server uptime.
|
16 |
|
17 |
Features
|
18 |
|
109 |
|
110 |
== Changelog ==
|
111 |
|
112 |
+
= 4.5 =
|
113 |
+
* Fixed SSL font loading issue.
|
114 |
+
|
115 |
= 4.4.4 =
|
116 |
* Font upload issue fixed.
|
117 |
|
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: 4.
|
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: 4.5
|
8 |
Author URI: http://www.dineshkarki.com.np
|
9 |
*/
|
10 |
|