From 720aea35bcefe56e1495111b77922cf5fde42b0f Mon Sep 17 00:00:00 2001 From: Rens Date: Fri, 21 Jan 2022 22:56:51 +0100 Subject: [PATCH] fix PHP warnings loading PDF fonts --- docs/changelog.md | 4 ++++ src/docs/changelog.md | 4 ++++ src/includes/extensions/listings/listings.php | 2 +- src/super-forms.php | 8 ++++---- 4 files changed, 13 insertions(+), 5 deletions(-) diff --git a/docs/changelog.md b/docs/changelog.md index 7050c21b..5e39d16e 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -8,6 +8,10 @@ - [PDF Generator Add-on](https://renstillmann.github.io/super-forms/#/pdf-generator-add-on) +## Jan 21, 2022 - Version 6.0.1 + +- **Fix:** PHP Warning when calling `file_get_contents()` to load PDF generator fonts + ## Jan 20, 2022 - Version 6.0.0 - **Added:** `TinyMCE` element, allows you to add HTML by using the WordPress rich text editor. diff --git a/src/docs/changelog.md b/src/docs/changelog.md index 7050c21b..5e39d16e 100644 --- a/src/docs/changelog.md +++ b/src/docs/changelog.md @@ -8,6 +8,10 @@ - [PDF Generator Add-on](https://renstillmann.github.io/super-forms/#/pdf-generator-add-on) +## Jan 21, 2022 - Version 6.0.1 + +- **Fix:** PHP Warning when calling `file_get_contents()` to load PDF generator fonts + ## Jan 20, 2022 - Version 6.0.0 - **Added:** `TinyMCE` element, allows you to add HTML by using the WordPress rich text editor. diff --git a/src/includes/extensions/listings/listings.php b/src/includes/extensions/listings/listings.php index e3fba458..6e638358 100644 --- a/src/includes/extensions/listings/listings.php +++ b/src/includes/extensions/listings/listings.php @@ -1441,7 +1441,7 @@ public static function super_listings_func( $atts ) { 'ga_tracking' => ( !isset( $settings['form_ga_tracking'] ) ? "" : $settings['form_ga_tracking'] ), 'super_int_phone_utils' => SUPER_PLUGIN_FILE . 'assets/js/frontend/int-phone-utils.js', 'fonts' => array( - 'NotoSans' => json_decode(file_get_contents(SUPER_PLUGIN_FILE . 'includes/extensions/pdf-generator/fonts.json'), true) + 'NotoSans' => json_decode(file_get_contents(SUPER_PLUGIN_DIR . '/includes/extensions/pdf-generator/fonts.json'), true) ), ) ); diff --git a/src/super-forms.php b/src/super-forms.php index 75882ce8..466a3d6d 100644 --- a/src/super-forms.php +++ b/src/super-forms.php @@ -11,7 +11,7 @@ * @wordpress-plugin * Plugin Name: Super Forms - Drag & Drop Form Builder * Description: The most advanced, flexible and easy to use form builder for WordPress! - * Version: 6.0.0 + * Version: 6.0.1 * Plugin URI: http://f4d.nl/super-forms * Author URI: http://f4d.nl/super-forms * Author: feeling4design @@ -43,7 +43,7 @@ final class SUPER_Forms { * * @since 1.0.0 */ - public $version = '6.0.0'; + public $version = '6.0.1'; public $slug = 'super-forms'; public $apiUrl = 'https://api.super-forms.com/'; public $apiVersion = 'v1'; @@ -1397,7 +1397,7 @@ public static function enqueue_element_scripts( $settings=array(), $ajax=false, 'ga_tracking' => ( !isset( $settings['form_ga_tracking'] ) ? "" : $settings['form_ga_tracking'] ), 'super_int_phone_utils' => SUPER_PLUGIN_FILE . 'assets/js/frontend/int-phone-utils.js', 'fonts' => array( - 'NotoSans' => json_decode(file_get_contents(SUPER_PLUGIN_FILE . 'includes/extensions/pdf-generator/fonts.json'), true) + 'NotoSans' => json_decode(file_get_contents(SUPER_PLUGIN_DIR . '/includes/extensions/pdf-generator/fonts.json'), true) ), ); wp_localize_script($handle, $name, $i18n); @@ -1941,7 +1941,7 @@ public function enqueue_message_scripts() { 'ga_tracking' => ( !isset( $global_settings['form_ga_tracking'] ) ? "" : $global_settings['form_ga_tracking'] ), 'super_int_phone_utils' => SUPER_PLUGIN_FILE . 'assets/js/frontend/int-phone-utils.js', 'fonts' => array( - 'NotoSans' => json_decode(file_get_contents(SUPER_PLUGIN_FILE . 'includes/extensions/pdf-generator/fonts.json'), true) + 'NotoSans' => json_decode(file_get_contents(SUPER_PLUGIN_DIR . '/includes/extensions/pdf-generator/fonts.json'), true) ), ) );