-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wordpress not there yet, when code checks for wordpress #9
Comments
Hi, I also use it with bedrock. One question though - do you use it with theme composer or bedrock's composer? I always add it to the theme's composer. |
Ah! That might be the problem. Added it to the bedrock composer! Will try it with the themes composer and give some feedback. |
My bad! Works like a charm now and it clearly says in the documentation: Thanks again for your help and the code! |
Since this plugin does not rely upon assets (that would not load from /vendor/ directory), it does not need to be a dependency of the theme? Any way this could work from Bedrock's autoload? |
Hi @palmiak any news on this? I can't get this plugin to work with my bedrock installation. I have installed and put the plugin in the mu-plugins folder which also gets displayed in the backend public function twigGutenbergDirectory()
{
return ['templates/blocks'];
} And the blocks won't get displayed. However, when i install the plugin in my theme and autoload it, then it works.. EDIT: Viewing your plugin file i have found out that this does not return true: if ( is_callable( 'add_action' )
&& is_callable( 'acf_register_block_type' )
&& class_exists( 'Timber' )
) {
add_action( 'acf/init', array( __CLASS__, 'timber_block_init' ), 10, 0 );
} |
Hi there,
I followed your instructions, but somehow the autoloader seems to load the package too early and wordpress is not available yet. I have a "normal" roots.io bedrock setup. Is there something I have to change about the loading order or anything?
To test, I made your code into a plugin and then it works fine. But I would prefer to use the composer package.
Thanks for any help,
Sascha
The text was updated successfully, but these errors were encountered: