Use Any Font - Version 6.2.6

Version Description

  • Removed use of PHP uploader.
Download this release

Release Info

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

Code changes from version 6.2.5 to 6.2.6

includes/functions/uaf_font_functions.php CHANGED
@@ -87,55 +87,6 @@ function uaf_save_font_files($font_name, $font_weight, $font_style, $convertResp
87
  return $fontUploadFinalResponse;
88
  }
89
 
90
- /* NOT TO BE USED TILL API ACCEPTS FILES IN BINARY
91
- function uaf_upload_font_to_server(){
92
- $font_file_details = pathinfo($_FILES['font_file']['name']);
93
- $file_extension = strtolower($font_file_details['extension']);
94
- $font_size = $_FILES['font_file']['size'];
95
-
96
- if ((in_array($file_extension, $GLOBALS['uaf_fix_settings']['allowedFontFormats'])) && ($font_size <= uaf_max_upload_size_for_php(true))){
97
- @set_time_limit(0);
98
- $ch = curl_init(); // Unable to send file to API endpoint in $_FILES using wp_remote_post, so using CURL
99
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
100
- curl_setopt($ch, CURLOPT_URL, $GLOBALS['uaf_user_settings']['uaf_server_url'].'/uaf_convertor/convert.php');
101
- curl_setopt($ch, CURLOPT_POST, true);
102
- curl_setopt($ch, CURLOPT_SAFE_UPLOAD, true);
103
- $post = array(
104
- 'fontfile' => new CURLFile($_FILES['font_file']['tmp_name']),
105
- 'fontfileext' => pathinfo($_FILES['font_file']['name'], PATHINFO_EXTENSION),
106
- 'api_key' => $GLOBALS['uaf_user_settings']['uaf_api_key'],
107
- 'url' => sanitize_url($_POST['url']),
108
- 'font_count' => sanitize_key($_POST['font_count'])
109
- );
110
- curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
111
- $convertResponse = curl_exec($ch); // Unable to send file to API endpoint in $_FILES using wp_remote_post, so using CURL
112
- if(curl_errno($ch)) {
113
- $fontUploadResponse['status'] = 'error';
114
- $fontUploadResponse['body'] = 'Error: ' . curl_error($ch);
115
- } else {
116
- $CrulStatinfo = curl_getinfo($ch);
117
- if ($CrulStatinfo['http_code'] == '200'):
118
- $convertResponseArray = json_decode($convertResponse, true);
119
- if ($convertResponseArray['global']['status'] == 'error'):
120
- $fontUploadResponse['status'] = 'error';
121
- $fontUploadResponse['body'] = $convertResponseArray['global']['msg'];
122
- else:
123
- $fontUploadResponse['status'] = 'success';
124
- $fontUploadResponse['body'] = $convertResponse;
125
- endif;
126
- else:
127
- $fontUploadResponse['status'] = 'error';
128
- $fontUploadResponse['body'] = $convertResponse;
129
- endif;
130
- }
131
- } else {
132
- $fontUploadResponse['status'] = 'error';
133
- $fontUploadResponse['body'] = 'Only '.join(", ",$GLOBALS['uaf_fix_settings']['allowedFontFormats']).' format and font less than '.uaf_max_upload_size_for_php().' MB accepted';
134
- }
135
- return $fontUploadResponse;
136
- }
137
- */
138
-
139
  function uaf_path_details(){
140
  $uaf_upload = wp_upload_dir();
141
  $uaf_upload_dir = $uaf_upload['basedir'];
87
  return $fontUploadFinalResponse;
88
  }
89
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
90
  function uaf_path_details(){
91
  $uaf_upload = wp_upload_dir();
92
  $uaf_upload_dir = $uaf_upload['basedir'];
includes/uaf_config.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  if ( ! defined( 'ABSPATH' ) ) exit;
3
 
4
- $GLOBALS['uaf_current_version'] = '6.2.5';
5
 
6
 
7
  $GLOBALS['uaf_fix_settings'] = array(
1
  <?php
2
  if ( ! defined( 'ABSPATH' ) ) exit;
3
 
4
+ $GLOBALS['uaf_current_version'] = '6.2.6';
5
 
6
 
7
  $GLOBALS['uaf_fix_settings'] = array(
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: dnesscarkey
3
  Tags: custom fonts, font embed, font uploader, typography, install font
4
  Requires at least: 3.0
5
  Tested up to: 5.9
6
- Stable tag: 6.2.5
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
 
@@ -148,7 +148,7 @@ Please do write us after integration and we will add it in our supported list.
148
 
149
  == Changelog ==
150
 
151
- = 6.2.5 =
152
  * Removed use of PHP uploader.
153
 
154
  = 6.2.4 =
3
  Tags: custom fonts, font embed, font uploader, typography, install font
4
  Requires at least: 3.0
5
  Tested up to: 5.9
6
+ Stable tag: 6.2.6
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
 
148
 
149
  == Changelog ==
150
 
151
+ = 6.2.6 =
152
  * Removed use of PHP uploader.
153
 
154
  = 6.2.4 =
use-any-font.php CHANGED
@@ -5,7 +5,7 @@ Plugin Name: Use Any Font
5
  Plugin URI: https://dineshkarki.com.np/use-any-font
6
  Description: Embed any font in your website
7
  Author: Dnesscarkey
8
- Version: 6.2.5
9
  Author URI: https://dineshkarki.com.np/use-any-font
10
  */
11
 
5
  Plugin URI: https://dineshkarki.com.np/use-any-font
6
  Description: Embed any font in your website
7
  Author: Dnesscarkey
8
+ Version: 6.2.6
9
  Author URI: https://dineshkarki.com.np/use-any-font
10
  */
11