Version Description
- Added support for WPBakery Page Builder (Js Composer). Adds custom uploaded fonts to WPBakery Typography list.
Download this release
Release Info
Developer | dnesscarkey |
Plugin | Use Any Font |
Version | 5.11.1 |
Comparing to | |
See all releases |
Code changes from version 5.11 to 5.11.1
- includes/uaf_editor_setup.php +18 -0
- includes/uaf_font_implement.php +6 -53
- includes/uaf_footer.php +2 -4
- includes/uaf_functions.php +58 -0
- includes/uaf_header.php +5 -29
- includes/uaf_trigger_actions.php +51 -0
- plugin_interface.php +1 -14
- readme.txt +17 -13
- use-any-font.php +1 -1
includes/uaf_editor_setup.php
CHANGED
@@ -205,4 +205,22 @@ function uaf_revslider_custom_fonts($fonts) {
|
|
205 |
endforeach;
|
206 |
endif;
|
207 |
return array_merge($fonts_uaf,$fonts);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
208 |
}
|
205 |
endforeach;
|
206 |
endif;
|
207 |
return array_merge($fonts_uaf,$fonts);
|
208 |
+
}
|
209 |
+
|
210 |
+
// FOR WP BAKERY VISUAL BUILDER (JS Composer)
|
211 |
+
add_filter('vc_google_fonts_get_fonts_filter', 'uaf_wpbakery_custom_fonts');
|
212 |
+
function uaf_wpbakery_custom_fonts($fonts) {
|
213 |
+
$fontsData = uaf_get_uploaded_font_data();
|
214 |
+
$fonts_uaf = array();
|
215 |
+
if (!empty($fontsData)):
|
216 |
+
foreach ($fontsData as $key=>$fontData):
|
217 |
+
$fonts_uaf[] = array(
|
218 |
+
'font_family' => $fontData['font_name'],
|
219 |
+
'font_types' => '400 regular:400:normal',
|
220 |
+
'font_styles' => 'regular'
|
221 |
+
);
|
222 |
+
endforeach;
|
223 |
+
endif;
|
224 |
+
$fonts_uaf = json_decode (json_encode ($fonts_uaf), FALSE);
|
225 |
+
return array_merge($fonts_uaf,$fonts);
|
226 |
}
|
includes/uaf_font_implement.php
CHANGED
@@ -1,48 +1,3 @@
|
|
1 |
-
<?php
|
2 |
-
if (isset($_POST['submit-uaf-implement'])){
|
3 |
-
$fontsImplementRawData = get_option('uaf_font_implement');
|
4 |
-
$fontsImplementData = json_decode($fontsImplementRawData, true);
|
5 |
-
if (empty($fontsImplementData)):
|
6 |
-
$fontsImplementData = array();
|
7 |
-
endif;
|
8 |
-
|
9 |
-
$fontElements = array();
|
10 |
-
$fontElements[] = @join(', ',$_POST['elements']);
|
11 |
-
$fontElements[] = @join(', ',array_filter(array_map('trim',explode("\n", trim($_POST['custom_elements'])))));
|
12 |
-
$fontElements = array_filter(array_map('trim',$fontElements));
|
13 |
-
$finalElements = join(', ', $fontElements);
|
14 |
-
$finalElements = uaf_langutizse_elements($finalElements);
|
15 |
-
|
16 |
-
if (!empty($finalElements) && !empty($_POST['font_key'])){
|
17 |
-
$fontsImplementData[date('ymdhis')] = array(
|
18 |
-
'font_key' => $_POST['font_key'],
|
19 |
-
'font_elements' => $finalElements
|
20 |
-
);
|
21 |
-
$updateFontsImplementData = json_encode($fontsImplementData);
|
22 |
-
update_option('uaf_font_implement',$updateFontsImplementData);
|
23 |
-
uaf_write_css();
|
24 |
-
$implementMsg = 'Font Assigned';
|
25 |
-
|
26 |
-
} else {
|
27 |
-
$implementMsg = "Couldn't assign font. Please select font and atleast one element or add a custom element";
|
28 |
-
$MsgTypeClass = "error";
|
29 |
-
}
|
30 |
-
|
31 |
-
}
|
32 |
-
|
33 |
-
if (isset($_GET['delete_implement_key'])):
|
34 |
-
$fontsImplementRawData = get_option('uaf_font_implement');
|
35 |
-
$fontsImplementData = json_decode($fontsImplementRawData, true);
|
36 |
-
$key_to_delete = $_GET['delete_implement_key'];
|
37 |
-
unset($fontsImplementData[$key_to_delete]);
|
38 |
-
$updateFontsImplementData = json_encode($fontsImplementData);
|
39 |
-
update_option('uaf_font_implement',$updateFontsImplementData);
|
40 |
-
uaf_write_css();
|
41 |
-
$implementMsg = 'Font assign removed';
|
42 |
-
$MsgTypeClass = "updated";
|
43 |
-
endif;
|
44 |
-
?>
|
45 |
-
|
46 |
<table class="wp-list-table widefat fixed bookmarks">
|
47 |
<thead>
|
48 |
<tr>
|
@@ -52,17 +7,12 @@ endif;
|
|
52 |
<tbody>
|
53 |
<tr>
|
54 |
<td>
|
55 |
-
|
56 |
-
<?php if (!empty($implementMsg)):?>
|
57 |
-
<div class="updated <?php echo $MsgTypeClass; ?>" id="message"><p><?php echo $implementMsg ?></p></div>
|
58 |
-
<?php endif; ?>
|
59 |
-
|
60 |
<?php
|
61 |
$fontsRawData = get_option('uaf_font_data');
|
62 |
$fontsData = json_decode($fontsRawData, true);
|
63 |
?>
|
64 |
|
65 |
-
<p align="right"><input type="button" name="open_assign_font" onClick="open_assign_font();" class="button-primary" value="Assign Font" /><br/></p>
|
66 |
|
67 |
<div id="open_assign_font" style="display:none;">
|
68 |
<form action="admin.php?page=uaf_settings_page" id="open_assign_font_form" method="post">
|
@@ -85,8 +35,6 @@ $fontsData = json_decode($fontsRawData, true);
|
|
85 |
</tr>
|
86 |
<?php
|
87 |
global $TRP_LANGUAGE;
|
88 |
-
print_r($TRP_LANGUAGE);
|
89 |
-
|
90 |
$languageSelector = uaf_get_language_selector();
|
91 |
if ($languageSelector['enableMultiLang'] == TRUE ): ?>
|
92 |
<tr>
|
@@ -212,6 +160,11 @@ $fontsImplementData = json_decode($fontsImplementRawData, true);
|
|
212 |
<script>
|
213 |
function open_assign_font(){
|
214 |
jQuery('#open_assign_font').toggle('fast');
|
|
|
|
|
|
|
|
|
|
|
215 |
}
|
216 |
</script>
|
217 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
<table class="wp-list-table widefat fixed bookmarks">
|
2 |
<thead>
|
3 |
<tr>
|
7 |
<tbody>
|
8 |
<tr>
|
9 |
<td>
|
|
|
|
|
|
|
|
|
|
|
10 |
<?php
|
11 |
$fontsRawData = get_option('uaf_font_data');
|
12 |
$fontsData = json_decode($fontsRawData, true);
|
13 |
?>
|
14 |
|
15 |
+
<p align="right"><input type="button" name="open_assign_font" onClick="open_assign_font();" class="button-primary" id="open_assign_font_button" value="Assign Font" /><br/></p>
|
16 |
|
17 |
<div id="open_assign_font" style="display:none;">
|
18 |
<form action="admin.php?page=uaf_settings_page" id="open_assign_font_form" method="post">
|
35 |
</tr>
|
36 |
<?php
|
37 |
global $TRP_LANGUAGE;
|
|
|
|
|
38 |
$languageSelector = uaf_get_language_selector();
|
39 |
if ($languageSelector['enableMultiLang'] == TRUE ): ?>
|
40 |
<tr>
|
160 |
<script>
|
161 |
function open_assign_font(){
|
162 |
jQuery('#open_assign_font').toggle('fast');
|
163 |
+
if (jQuery('#open_assign_font_button').val() == 'Assign Font'){
|
164 |
+
jQuery('#open_assign_font_button').val('Close Assign Font');
|
165 |
+
} else {
|
166 |
+
jQuery('#open_assign_font_button').val('Assign Font');
|
167 |
+
}
|
168 |
}
|
169 |
</script>
|
170 |
|
includes/uaf_footer.php
CHANGED
@@ -126,9 +126,7 @@ if (isset($_POST['test_server']) || empty($server_status)){
|
|
126 |
|
127 |
<li>You can also assign uploaded font directly from Post/Page Wordpress Editor.</li>
|
128 |
|
129 |
-
<li>
|
130 |
-
|
131 |
-
<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>
|
132 |
|
133 |
</ol>
|
134 |
</td>
|
@@ -205,7 +203,7 @@ if (isset($_POST['test_server']) || empty($server_status)){
|
|
205 |
<td>
|
206 |
<ul class="uaf_list">
|
207 |
<li><a href="http://goo.gl/NYtZsX" target="_blank">Setup Instructions</a></li>
|
208 |
-
<li><a href="
|
209 |
<li><a href="http://goo.gl/MKg7VS" target="_blank">Rectify My Problem / Contact Us</a></li>
|
210 |
<li><a href="https://bit.ly/2wYjOyj" target="_blank">Download Free Fonts</a></li>
|
211 |
</ul>
|
126 |
|
127 |
<li>You can also assign uploaded font directly from Post/Page Wordpress Editor.</li>
|
128 |
|
129 |
+
<li>If you still have any problem visit our <a href="https://wordpress.org/support/plugin/use-any-font/" target="_blank">support forum</a> or you can write to us directly using our contact form.</li>
|
|
|
|
|
130 |
|
131 |
</ol>
|
132 |
</td>
|
203 |
<td>
|
204 |
<ul class="uaf_list">
|
205 |
<li><a href="http://goo.gl/NYtZsX" target="_blank">Setup Instructions</a></li>
|
206 |
+
<li><a href="https://wordpress.org/support/plugin/use-any-font/" target="_blank">Support Forum</a></li>
|
207 |
<li><a href="http://goo.gl/MKg7VS" target="_blank">Rectify My Problem / Contact Us</a></li>
|
208 |
<li><a href="https://bit.ly/2wYjOyj" target="_blank">Download Free Fonts</a></li>
|
209 |
</ul>
|
includes/uaf_functions.php
CHANGED
@@ -368,12 +368,26 @@ function uaf_delete_font(){
|
|
368 |
|
369 |
$fontsData = uaf_get_uploaded_font_data();
|
370 |
$key_to_delete = $_GET['delete_font_key'];
|
|
|
371 |
@unlink(realpath($uaf_paths['dir'].$fontsData[$key_to_delete]['font_path'].'.woff2'));
|
372 |
@unlink(realpath($uaf_paths['dir'].$fontsData[$key_to_delete]['font_path'].'.woff'));
|
373 |
@unlink(realpath($uaf_paths['dir'].$fontsData[$key_to_delete]['font_path'].'.eot'));
|
374 |
unset($fontsData[$key_to_delete]);
|
375 |
$updateFontData = json_encode($fontsData);
|
376 |
update_option('uaf_font_data',$updateFontData);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
377 |
$return['status'] = 'success';
|
378 |
$return['body'] = 'Font Deleted';
|
379 |
uaf_write_css();
|
@@ -491,6 +505,50 @@ function uaf_save_settings(){
|
|
491 |
uaf_write_css(); // Need to rewrite css for uaf_use_relative_font_path setting change
|
492 |
}
|
493 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
494 |
if (!function_exists('array_key_first')) { // FOR OLDER VERSION PHP SUPPORT
|
495 |
function array_key_first(array $arr) {
|
496 |
foreach($arr as $key => $unused) {
|
368 |
|
369 |
$fontsData = uaf_get_uploaded_font_data();
|
370 |
$key_to_delete = $_GET['delete_font_key'];
|
371 |
+
|
372 |
@unlink(realpath($uaf_paths['dir'].$fontsData[$key_to_delete]['font_path'].'.woff2'));
|
373 |
@unlink(realpath($uaf_paths['dir'].$fontsData[$key_to_delete]['font_path'].'.woff'));
|
374 |
@unlink(realpath($uaf_paths['dir'].$fontsData[$key_to_delete]['font_path'].'.eot'));
|
375 |
unset($fontsData[$key_to_delete]);
|
376 |
$updateFontData = json_encode($fontsData);
|
377 |
update_option('uaf_font_data',$updateFontData);
|
378 |
+
|
379 |
+
$fontsImplementRawData = get_option('uaf_font_implement');
|
380 |
+
$fontsImplementData = json_decode($fontsImplementRawData, true);
|
381 |
+
|
382 |
+
foreach ($fontsImplementData as $implement_key => $font_assign_array) {
|
383 |
+
if ($key_to_delete == $font_assign_array['font_key']){
|
384 |
+
unset($fontsImplementData[$implement_key]);
|
385 |
+
}
|
386 |
+
}
|
387 |
+
|
388 |
+
$updatefontsImplementData = json_encode($fontsImplementData);
|
389 |
+
update_option('uaf_font_implement',$updatefontsImplementData);
|
390 |
+
|
391 |
$return['status'] = 'success';
|
392 |
$return['body'] = 'Font Deleted';
|
393 |
uaf_write_css();
|
505 |
uaf_write_css(); // Need to rewrite css for uaf_use_relative_font_path setting change
|
506 |
}
|
507 |
|
508 |
+
function uaf_save_font_assign(){
|
509 |
+
$fontsImplementRawData = get_option('uaf_font_implement');
|
510 |
+
$fontsImplementData = json_decode($fontsImplementRawData, true);
|
511 |
+
if (empty($fontsImplementData)):
|
512 |
+
$fontsImplementData = array();
|
513 |
+
endif;
|
514 |
+
|
515 |
+
$fontElements = array();
|
516 |
+
$fontElements[] = @join(', ',$_POST['elements']);
|
517 |
+
$fontElements[] = @join(', ',array_filter(array_map('trim',explode("\n", trim($_POST['custom_elements'])))));
|
518 |
+
$fontElements = array_filter(array_map('trim',$fontElements));
|
519 |
+
$finalElements = join(', ', $fontElements);
|
520 |
+
$finalElements = uaf_langutizse_elements($finalElements);
|
521 |
+
|
522 |
+
if (!empty($finalElements) && !empty($_POST['font_key'])){
|
523 |
+
$fontsImplementData[date('ymdhis')] = array(
|
524 |
+
'font_key' => $_POST['font_key'],
|
525 |
+
'font_elements' => $finalElements
|
526 |
+
);
|
527 |
+
$updateFontsImplementData = json_encode($fontsImplementData);
|
528 |
+
update_option('uaf_font_implement',$updateFontsImplementData);
|
529 |
+
uaf_write_css();
|
530 |
+
$return['status'] = 'success';
|
531 |
+
$return['body'] = 'Font Assigned';
|
532 |
+
} else {
|
533 |
+
$return['body'] = "Couldn't assign font. Please select font and atleast one element or add a custom element";
|
534 |
+
$return['status'] = "error";
|
535 |
+
}
|
536 |
+
return $return;
|
537 |
+
}
|
538 |
+
|
539 |
+
function uaf_delete_font_assign(){
|
540 |
+
$fontsImplementRawData = get_option('uaf_font_implement');
|
541 |
+
$fontsImplementData = json_decode($fontsImplementRawData, true);
|
542 |
+
$key_to_delete = $_GET['delete_implement_key'];
|
543 |
+
unset($fontsImplementData[$key_to_delete]);
|
544 |
+
$updateFontsImplementData = json_encode($fontsImplementData);
|
545 |
+
update_option('uaf_font_implement',$updateFontsImplementData);
|
546 |
+
uaf_write_css();
|
547 |
+
$return['status'] = 'success';
|
548 |
+
$return['body'] = 'Font assign removed';
|
549 |
+
return $return;
|
550 |
+
}
|
551 |
+
|
552 |
if (!function_exists('array_key_first')) { // FOR OLDER VERSION PHP SUPPORT
|
553 |
function array_key_first(array $arr) {
|
554 |
foreach($arr as $key => $unused) {
|
includes/uaf_header.php
CHANGED
@@ -1,29 +1,3 @@
|
|
1 |
-
<?php
|
2 |
-
if (isset($_POST['ucf_api_key_submit'])){
|
3 |
-
$activationRetun = uaf_key_activate();
|
4 |
-
$operationMsg = $activationRetun['body'];
|
5 |
-
$operationStatus = $activationRetun['status'];
|
6 |
-
}
|
7 |
-
|
8 |
-
if (isset($_POST['ucf_api_key_remove'])){
|
9 |
-
$deactivationRetun = uaf_key_deactivate();
|
10 |
-
$operationMsg = $deactivationRetun['body'];
|
11 |
-
$operationStatus = $deactivationRetun['status'];
|
12 |
-
}
|
13 |
-
|
14 |
-
if (isset($_GET['delete_font_key'])):
|
15 |
-
$fontDeleteRetun = uaf_delete_font();
|
16 |
-
$operationMsg = $fontDeleteRetun['body'];
|
17 |
-
$operationStatus = $fontDeleteRetun['status'];
|
18 |
-
endif;
|
19 |
-
|
20 |
-
if (isset($_POST['submit-uaf-settings'])){
|
21 |
-
uaf_save_settings();
|
22 |
-
$operationMsg = 'Settings Saved';
|
23 |
-
$operationStatus = 'updated';
|
24 |
-
}
|
25 |
-
?>
|
26 |
-
|
27 |
<?php if (!empty($operationMsg)):?>
|
28 |
<div class="updated <?php echo $operationStatus; ?>" id="message"><p><?php echo $operationMsg ?></p></div>
|
29 |
<?php endif; ?>
|
@@ -45,9 +19,11 @@ if (isset($_POST['submit-uaf-settings'])){
|
|
45 |
<form action="admin.php?page=uaf_settings_page" method="post" id="uaf_api_key_form" >
|
46 |
API KEY :
|
47 |
<?php if (empty($GLOBALS['uaf_api_key'])): ?>
|
48 |
-
<input name="uaf_api_key" id="uaf_api_key" type="text" style="width:
|
49 |
-
<input type="submit" name="ucf_api_key_submit" class="button-primary" value="Verify"
|
50 |
-
<input type="button" name="uaf_api_key_generate" id="uaf_api_key_generate" class="button-primary" value="Generate Free Test API Key"
|
|
|
|
|
51 |
<br/> <br/>
|
52 |
Use Any Font need API key to upload the font. You can get the premium key from <a href="https://dineshkarki.com.np/use-any-font/api-key" target="_blank">here</a>. You can also generate Lite / Test API key from button above. <strong>Note : </strong> Lite / Test API only allow single font conversion.
|
53 |
<br/>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
<?php if (!empty($operationMsg)):?>
|
2 |
<div class="updated <?php echo $operationStatus; ?>" id="message"><p><?php echo $operationMsg ?></p></div>
|
3 |
<?php endif; ?>
|
19 |
<form action="admin.php?page=uaf_settings_page" method="post" id="uaf_api_key_form" >
|
20 |
API KEY :
|
21 |
<?php if (empty($GLOBALS['uaf_api_key'])): ?>
|
22 |
+
<input name="uaf_api_key" id="uaf_api_key" type="text" style="width:325px; margin-left:50px;" />
|
23 |
+
<input type="submit" name="ucf_api_key_submit" class="button-primary" value="Verify" />
|
24 |
+
<input type="button" name="uaf_api_key_generate" id="uaf_api_key_generate" class="button-primary" value="Generate Free Lite / Test API Key" onclick="uaf_lite_api_key_generate();" />
|
25 |
+
<a href="https://dineshkarki.com.np/use-any-font/api-key" target="_blank" class="button-primary">Get Premium Key</a>
|
26 |
+
|
27 |
<br/> <br/>
|
28 |
Use Any Font need API key to upload the font. You can get the premium key from <a href="https://dineshkarki.com.np/use-any-font/api-key" target="_blank">here</a>. You can also generate Lite / Test API key from button above. <strong>Note : </strong> Lite / Test API only allow single font conversion.
|
29 |
<br/>
|
includes/uaf_trigger_actions.php
ADDED
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
if (isset($_POST['submit-uaf-font-php'])){
|
3 |
+
$fontUploadResponse = uaf_upload_font_to_server();
|
4 |
+
if ($fontUploadResponse['status'] == 'success'){
|
5 |
+
$fontUploadResponse = uaf_save_font_files($_POST['font_name'], $fontUploadResponse['body']);
|
6 |
+
}
|
7 |
+
$operationStatus = $fontUploadResponse['status'];
|
8 |
+
$operationMsg = $fontUploadResponse['body'];
|
9 |
+
}
|
10 |
+
|
11 |
+
if (isset($_POST['submit-uaf-font-js'])){
|
12 |
+
$fontSaveResponse = uaf_save_font_files($_POST['font_name'], $_POST['convert_response']);
|
13 |
+
$operationStatus = $fontSaveResponse['status'];
|
14 |
+
$operationMsg = $fontSaveResponse['body'];
|
15 |
+
}
|
16 |
+
|
17 |
+
if (isset($_POST['ucf_api_key_submit'])){
|
18 |
+
$activationRetun = uaf_key_activate();
|
19 |
+
$operationMsg = $activationRetun['body'];
|
20 |
+
$operationStatus = $activationRetun['status'];
|
21 |
+
}
|
22 |
+
|
23 |
+
if (isset($_POST['ucf_api_key_remove'])){
|
24 |
+
$deactivationRetun = uaf_key_deactivate();
|
25 |
+
$operationMsg = $deactivationRetun['body'];
|
26 |
+
$operationStatus = $deactivationRetun['status'];
|
27 |
+
}
|
28 |
+
|
29 |
+
if (isset($_GET['delete_font_key'])):
|
30 |
+
$fontDeleteRetun = uaf_delete_font();
|
31 |
+
$operationMsg = $fontDeleteRetun['body'];
|
32 |
+
$operationStatus = $fontDeleteRetun['status'];
|
33 |
+
endif;
|
34 |
+
|
35 |
+
if (isset($_POST['submit-uaf-settings'])){
|
36 |
+
uaf_save_settings();
|
37 |
+
$operationMsg = 'Settings Saved';
|
38 |
+
$operationStatus = 'updated';
|
39 |
+
}
|
40 |
+
|
41 |
+
if (isset($_POST['submit-uaf-implement'])){
|
42 |
+
$fontAssignReturn = uaf_save_font_assign();
|
43 |
+
$operationMsg = $fontAssignReturn['body'];
|
44 |
+
$operationStatus = $fontAssignReturn['status'];
|
45 |
+
}
|
46 |
+
|
47 |
+
if (isset($_GET['delete_implement_key'])):
|
48 |
+
$fontAssignDeleteReturn = uaf_delete_font_assign();
|
49 |
+
$operationMsg = $fontAssignDeleteReturn['body'];
|
50 |
+
$operationStatus = $fontAssignDeleteReturn['status'];
|
51 |
+
endif;
|
plugin_interface.php
CHANGED
@@ -1,18 +1,5 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
-
$fontUploadResponse = uaf_upload_font_to_server();
|
4 |
-
if ($fontUploadResponse['status'] == 'success'){
|
5 |
-
$fontUploadResponse = uaf_save_font_files($_POST['font_name'], $fontUploadResponse['body']);
|
6 |
-
}
|
7 |
-
$operationStatus = $fontUploadResponse['status'];
|
8 |
-
$operationMsg = $fontUploadResponse['body'];
|
9 |
-
}
|
10 |
-
|
11 |
-
if (isset($_POST['submit-uaf-font-js'])){
|
12 |
-
$fontSaveResponse = uaf_save_font_files($_POST['font_name'], $_POST['convert_response']);
|
13 |
-
$operationStatus = $fontSaveResponse['status'];
|
14 |
-
$operationMsg = $fontSaveResponse['body'];
|
15 |
-
}
|
16 |
|
17 |
add_action('admin_menu', 'uaf_create_menu');
|
18 |
add_action("admin_print_styles", 'adminCsslibs');
|
1 |
<?php
|
2 |
+
include('includes/uaf_trigger_actions.php');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
|
4 |
add_action('admin_menu', 'uaf_create_menu');
|
5 |
add_action("admin_print_styles", 'adminCsslibs');
|
readme.txt
CHANGED
@@ -2,8 +2,8 @@
|
|
2 |
Contributors: dnesscarkey
|
3 |
Tags: custom fonts, font embed, font uploader, typography, install font
|
4 |
Requires at least: 3.0
|
5 |
-
Tested up to: 5.4.
|
6 |
-
Stable tag: 5.11
|
7 |
|
8 |
Embed any custom font using font uploader and assign to elements. Upload font in 1 format and other needed formats are auto converted even woff2.
|
9 |
|
@@ -20,16 +20,17 @@ Use Any Font gives you freedom to intall custom fonts in your wordpress website.
|
|
20 |
* Support all major browsers including IE, Edge, Firefox, Chrome, Safari, IOS, Andriod, Opera and more.
|
21 |
* Font conversion within the font uploader and quick font assign interface. You can select pre defined html tags or assign it to custom css.
|
22 |
* Use uploaded custom fonts directly from Wordpress Editor, Gutenberg Editor,
|
23 |
-
<a href="http://www.elegantthemes.com/affiliates/idevaffiliate.php?id=39880" target="_blank">Divi Builder</a>,
|
24 |
-
<a href="https://wordpress.org/plugins/siteorigin-panels/" target="_blank">Site Origin Page Buider</a>,
|
25 |
-
<a href="https://wordpress.org/plugins/elementor/" target="_blank">Elementor Page Builder</a>,
|
26 |
-
<a href="https://www.wpbeaverbuilder.com/?fla=2054&campaign=use-any-font" target="_blank">Beaver Builder</a>,
|
27 |
-
<a href="https://themify.me/member/aff/go/dnesscarkey/?cr=aHR0cHM6Ly90aGVtaWZ5Lm1lL2J1aWxkZXI=" target="_blank">Themify Builder</a>,
|
28 |
-
<a href="https://oxygenbuilder.com/" target="_blank">Oxygen Builder</a>,
|
29 |
-
<a href="https://wordpress.org/themes/generatepress/" target="_blank">Generate Press</a>,
|
30 |
-
<a href="https://wordpress.org/themes/astra/" target="_blank">Astra Theme</a>,
|
31 |
-
<a href="https://wordpress.org/themes/oceanwp/" target="_blank">Ocean WP Theme</a>,
|
32 |
-
<a href="https://bit.ly/3auJKzt" target="_blank">Revolution Slider</a>,
|
|
|
33 |
and any visual builder using the class.
|
34 |
* Custom fonts uploaded can be directly used from Theme options panel for major themeforest themes like <a href="https://bit.ly/3auJKzt" target="_blank">Avada, X Theme, Flatsome, Salient, Porto, Shopkeeper, Oshine, WPLMS Learning Management System Theme, KLEO, WoodMart, ListingPro, SimpleMag, ROSA 1, 907, Voice, Grand Restaurant, LeadEngine, Service Finder, MagPlus, Hostiko, Adifier, Puca, GreenMart, Reco, VidoRev, Halena and many more known themes. (1000+). Check out full list here.</a>
|
35 |
* Supports font format including ttf, otf, woff but you only need to upload font in 1 format. Other required fonts are converted automatically by our font convertor.
|
@@ -142,6 +143,9 @@ Please do write us after integration and we will add it in our supported list.
|
|
142 |
|
143 |
== Changelog ==
|
144 |
|
|
|
|
|
|
|
145 |
= 5.11 =
|
146 |
* Added Font demo in admin panel
|
147 |
* Added extra pre defined elements.
|
@@ -151,7 +155,7 @@ Please do write us after integration and we will add it in our supported list.
|
|
151 |
* Added support for Revolution Slider. Now you can select font family directly from Revolution slider to assign font.
|
152 |
|
153 |
= 5.9 =
|
154 |
-
* Support for all themes that uses Redux and kirki framework. Full list <a href="https://bit.ly/3auJKzt" target="_blank">here</a>.
|
155 |
|
156 |
= 5.6 =
|
157 |
* Added support for Generate Press, Astra and Ocean WP Theme.
|
2 |
Contributors: dnesscarkey
|
3 |
Tags: custom fonts, font embed, font uploader, typography, install font
|
4 |
Requires at least: 3.0
|
5 |
+
Tested up to: 5.4.2
|
6 |
+
Stable tag: 5.11.1
|
7 |
|
8 |
Embed any custom font using font uploader and assign to elements. Upload font in 1 format and other needed formats are auto converted even woff2.
|
9 |
|
20 |
* Support all major browsers including IE, Edge, Firefox, Chrome, Safari, IOS, Andriod, Opera and more.
|
21 |
* Font conversion within the font uploader and quick font assign interface. You can select pre defined html tags or assign it to custom css.
|
22 |
* Use uploaded custom fonts directly from Wordpress Editor, Gutenberg Editor,
|
23 |
+
<a href="http://www.elegantthemes.com/affiliates/idevaffiliate.php?id=39880" title="custom font in Divi builder" target="_blank">Divi Builder</a>,
|
24 |
+
<a href="https://wordpress.org/plugins/siteorigin-panels/" title="Custom font in Site Origin Page Buider" target="_blank">Site Origin Page Buider</a>,
|
25 |
+
<a href="https://wordpress.org/plugins/elementor/" title="Elementor Page Builder" target="_blank">Elementor Page Builder</a>,
|
26 |
+
<a href="https://www.wpbeaverbuilder.com/?fla=2054&campaign=use-any-font" title="custom font in Beaver Builder" target="_blank">Beaver Builder</a>,
|
27 |
+
<a href="https://themify.me/member/aff/go/dnesscarkey/?cr=aHR0cHM6Ly90aGVtaWZ5Lm1lL2J1aWxkZXI=" title="custom font in Themify Builder" target="_blank">Themify Builder</a>,
|
28 |
+
<a href="https://oxygenbuilder.com/" title="custom font in Oxygen Builder" target="_blank">Oxygen Builder</a>,
|
29 |
+
<a href="https://wordpress.org/themes/generatepress/" title="custom font in Generate Press" target="_blank">Generate Press</a>,
|
30 |
+
<a href="https://wordpress.org/themes/astra/" title="custom font in Astra Theme" target="_blank">Astra Theme</a>,
|
31 |
+
<a href="https://wordpress.org/themes/oceanwp/" title="custom font in Revolution Slider" target="_blank">Ocean WP Theme</a>,
|
32 |
+
<a href="https://bit.ly/3auJKzt" title="custom font in Revolution Slider" target="_blank">Revolution Slider</a>,
|
33 |
+
<a href="https://wpbakery.com/" title="custom font in WPBakery Page Builder" target="_blank">WPBakery Page Builder ( Js Composer )</a>,
|
34 |
and any visual builder using the class.
|
35 |
* Custom fonts uploaded can be directly used from Theme options panel for major themeforest themes like <a href="https://bit.ly/3auJKzt" target="_blank">Avada, X Theme, Flatsome, Salient, Porto, Shopkeeper, Oshine, WPLMS Learning Management System Theme, KLEO, WoodMart, ListingPro, SimpleMag, ROSA 1, 907, Voice, Grand Restaurant, LeadEngine, Service Finder, MagPlus, Hostiko, Adifier, Puca, GreenMart, Reco, VidoRev, Halena and many more known themes. (1000+). Check out full list here.</a>
|
36 |
* Supports font format including ttf, otf, woff but you only need to upload font in 1 format. Other required fonts are converted automatically by our font convertor.
|
143 |
|
144 |
== Changelog ==
|
145 |
|
146 |
+
= 5.11.1 =
|
147 |
+
* Added support for WPBakery Page Builder (Js Composer). Adds custom uploaded fonts to WPBakery Typography list.
|
148 |
+
|
149 |
= 5.11 =
|
150 |
* Added Font demo in admin panel
|
151 |
* Added extra pre defined elements.
|
155 |
* Added support for Revolution Slider. Now you can select font family directly from Revolution slider to assign font.
|
156 |
|
157 |
= 5.9 =
|
158 |
+
* Support for all themes that uses Redux and kirki framework. Full list <a href="https://bit.ly/3auJKzt" target="_blank">here</a>. Custom font now available in Theme Option's typography list that are using these frameworks.
|
159 |
|
160 |
= 5.6 =
|
161 |
* Added support for Generate Press, Astra and Ocean WP Theme.
|
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: Dnesscarkey
|
7 |
-
Version: 5.11
|
8 |
Author URI: https://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: Dnesscarkey
|
7 |
+
Version: 5.11.1
|
8 |
Author URI: https://www.dineshkarki.com.np
|
9 |
*/
|
10 |
|