Version Description
- Added Support for SSL (https)
- Additional settings to disbale font list in wordpress editor.
- Tested with 3.8
Download this release
Release Info
Developer | dnesscarkey |
Plugin | Use Any Font |
Version | 4.1 |
Comparing to | |
See all releases |
Code changes from version 4.0 to 4.1
- includes/uaf_editor_setup.php +0 -1
- includes/uaf_font_upload.php +1 -1
- includes/uaf_footer.php +42 -1
- plugin_interface.php +15 -9
- readme.txt +18 -5
- screenshot-2.png +0 -0
- use-any-font.php +1 -1
includes/uaf_editor_setup.php
CHANGED
@@ -33,7 +33,6 @@ function uaf_mce_before_init( $init_array ) {
|
|
33 |
}
|
34 |
|
35 |
function wp_editor_fontsize_filter( $options ) {
|
36 |
-
array_shift( $options );
|
37 |
array_unshift( $options, 'fontsizeselect');
|
38 |
array_unshift( $options, 'fontselect');
|
39 |
return $options;
|
33 |
}
|
34 |
|
35 |
function wp_editor_fontsize_filter( $options ) {
|
|
|
36 |
array_unshift( $options, 'fontsizeselect');
|
37 |
array_unshift( $options, 'fontselect');
|
38 |
return $options;
|
includes/uaf_font_upload.php
CHANGED
@@ -139,7 +139,7 @@ $fontsData = json_decode($fontsRawData, true);
|
|
139 |
<tr>
|
140 |
<td>Font File</td>
|
141 |
<td><input type="file" name="font_file" value="" class="required" /><br/>
|
142 |
-
<em>Accepted Font Format : ttf, otf, eot, woff, svg</em>
|
143 |
</td>
|
144 |
</tr>
|
145 |
<tr>
|
139 |
<tr>
|
140 |
<td>Font File</td>
|
141 |
<td><input type="file" name="font_file" value="" class="required" /><br/>
|
142 |
+
<em>Accepted Font Format : ttf, otf, eot, woff, svg | Font Size: Less than 2MB</em>
|
143 |
</td>
|
144 |
</tr>
|
145 |
<tr>
|
includes/uaf_footer.php
CHANGED
@@ -40,7 +40,48 @@ if (isset($_POST['test_server']) || empty($server_status)){
|
|
40 |
}
|
41 |
$server_status = get_option('uaf_server_status');
|
42 |
$server_message = get_option('uaf_server_msg');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43 |
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44 |
<br/>
|
45 |
<table class="wp-list-table widefat fixed bookmarks">
|
46 |
<thead>
|
@@ -64,7 +105,7 @@ $server_message = get_option('uaf_server_msg');
|
|
64 |
|
65 |
<li>You can also assign uploaded font directly from Post/Page Wordpress Editor.</li>
|
66 |
|
67 |
-
<li>
|
68 |
|
69 |
<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>
|
70 |
|
40 |
}
|
41 |
$server_status = get_option('uaf_server_status');
|
42 |
$server_message = get_option('uaf_server_msg');
|
43 |
+
|
44 |
+
// SETTINGS
|
45 |
+
if (isset($_POST['submit-uaf-settings'])){
|
46 |
+
if (isset($_POST['uaf_disbale_editor_font_list'])){
|
47 |
+
$uaf_disbale_editor_font_list = 1;
|
48 |
+
} else {
|
49 |
+
$uaf_disbale_editor_font_list = '';
|
50 |
+
}
|
51 |
+
update_option('uaf_disbale_editor_font_list', $uaf_disbale_editor_font_list);
|
52 |
+
$settings_message = 'Settings Saved';
|
53 |
+
}
|
54 |
+
$uaf_disbale_editor_font_list_value = get_option('uaf_disbale_editor_font_list');
|
55 |
?>
|
56 |
+
|
57 |
+
<?php if (!empty($settings_message)):?>
|
58 |
+
<div class="updated" id="message"><p><?php echo $settings_message ?></p></div>
|
59 |
+
<?php endif; ?>
|
60 |
+
|
61 |
+
|
62 |
+
<br/>
|
63 |
+
<table class="wp-list-table widefat fixed bookmarks">
|
64 |
+
<thead>
|
65 |
+
<tr>
|
66 |
+
<th>Additional Settings (Usually not required)</th>
|
67 |
+
</tr>
|
68 |
+
</thead>
|
69 |
+
<tbody>
|
70 |
+
<form method="post" action="">
|
71 |
+
<tr>
|
72 |
+
<td>
|
73 |
+
<input type="checkbox" name="uaf_disbale_editor_font_list" value="1" <?php echo $uaf_disbale_editor_font_list_value == 1?'checked=checked':''; ?> /> Disable Font list in wordpress editor.
|
74 |
+
</td>
|
75 |
+
</tr>
|
76 |
+
|
77 |
+
<tr>
|
78 |
+
<td><input type="submit" name="submit-uaf-settings" class="button-primary" value="Save Settings" /></td>
|
79 |
+
</tr>
|
80 |
+
</form>
|
81 |
+
|
82 |
+
</tbody>
|
83 |
+
</table>
|
84 |
+
|
85 |
<br/>
|
86 |
<table class="wp-list-table widefat fixed bookmarks">
|
87 |
<thead>
|
105 |
|
106 |
<li>You can also assign uploaded font directly from Post/Page Wordpress Editor.</li>
|
107 |
|
108 |
+
<li>If you are fond of visual instructions, you can check it <a href="http://dineshkarki.com.np/use-any-font/instructions" target="_blank">here</a>.</li>
|
109 |
|
110 |
<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>
|
111 |
|
plugin_interface.php
CHANGED
@@ -4,8 +4,12 @@ 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 |
-
|
|
|
|
|
|
|
|
|
9 |
|
10 |
function uaf_client_css() {
|
11 |
$uaf_upload = wp_upload_dir();
|
@@ -51,8 +55,8 @@ function uaf_activate(){
|
|
51 |
|
52 |
function uaf_update_check() { // MUST CHANGE WITH EVERY VERSION
|
53 |
$uaf_version_check = get_option('uaf_current_version');
|
54 |
-
if ($uaf_version_check != 4.
|
55 |
-
update_option('uaf_current_version', '4.
|
56 |
if ($uaf_version_check < 4.0):
|
57 |
uaf_create_folder();
|
58 |
uaf_move_file_to_newPath();
|
@@ -115,7 +119,9 @@ function uaf_write_css(){
|
|
115 |
$uaf_upload_dir = $uaf_upload['basedir'];
|
116 |
$uaf_upload_dir = $uaf_upload_dir . '/useanyfont/';
|
117 |
$uaf_upload_url = $uaf_upload['baseurl'];
|
118 |
-
$uaf_upload_url = $uaf_upload_url . '/useanyfont/';
|
|
|
|
|
119 |
ob_start();
|
120 |
$fontsRawData = get_option('uaf_font_data');
|
121 |
$fontsData = json_decode($fontsRawData, true);
|
@@ -124,8 +130,8 @@ function uaf_write_css(){
|
|
124 |
@font-face {
|
125 |
font-family: '<?php echo $fontData['font_name'] ?>';
|
126 |
font-style: normal;
|
127 |
-
src: url(<?php echo $uaf_upload_url.$fontData['font_path'] ?>.eot);
|
128 |
-
src: local('<?php echo $fontData['font_name'] ?>'), url(<?php echo $uaf_upload_url.$fontData['font_path'] ?>.eot) format('embedded-opentype'), url(<?php echo $uaf_upload_url.$fontData['font_path'] ?>.woff) format('woff');
|
129 |
}
|
130 |
<?php
|
131 |
endforeach;
|
@@ -156,8 +162,8 @@ function uaf_write_css(){
|
|
156 |
@font-face {
|
157 |
font-family: '<?php echo $fontData['font_name'] ?>';
|
158 |
font-style: normal;
|
159 |
-
src: url(<?php echo $uaf_upload_url.$fontData['font_path'] ?>.eot);
|
160 |
-
src: local('<?php echo $fontData['font_name'] ?>'), url(<?php echo $uaf_upload_url.$fontData['font_path'] ?>.eot) format('embedded-opentype'), url(<?php echo $uaf_upload_url.$fontData['font_path'] ?>.woff) format('woff');
|
161 |
}
|
162 |
<?php
|
163 |
endforeach;
|
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 |
+
$uaf_disbale_editor_font_list_value = get_option('uaf_disbale_editor_font_list');
|
9 |
+
if ($uaf_disbale_editor_font_list_value != 1):
|
10 |
+
add_filter('mce_buttons_2', 'wp_editor_fontsize_filter');
|
11 |
+
add_filter('tiny_mce_before_init', 'uaf_mce_before_init' );
|
12 |
+
endif;
|
13 |
|
14 |
function uaf_client_css() {
|
15 |
$uaf_upload = wp_upload_dir();
|
55 |
|
56 |
function uaf_update_check() { // MUST CHANGE WITH EVERY VERSION
|
57 |
$uaf_version_check = get_option('uaf_current_version');
|
58 |
+
if ($uaf_version_check != 4.1):
|
59 |
+
update_option('uaf_current_version', '4.1');
|
60 |
if ($uaf_version_check < 4.0):
|
61 |
uaf_create_folder();
|
62 |
uaf_move_file_to_newPath();
|
119 |
$uaf_upload_dir = $uaf_upload['basedir'];
|
120 |
$uaf_upload_dir = $uaf_upload_dir . '/useanyfont/';
|
121 |
$uaf_upload_url = $uaf_upload['baseurl'];
|
122 |
+
$uaf_upload_url = $uaf_upload_url . '/useanyfont/';
|
123 |
+
$uaf_upload_url = preg_replace('#^https?:#', '', $uaf_upload_url);
|
124 |
+
|
125 |
ob_start();
|
126 |
$fontsRawData = get_option('uaf_font_data');
|
127 |
$fontsData = json_decode($fontsRawData, true);
|
130 |
@font-face {
|
131 |
font-family: '<?php echo $fontData['font_name'] ?>';
|
132 |
font-style: normal;
|
133 |
+
src: url('<?php echo $uaf_upload_url.$fontData['font_path'] ?>.eot');
|
134 |
+
src: local('<?php echo $fontData['font_name'] ?>'), url('<?php echo $uaf_upload_url.$fontData['font_path'] ?>.eot') format('embedded-opentype'), url('<?php echo $uaf_upload_url.$fontData['font_path'] ?>.woff') format('woff');
|
135 |
}
|
136 |
<?php
|
137 |
endforeach;
|
162 |
@font-face {
|
163 |
font-family: '<?php echo $fontData['font_name'] ?>';
|
164 |
font-style: normal;
|
165 |
+
src: url('<?php echo $uaf_upload_url.$fontData['font_path'] ?>.eot');
|
166 |
+
src: local('<?php echo $fontData['font_name'] ?>'), url('<?php echo $uaf_upload_url.$fontData['font_path'] ?>.eot') format('embedded-opentype'), url('<?php echo $uaf_upload_url.$fontData['font_path'] ?>.woff') format('woff');
|
167 |
}
|
168 |
<?php
|
169 |
endforeach;
|
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: 3.
|
6 |
-
Stable tag: 4.
|
7 |
|
8 |
Embed any font in your website
|
9 |
|
@@ -30,7 +30,7 @@ Features
|
|
30 |
|
31 |
You need API key to connect to our server for font conversion. Our server converts your font and sends it back.
|
32 |
|
33 |
-
Offer your contribution (Free to $100) and get the API key from <a href="http://dnesscarkey.com/font-convertor/api/" target="_blank">here</a>.
|
34 |
|
35 |
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.
|
36 |
|
@@ -49,6 +49,14 @@ We don't respond to support tickets created here. Please visit our <a href="http
|
|
49 |
|
50 |
== Frequently Asked Questions ==
|
51 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
52 |
= Does it works with multiple fonts ? =
|
53 |
|
54 |
Ya, it works with multiple fonts. For multiple font conversion request, you need to get the Premium Key.
|
@@ -74,7 +82,12 @@ You can check our <a href="http://dineshkarki.com.np/forums/forum/use-any-fonts"
|
|
74 |
|
75 |
== Changelog ==
|
76 |
|
77 |
-
= 4. =
|
|
|
|
|
|
|
|
|
|
|
78 |
* Added Network Site Support
|
79 |
* Assign font directly from Wordpress Editor
|
80 |
|
@@ -86,7 +99,7 @@ You can check our <a href="http://dineshkarki.com.np/forums/forum/use-any-fonts"
|
|
86 |
* Add woff and svg font format
|
87 |
|
88 |
= 3.0 =
|
89 |
-
*Major update
|
90 |
* Supports more font format now.
|
91 |
* Better error handling
|
92 |
* Added hyperlink (a tag) in default element select.
|
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: 3.8
|
6 |
+
Stable tag: 4.1
|
7 |
|
8 |
Embed any font in your website
|
9 |
|
30 |
|
31 |
You need API key to connect to our server for font conversion. Our server converts your font and sends it back.
|
32 |
|
33 |
+
Offer your contribution (Free, $10 to $100) and get the API key from <a href="http://dnesscarkey.com/font-convertor/api/" target="_blank">here</a>.
|
34 |
|
35 |
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.
|
36 |
|
49 |
|
50 |
== Frequently Asked Questions ==
|
51 |
|
52 |
+
= Which font format does plugin accepts ? =
|
53 |
+
|
54 |
+
Currently, ttf, otf, eot, woff, svg font format are accepted.
|
55 |
+
|
56 |
+
= What is the max font file size ? =
|
57 |
+
|
58 |
+
Font file upto 2MB is acceptable. However, we suggest you to use smaller ones as far as possible. The font file size directly affects your site load time.
|
59 |
+
|
60 |
= Does it works with multiple fonts ? =
|
61 |
|
62 |
Ya, it works with multiple fonts. For multiple font conversion request, you need to get the Premium Key.
|
82 |
|
83 |
== Changelog ==
|
84 |
|
85 |
+
= 4.1 =
|
86 |
+
* Added Support for SSL (https)
|
87 |
+
* Additional settings to disbale font list in wordpress editor.
|
88 |
+
* Tested with 3.8
|
89 |
+
|
90 |
+
= 4.0 =
|
91 |
* Added Network Site Support
|
92 |
* Assign font directly from Wordpress Editor
|
93 |
|
99 |
* Add woff and svg font format
|
100 |
|
101 |
= 3.0 =
|
102 |
+
* Major update
|
103 |
* Supports more font format now.
|
104 |
* Better error handling
|
105 |
* Added hyperlink (a tag) in default element select.
|
screenshot-2.png
CHANGED
Binary file
|
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.1
|
8 |
Author URI: http://www.dineshkarki.com.np
|
9 |
*/
|
10 |
|