MWDelaney / sage-acf-wp-blocks

Composer library for generating ACF Gutenberg blocks from templates. Intended for use with Roots/Sage (http://roots.io)
348 stars 65 forks source link

fix for notice on $block['className'] #8

Open ArnoSchneider opened 5 years ago

ArnoSchneider commented 5 years ago

This should fix the notice on the undefined $block['className']

` if(!empty($block['className'])): $class_name = $block['className'] . ','; else: $class_name = false; endif;

$block['classes'] = implode(' ', [$block['slug'], $class_name . 'align'.$block['align']]);

`

mcnamee commented 5 years ago

@MWDelaney would you mind releasing a new release to Packagist?

orditeck commented 5 years ago

@mcnamee I did, feel free to use it if needed.

https://github.com/orditeck/sage9-acf-wp-blocks

realcgslav commented 5 years ago

Second line: $class_name = $block['className'] . ',';

should be: $class_name = $block['className'] . ' ';

This comma is joining added additional classes. Space is working better ;)

MWDelaney commented 5 years ago

@MWDelaney would you mind releasing a new release to Packagist?

I plan to do this soon once I thoroughly test the newly merged PRs from today. In the meantime, if you set your composer version requirement to dev-master rather than a particular version number you'll get the latest master branch.

lachieh commented 5 years ago

Any news here?