Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build/index.asset.php
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?php return array('dependencies' => array('lodash', 'react', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-core-data', 'wp-data', 'wp-dom-ready', 'wp-editor', 'wp-element', 'wp-i18n'), 'version' => 'e2f91444479949d10e78');
<?php return array('dependencies' => array('lodash', 'react', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-core-data', 'wp-data', 'wp-dom-ready', 'wp-editor', 'wp-element', 'wp-i18n'), 'version' => 'cbfa565b7b186d282a7c');
2 changes: 1 addition & 1 deletion build/index.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions gutena-forms.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Description: Gutena Forms is the easiest way to create forms inside the WordPress block editor. Our plugin does not use jQuery and is lightweight, so you can rest assured that it won’t slow down your website. Instead, it allows you to quickly and easily create custom forms right inside the block editor.
* Requires at least: 6.5
* Requires PHP: 5.6
* Version: 1.2.1
* Version: 1.2.2
* Author: ExpressTech
* Author URI: https://expresstech.io
* License: GPL-2.0-or-later
Expand Down Expand Up @@ -47,7 +47,7 @@
* Plugin version.
*/
if ( ! defined( 'GUTENA_FORMS_VERSION' ) ) {
define( 'GUTENA_FORMS_VERSION', '1.2.1' );
define( 'GUTENA_FORMS_VERSION', '1.2.2' );
}

if ( ! function_exists( 'is_gutena_forms_pro' ) ) {
Expand Down
6 changes: 4 additions & 2 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Contributors: expresstech, randhirexpresstech
Tags: form, block, contact form, form block, forms
Tested up to: 6.5
Stable tag: 1.2.1
Stable tag: 1.2.2
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Expand Down Expand Up @@ -127,8 +127,10 @@ If you like this plugin, consider exploring our other themes and plugins:

== Changelog ==

= 1.2.1 | 09th April 2024 =
= 1.2.2 | 11th April 2024 =
* Fixed: Font family settings

= 1.2.1 | 09th April 2024 =
* Added: Try Demo link in readme file

= 1.2.0 | 13th March 2024 =
Expand Down
16 changes: 8 additions & 8 deletions src/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,20 +146,20 @@ export default function Edit( props ) {
return {};
}

if ( Array.isArray( fontFamilies ) ) {
fontFamilies = fontFamilies.reduce( ( o, key ) => Object.assign( o, { [ key?.slug ]: key?.fontFamily } ), {} );
} else {
fontFamilies = Object.keys( fontFamilies ).reduce( ( fontFamiliesObj, fkey ) => Object.assign( fontFamiliesObj, fontFamilies[ fkey ].reduce( ( o, key ) => Object.assign( o, { [ key?.slug ]: key?.fontFamily } ), {} ) ), {} );
if ( ! Array.isArray( fontFamilies ) ) {
/** https://github.com/WordPress/gutenberg/pull/59846 **/
const { theme, custom } = fontFamilies;
fontFamilies = theme !== undefined ? theme : [];
if ( custom !== undefined ) {
fontFamilies = [ ...fontFamilies, ...custom ];
}
}

if ( gfIsEmpty( fontFamilies ) || 0 == fontFamilies.length ) {
return [];
}

return Object.keys( fontFamilies ).map( fontFamily => ( {
fontFamily: fontFamily,
name: slugToName( fontFamily )
} ) );
return fontFamilies;
}

const [ fontFamilies ] = useSettings( 'typography.fontFamilies' );
Expand Down