Skip to content

Commit

Permalink
fix PHP warnings loading PDF fonts
Browse files Browse the repository at this point in the history
  • Loading branch information
RensTillmann committed Jan 21, 2022
1 parent 8584891 commit 720aea3
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 5 deletions.
4 changes: 4 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 4 additions & 0 deletions src/docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/includes/extensions/listings/listings.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
),
)
);
Expand Down
8 changes: 4 additions & 4 deletions src/super-forms.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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';
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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)
),
)
);
Expand Down

0 comments on commit 720aea3

Please sign in to comment.