You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thank you for the password add-on for Carbon Fields :-)
In Wordpress it works like a charm!
But when I run a CLI command in my plugin I'm getting the following error:
Fatal error: Uncaught Error: Call to undefined function Carbon_Fields\Provider\add_filter() in\vendor\htmlburger\carbon-fields\core\Provider\Container_Condition_Provider.php on line 254
When I looked this up in Google it looks like there is an issue that the function in Carbon Fields is called, while Wordpress is not (since I'm not using Bedrock or anything, just the 'simple' download Wordpress and unzip).
It looks like the function is called because field.php in this plugin is autoloaded through Composer and thus the code runs without knowing anything of Wordpress.
See htmlburger/carbon-fields#899 and htmlburger/carbon-field-icon#11
I think the best way to load the custom field would be to not autoload the file, but create a class with a static function (that the user of the field has to manually call) to load the custom field. What do you think?
The text was updated successfully, but these errors were encountered:
Hi there,
Thank you for the password add-on for Carbon Fields :-)
In Wordpress it works like a charm!
But when I run a CLI command in my plugin I'm getting the following error:
When I looked this up in Google it looks like there is an issue that the function in Carbon Fields is called, while Wordpress is not (since I'm not using Bedrock or anything, just the 'simple' download Wordpress and unzip).
It looks like the function is called because
field.php
in this plugin is autoloaded through Composer and thus the code runs without knowing anything of Wordpress.See htmlburger/carbon-fields#899 and htmlburger/carbon-field-icon#11
I think the best way to load the custom field would be to not autoload the file, but create a class with a static function (that the user of the field has to manually call) to load the custom field. What do you think?
The text was updated successfully, but these errors were encountered: