Skip to content

Commit

Permalink
FIX: update field button
Browse files Browse the repository at this point in the history
  • Loading branch information
ihslimn committed Sep 17, 2024
1 parent 0522a44 commit 6377e24
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 5 deletions.
2 changes: 1 addition & 1 deletion assets/js/blocks.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions assets/js/src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,20 @@ function registerBlocks() {
registerUpdateFieldButton();
}

window.isJFBUF_Button_Registered = false;

addFilter(
'jet.fb.register.fields.handler',
'jfb-update-field/block-attributes',
registerVariation
)

function registerVariation( block ) {
if ( ! window.isJFBUF_Button_Registered ) {
window.isJFBUF_Button_Registered;
registerUpdateFieldButton();
}
return block;
}

document.addEventListener( 'jet-form-builder-initialized', registerBlocks );
6 changes: 2 additions & 4 deletions jet-form-builder-update-field.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Plugin Name: JetFormBuilder - Update Fields
* Plugin URI:
* Description:
* Version: 1.1.1
* Version: 1.1.2
* Author:
* Author URI:
* Text Domain:
Expand All @@ -27,13 +27,11 @@ class Plugin {

private static $instance = null;

private $post = 0;

public $db = null;

public $storage = null;

private $version = '1.1.1';
private $version = '1.1.2';

public function __construct() {
add_action( 'plugins_loaded', array( $this, 'jec_init' ) );
Expand Down

0 comments on commit 6377e24

Please sign in to comment.