Skip to content

Commit

Permalink
Ensure bw_contact_field shortcode is registered #207
Browse files Browse the repository at this point in the history
  • Loading branch information
bobbingwide committed Sep 6, 2022
1 parent d5c9ef4 commit 18b53f7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion oik.php
Original file line number Diff line number Diff line change
Expand Up @@ -700,7 +700,8 @@ function oik_dynamic_block_contact_form( $attributes ) {
$html = \oik\oik_blocks\oik_blocks_check_server_func( 'shortcodes/oik-contact-form.php', 'oik', 'bw_contact_form' );
if ( ! $html ) {
if ( did_action( "oik_loaded" ) ) {
$html = bw_contact_form( $attributes );
bw_add_shortcode( "bw_contact_field", "bw_contact_field", oik_path( "shortcodes/oik-contact-field.php" ), false );
$html = bw_contact_form( $attributes );
} else {
$html="The Contact form block requires the oik plugin.";
}
Expand Down

0 comments on commit 18b53f7

Please sign in to comment.