Skip to content

Commit

Permalink
Avoid Fatal Uncaught TypeError in Appearance > Site Editor #85
Browse files Browse the repository at this point in the history
  • Loading branch information
bobbingwide committed Sep 11, 2023
1 parent 4cfe9e0 commit c716185
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion includes/navigation-link.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,12 @@ function fizzie_fiddle_nav_atts( $attributes ) {
*/
function fizzie_fiddle_block_context( $attributes, $block ) {
if ( isset( $attributes[ 'className'] ) ) {
$block->context['backgroundColor'] = implode( ' ', $attributes['className'] );
//bw_trace2( $attributes, "attributes");
if ( is_array( $attributes['className'])) {
$block->context['backgroundColor']=implode( ' ', $attributes['className'] );
} else {
$block->context['backgroundColor'] = $attributes['className'];
}
}
return $block->context;
}

0 comments on commit c716185

Please sign in to comment.