Use Any Font - Version 4.9.1

Version Description

  • Adds custom fonts to typography of Elemenator Page Builder
Download this release

Release Info

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

Code changes from version 4.7.3 to 4.9.1

includes/uaf_editor_setup.php CHANGED
@@ -1,5 +1,4 @@
1
  <?php
2
-
3
  // DEFAULT WORDPRESS EDITOR
4
  function uaf_mce_before_init( $init_array ) {
5
  $theme_advanced_fonts = '';
@@ -22,7 +21,6 @@ function wp_editor_fontsize_filter( $options ) {
22
  }
23
 
24
  // DIVI CUSTOMIZER AND BUILDER
25
-
26
  add_filter('et_websafe_fonts', 'uaf_send_fonts_divi_list',10,2);
27
  function uaf_send_fonts_divi_list($fonts){
28
  $fontsRawData = get_option('uaf_font_data');
@@ -90,4 +88,21 @@ function uaf_send_fonts_x_theme_list($fonts){
90
  endforeach;
91
  endif;
92
  return array_merge($fonts_uaf,$fonts);
93
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  <?php
 
2
  // DEFAULT WORDPRESS EDITOR
3
  function uaf_mce_before_init( $init_array ) {
4
  $theme_advanced_fonts = '';
21
  }
22
 
23
  // DIVI CUSTOMIZER AND BUILDER
 
24
  add_filter('et_websafe_fonts', 'uaf_send_fonts_divi_list',10,2);
25
  function uaf_send_fonts_divi_list($fonts){
26
  $fontsRawData = get_option('uaf_font_data');
88
  endforeach;
89
  endif;
90
  return array_merge($fonts_uaf,$fonts);
91
+ }
92
+
93
+ // ELEMENTOR
94
+ function uaf_send_fonts_elementor_list( $controls_registry ) {
95
+ $fontsRawData = get_option('uaf_font_data');
96
+ $fontsData = json_decode($fontsRawData, true);
97
+ $fonts_uaf = array('Use Any Fonts' => array());
98
+ if (!empty($fontsData)):
99
+ foreach ($fontsData as $key=>$fontData):
100
+ $fonts_uaf[$fontData['font_name']] = 'system';
101
+ endforeach;
102
+ endif;
103
+
104
+ $fonts = $controls_registry->get_control( 'font' )->get_settings( 'options' );
105
+ $new_fonts = array_merge($fonts_uaf, $fonts );
106
+ $controls_registry->get_control( 'font' )->set_settings( 'options', $new_fonts );
107
+ }
108
+ add_action( 'elementor/controls/controls_registered', 'uaf_send_fonts_elementor_list', 10, 1 );
plugin_interface.php CHANGED
@@ -53,7 +53,7 @@ function uaf_client_css() {
53
  $uaf_upload_url = set_url_scheme($uaf_upload['baseurl']);
54
  $uaf_upload_url = $uaf_upload_url . '/useanyfont/';
55
  wp_register_style( 'uaf_client_css', $uaf_upload_url.'uaf.css', array(),get_option('uaf_css_updated_timestamp'));
56
- wp_enqueue_style( 'uaf_client_css' );
57
  }
58
 
59
  function adminjslibs(){
@@ -92,8 +92,8 @@ function uaf_activate(){
92
 
93
  function uaf_update_check() { // MUST CHANGE WITH EVERY VERSION
94
  $uaf_version_check = get_option('uaf_current_version');
95
- if ($uaf_version_check != '4.7.3'):
96
- update_option('uaf_current_version', '4.7.3');
97
  if ($uaf_version_check < 4.0):
98
  uaf_create_folder();
99
  uaf_move_file_to_newPath();
@@ -243,6 +243,11 @@ function uaf_write_css(){
243
  $fh = fopen($uafStyleSheetPath, 'w') or die("Can't open file");
244
  fwrite($fh, $uaf_style);
245
  fclose($fh);
 
 
 
 
 
246
  ob_end_clean();
247
  update_option('uaf_css_updated_timestamp', time()); // Time entry for stylesheet version
248
  }
53
  $uaf_upload_url = set_url_scheme($uaf_upload['baseurl']);
54
  $uaf_upload_url = $uaf_upload_url . '/useanyfont/';
55
  wp_register_style( 'uaf_client_css', $uaf_upload_url.'uaf.css', array(),get_option('uaf_css_updated_timestamp'));
56
+ wp_enqueue_style( 'uaf_client_css' );
57
  }
58
 
59
  function adminjslibs(){
92
 
93
  function uaf_update_check() { // MUST CHANGE WITH EVERY VERSION
94
  $uaf_version_check = get_option('uaf_current_version');
95
+ if ($uaf_version_check != '4.9.1'):
96
+ update_option('uaf_current_version', '4.9.1');
97
  if ($uaf_version_check < 4.0):
98
  uaf_create_folder();
99
  uaf_move_file_to_newPath();
243
  $fh = fopen($uafStyleSheetPath, 'w') or die("Can't open file");
244
  fwrite($fh, $uaf_style);
245
  fclose($fh);
246
+
247
+ $uafStyleSheetPath = $uaf_upload_dir.'/admin-uaf-rtl.css';
248
+ $fh = fopen($uafStyleSheetPath, 'w') or die("Can't open file");
249
+ fwrite($fh, $uaf_style);
250
+ fclose($fh);
251
  ob_end_clean();
252
  update_option('uaf_css_updated_timestamp', time()); // Time entry for stylesheet version
253
  }
readme.txt CHANGED
@@ -2,8 +2,8 @@
2
  Contributors: dnesscarkey
3
  Tags: custom fonts, font embed, font uploader, any font, embed any font, font uploader, css3 font embed, @font-face embed, font conversion, webfont, ttf, opentype
4
  Requires at least: 3.0
5
- Tested up to: 4.7.4
6
- Stable tag: 4.7.3
7
 
8
  Embed any custom font in your website. #1 Rated custom fonts plugin by WPMUDev.org.
9
 
@@ -19,7 +19,7 @@ Use Any Font gives you freedom to use custom fonts in your website. It is not li
19
  * Quick and easy to setup. No css or any rocket science knowledge needed.
20
  * Support all major browsers including IE 6+, Firefox, Chrome, Safari, IOS, Andriod, Opera and more.
21
  * Font conversion within the plugin interface font uploader and quick font assign interface. You can select pre defined html tags or assign it to custom css.
22
- * Use uploaded font directly from Wordpress Editor, <a href="http://www.elegantthemes.com/affiliates/idevaffiliate.php?id=39880" target="_blank">Divi Builder</a>, <a href="https://wordpress.org/plugins/siteorigin-panels/" target="_blank">Site Origin Page Buider</a> and any visual builder using the class.
23
  * Custom fonts uploaded can be directly used from Theme options panel for major themeforest themes like <a href="https://goo.gl/Oy6tvt" target="_blank">Avada, X Theme, Salient, Oshine, KLEO, ShopKeeper, SimpleMag, Porto and many more (540+). Check out full list here.</a>
24
  * Supports font format including ttf, otf, woff. The required fonts are converted automatically.
25
  * Accepts custom font file upto 15 MB.
@@ -108,6 +108,9 @@ No, our server is needed during font conversion only. After that all fonts are s
108
 
109
  == Changelog ==
110
 
 
 
 
111
  = 4.7.3 =
112
  * Adds custom fonts to theme options panel for themes like Avada, Salient, Oshine, X Theme, KLEO. (540+ Themes in total)
113
 
2
  Contributors: dnesscarkey
3
  Tags: custom fonts, font embed, font uploader, any font, embed any font, font uploader, css3 font embed, @font-face embed, font conversion, webfont, ttf, opentype
4
  Requires at least: 3.0
5
+ Tested up to: 4.9.1
6
+ Stable tag: 4.9.1
7
 
8
  Embed any custom font in your website. #1 Rated custom fonts plugin by WPMUDev.org.
9
 
19
  * Quick and easy to setup. No css or any rocket science knowledge needed.
20
  * Support all major browsers including IE 6+, Firefox, Chrome, Safari, IOS, Andriod, Opera and more.
21
  * Font conversion within the plugin interface font uploader and quick font assign interface. You can select pre defined html tags or assign it to custom css.
22
+ * Use uploaded font directly from Wordpress Editor, <a href="http://www.elegantthemes.com/affiliates/idevaffiliate.php?id=39880" target="_blank">Divi Builder</a>, <a href="https://wordpress.org/plugins/siteorigin-panels/" target="_blank">Site Origin Page Buider</a>, <a href="https://wordpress.org/plugins/elementor/" target="_blank">Elementor Page Builder</a> and any visual builder using the class.
23
  * Custom fonts uploaded can be directly used from Theme options panel for major themeforest themes like <a href="https://goo.gl/Oy6tvt" target="_blank">Avada, X Theme, Salient, Oshine, KLEO, ShopKeeper, SimpleMag, Porto and many more (540+). Check out full list here.</a>
24
  * Supports font format including ttf, otf, woff. The required fonts are converted automatically.
25
  * Accepts custom font file upto 15 MB.
108
 
109
  == Changelog ==
110
 
111
+ = 4.9.1 =
112
+ * Adds custom fonts to typography of Elemenator Page Builder
113
+
114
  = 4.7.3 =
115
  * Adds custom fonts to theme options panel for themes like Avada, Salient, Oshine, X Theme, KLEO. (540+ Themes in total)
116
 
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.7.3
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.9.1
8
  Author URI: http://www.dineshkarki.com.np
9
  */
10