Version Description
- Improvement: Compatibility with Spectra editor.
Download this release
Release Info
Developer | brainstormworg |
Plugin | Custom Fonts |
Version | 1.3.6 |
Comparing to | |
See all releases |
Code changes from version 1.3.5 to 1.3.6
- classes/class-bsf-custom-fonts-render.php +29 -0
- custom-fonts.php +2 -2
- readme.txt +5 -2
classes/class-bsf-custom-fonts-render.php
CHANGED
@@ -119,6 +119,9 @@ if ( ! class_exists( 'Bsf_Custom_Fonts_Render' ) ) :
|
|
119 |
// add Custom Font list into Astra customizer.
|
120 |
add_filter( 'astra_system_fonts', array( $this, 'add_custom_fonts_astra_customizer' ) );
|
121 |
|
|
|
|
|
|
|
122 |
// Beaver builder theme customizer, beaver buidler page builder.
|
123 |
add_filter( 'fl_theme_system_fonts', array( $this, 'bb_custom_fonts' ) );
|
124 |
add_filter( 'fl_builder_font_families_system', array( $this, 'bb_custom_fonts' ) );
|
@@ -273,6 +276,32 @@ if ( ! class_exists( 'Bsf_Custom_Fonts_Render' ) ) :
|
|
273 |
return $fonts_arr;
|
274 |
}
|
275 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
276 |
/**
|
277 |
* Get fonts
|
278 |
*
|
119 |
// add Custom Font list into Astra customizer.
|
120 |
add_filter( 'astra_system_fonts', array( $this, 'add_custom_fonts_astra_customizer' ) );
|
121 |
|
122 |
+
// add Custom Font list into Spectra editor.
|
123 |
+
add_filter( 'spectra_system_fonts', array( $this, 'add_custom_fonts_spectra' ) );
|
124 |
+
|
125 |
// Beaver builder theme customizer, beaver buidler page builder.
|
126 |
add_filter( 'fl_theme_system_fonts', array( $this, 'bb_custom_fonts' ) );
|
127 |
add_filter( 'fl_builder_font_families_system', array( $this, 'bb_custom_fonts' ) );
|
276 |
return $fonts_arr;
|
277 |
}
|
278 |
|
279 |
+
/**
|
280 |
+
* Add Custom Font list into Spectra editor.
|
281 |
+
*
|
282 |
+
* @since 1.3.6
|
283 |
+
* @param string $fonts_arr Array of System Fonts.
|
284 |
+
* @return array $fonts_arr modified array with Custom Fonts.
|
285 |
+
*/
|
286 |
+
public function add_custom_fonts_spectra( $fonts_arr ) {
|
287 |
+
|
288 |
+
$fonts = Bsf_Custom_Fonts_Taxonomy::get_fonts();
|
289 |
+
|
290 |
+
foreach ( $fonts as $font => $values ) {
|
291 |
+
$custom_fonts_weights = array( 'Default' );
|
292 |
+
foreach ( $values as $key => $value ) {
|
293 |
+
if ( strpos( $key, 'weight' ) !== false ) {
|
294 |
+
array_push( $custom_fonts_weights, $value );
|
295 |
+
}
|
296 |
+
}
|
297 |
+
$fonts_arr[ $font ] = array(
|
298 |
+
'weight' => $custom_fonts_weights,
|
299 |
+
);
|
300 |
+
}
|
301 |
+
|
302 |
+
return $fonts_arr;
|
303 |
+
}
|
304 |
+
|
305 |
/**
|
306 |
* Get fonts
|
307 |
*
|
custom-fonts.php
CHANGED
@@ -6,7 +6,7 @@
|
|
6 |
* Author: Brainstorm Force
|
7 |
* Author URI: http://www.brainstormforce.com
|
8 |
* Text Domain: custom-fonts
|
9 |
-
* Version: 1.3.
|
10 |
*
|
11 |
* @package Bsf_Custom_Fonts
|
12 |
*/
|
@@ -25,7 +25,7 @@ define( 'BSF_CUSTOM_FONTS_FILE', __FILE__ );
|
|
25 |
define( 'BSF_CUSTOM_FONTS_BASE', plugin_basename( BSF_CUSTOM_FONTS_FILE ) );
|
26 |
define( 'BSF_CUSTOM_FONTS_DIR', plugin_dir_path( BSF_CUSTOM_FONTS_FILE ) );
|
27 |
define( 'BSF_CUSTOM_FONTS_URI', plugins_url( '/', BSF_CUSTOM_FONTS_FILE ) );
|
28 |
-
define( 'BSF_CUSTOM_FONTS_VER', '1.3.
|
29 |
|
30 |
/**
|
31 |
* BSF Custom Fonts
|
6 |
* Author: Brainstorm Force
|
7 |
* Author URI: http://www.brainstormforce.com
|
8 |
* Text Domain: custom-fonts
|
9 |
+
* Version: 1.3.6
|
10 |
*
|
11 |
* @package Bsf_Custom_Fonts
|
12 |
*/
|
25 |
define( 'BSF_CUSTOM_FONTS_BASE', plugin_basename( BSF_CUSTOM_FONTS_FILE ) );
|
26 |
define( 'BSF_CUSTOM_FONTS_DIR', plugin_dir_path( BSF_CUSTOM_FONTS_FILE ) );
|
27 |
define( 'BSF_CUSTOM_FONTS_URI', plugins_url( '/', BSF_CUSTOM_FONTS_FILE ) );
|
28 |
+
define( 'BSF_CUSTOM_FONTS_VER', '1.3.6' );
|
29 |
|
30 |
/**
|
31 |
* BSF Custom Fonts
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: brainstormforce
|
|
3 |
Donate link: https://www.paypal.me/BrainstormForce
|
4 |
Tags: Beaver Builder, Elementor, Astra, woff2, woff, ttf, svg, eot, otf, Custom Fonts, Font, Typography
|
5 |
Requires at least: 4.4
|
6 |
-
Tested up to: 6.0
|
7 |
-
Stable tag: 1.3.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -42,6 +42,9 @@ If you're not using any of the supported plugins and theme, you can write the cu
|
|
42 |
|
43 |
|
44 |
== Changelog ==
|
|
|
|
|
|
|
45 |
= 1.3.5 =
|
46 |
- Fix: Inherit font option not working as expected for some customizer options.
|
47 |
|
3 |
Donate link: https://www.paypal.me/BrainstormForce
|
4 |
Tags: Beaver Builder, Elementor, Astra, woff2, woff, ttf, svg, eot, otf, Custom Fonts, Font, Typography
|
5 |
Requires at least: 4.4
|
6 |
+
Tested up to: 6.0.1
|
7 |
+
Stable tag: 1.3.6
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
42 |
|
43 |
|
44 |
== Changelog ==
|
45 |
+
= 1.3.6 =
|
46 |
+
- Improvement: Compatibility with Spectra editor.
|
47 |
+
|
48 |
= 1.3.5 =
|
49 |
- Fix: Inherit font option not working as expected for some customizer options.
|
50 |
|