Skip to content

Commit

Permalink
Issue #31 - Default tag to div to make the example work
Browse files Browse the repository at this point in the history
  • Loading branch information
bobbingwide committed Jan 8, 2020
1 parent c16a7b8 commit ed10191
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion blocks/oik-address/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,12 @@ export default registerBlockType(
attributes: {
tag: {
type: 'string',
default: ''
default: 'div',
}


},
example: {
},

supports: {
Expand Down
1 change: 1 addition & 0 deletions oik-blocks.php
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,7 @@ function oik_blocks_fields_featured_image_not_set() {
function oik_blocks_dynamic_block_address( $attributes ) {
$html = oik_blocks_check_server_func( "shortcodes/oik-address.php", "oik", "bw_address" );
if ( null === $html ) {
$attributes['tag'] = bw_array_get( $attributes, 'tag', 'div');
$html = bw_address( $attributes, null, null );
}
return $html;
Expand Down

0 comments on commit ed10191

Please sign in to comment.