0.10.0
⚠ This release includes some breaking changes. ⚠
- BREAKING: Remove
amf/provider_classfilter. - BREAKING: Introduce
amf/providerfilter. - Introduce
Audio::set_albumandAudio::set_artistmethods. - Introduce
Playable::set_bitratemethod. - Move
set_metamethod fromPlayableinterface toMediabase class. - Introduce
Media::add_metamethod. - Ensure that all metadata provided in the
metaproperty gets saved.
How to address the breaking changes mentioned above?
Plugins that register a custom provider do this by hooking into the amf/provider_class filter, where they return the fully-qualified name of the provider class. As of this release of Asset Manager Framework, instead of the mentioned filter callback, plugin authors would need to hook into the new amf/provider filter and return a provider instance.
Here is a sample diff:
-add_filter( 'amf/provider_class', function () {
- return MyProvider::class;
+add_filter( 'amf/provider', function () {
+ return new MyProvider();
} );Since you have access to the current provider instance, passed as first argument to your filter callback, you can also decorate the existing provider.