Version Description
- Improvement: Hardened the security of plugin
Download this release
Release Info
Developer | brainstormworg |
Plugin | Custom Fonts |
Version | 1.2.4 |
Comparing to | |
See all releases |
Code changes from version 1.2.3 to 1.2.4
classes/class-bsf-custom-fonts-render.php
CHANGED
@@ -180,7 +180,7 @@ if ( ! class_exists( 'Bsf_Custom_Fonts_Render' ) ) :
|
|
180 |
|
181 |
$fonts = Bsf_Custom_Fonts_Taxonomy::get_fonts();
|
182 |
|
183 |
-
|
184 |
|
185 |
foreach ( $fonts as $font => $links ) {
|
186 |
echo '<option value="' . esc_attr( $font ) . '" ' . selected( $font, $value, false ) . '>' . esc_attr( $font ) . '</option>';
|
180 |
|
181 |
$fonts = Bsf_Custom_Fonts_Taxonomy::get_fonts();
|
182 |
|
183 |
+
echo '<optgroup label="' . esc_attr( 'Custom' ) . '">';
|
184 |
|
185 |
foreach ( $fonts as $font => $links ) {
|
186 |
echo '<option value="' . esc_attr( $font ) . '" ' . selected( $font, $value, false ) . '>' . esc_attr( $font ) . '</option>';
|
classes/class-bsf-custom-fonts.php
CHANGED
@@ -36,10 +36,13 @@ if ( ! class_exists( 'Bsf_Custom_Fonts' ) ) {
|
|
36 |
*/
|
37 |
public function __construct() {
|
38 |
require_once BSF_CUSTOM_FONTS_DIR . 'includes/class-bsf-custom-fonts-taxonomy.php';
|
39 |
-
require_once BSF_CUSTOM_FONTS_DIR . 'includes/class-bsf-custom-fonts-admin.php';
|
40 |
-
|
41 |
require_once BSF_CUSTOM_FONTS_DIR . 'classes/class-bsf-custom-fonts-render.php';
|
42 |
-
|
|
|
|
|
|
|
|
|
|
|
43 |
}
|
44 |
}
|
45 |
|
36 |
*/
|
37 |
public function __construct() {
|
38 |
require_once BSF_CUSTOM_FONTS_DIR . 'includes/class-bsf-custom-fonts-taxonomy.php';
|
|
|
|
|
39 |
require_once BSF_CUSTOM_FONTS_DIR . 'classes/class-bsf-custom-fonts-render.php';
|
40 |
+
|
41 |
+
if ( is_admin() ) {
|
42 |
+
require_once BSF_CUSTOM_FONTS_DIR . 'includes/class-bsf-custom-fonts-admin.php';
|
43 |
+
require_once BSF_CUSTOM_FONTS_DIR . 'classes/class-bsf-custom-fonts-white-label.php';
|
44 |
+
}
|
45 |
+
|
46 |
}
|
47 |
}
|
48 |
|
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.2.
|
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.2.
|
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.2.4
|
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.2.4' );
|
29 |
|
30 |
/**
|
31 |
* BSF Custom Fonts
|
includes/class-bsf-custom-fonts-admin.php
CHANGED
@@ -84,6 +84,7 @@ if ( ! class_exists( 'Bsf_Custom_Fonts_Admin' ) ) :
|
|
84 |
Bsf_Custom_Fonts_Taxonomy::$capability,
|
85 |
'edit-tags.php?taxonomy=' . Bsf_Custom_Fonts_Taxonomy::$register_taxonomy_slug
|
86 |
);
|
|
|
87 |
}
|
88 |
|
89 |
/**
|
@@ -299,8 +300,13 @@ if ( ! class_exists( 'Bsf_Custom_Fonts_Admin' ) ) :
|
|
299 |
* @param int $term_id current term id.
|
300 |
*/
|
301 |
public function save_metadata( $term_id ) {
|
|
|
|
|
|
|
|
|
|
|
302 |
if ( isset( $_POST[ Bsf_Custom_Fonts_Taxonomy::$register_taxonomy_slug ] ) ) {// phpcs:ignore WordPress.Security.NonceVerification.Missing
|
303 |
-
$value = array_map( '
|
304 |
Bsf_Custom_Fonts_Taxonomy::update_font_links( $value, $term_id );
|
305 |
}
|
306 |
}
|
84 |
Bsf_Custom_Fonts_Taxonomy::$capability,
|
85 |
'edit-tags.php?taxonomy=' . Bsf_Custom_Fonts_Taxonomy::$register_taxonomy_slug
|
86 |
);
|
87 |
+
|
88 |
}
|
89 |
|
90 |
/**
|
300 |
* @param int $term_id current term id.
|
301 |
*/
|
302 |
public function save_metadata( $term_id ) {
|
303 |
+
|
304 |
+
if ( ! current_user_can( 'manage_options' ) ) {
|
305 |
+
return;
|
306 |
+
}
|
307 |
+
|
308 |
if ( isset( $_POST[ Bsf_Custom_Fonts_Taxonomy::$register_taxonomy_slug ] ) ) {// phpcs:ignore WordPress.Security.NonceVerification.Missing
|
309 |
+
$value = array_map( 'esc_url', $_POST[ Bsf_Custom_Fonts_Taxonomy::$register_taxonomy_slug ] ); // phpcs:ignore WordPress.Security.NonceVerification.Missing
|
310 |
Bsf_Custom_Fonts_Taxonomy::update_font_links( $value, $term_id );
|
311 |
}
|
312 |
}
|
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: 5.5
|
7 |
-
Stable tag: 1.2.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -43,6 +43,9 @@ If you're not using any of the supported plugins and theme, you can write the cu
|
|
43 |
|
44 |
== Changelog ==
|
45 |
|
|
|
|
|
|
|
46 |
= 1.2.3 =
|
47 |
- Fix: Fixed compatibility with other plugins with respect to the admin notice.
|
48 |
|
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: 5.5.1
|
7 |
+
Stable tag: 1.2.4
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
43 |
|
44 |
== Changelog ==
|
45 |
|
46 |
+
= 1.2.4 =
|
47 |
+
- Improvement: Hardened the security of plugin
|
48 |
+
|
49 |
= 1.2.3 =
|
50 |
- Fix: Fixed compatibility with other plugins with respect to the admin notice.
|
51 |
|