Skip to content

Commit

Permalink
Create RegisterSingleField.php
Browse files Browse the repository at this point in the history
  • Loading branch information
girafffee committed Mar 25, 2021
1 parent af7b564 commit 52d6d92
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/JetFormBuilder/RegisterSingleField.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?php


namespace JFBCore\JetFormBuilder;



trait RegisterSingleField {

public static function register() {
if ( ! function_exists( 'jet_form_builder' ) ) {
return;
}

add_action( 'jet-form-builder/blocks/register', function ( $manager ) {
$manager->register_block_type( new static() );
} );
}

}

0 comments on commit 52d6d92

Please sign in to comment.