Plugin Author
pepe
(@pputzer)
Hi @dawasi, that’s weird. This mechanism should not have changed with the update. You don’t have NextGEN Gallery installed? That would change the priority used to PHP_INT_MAX.
As a workaround, you can use the typo_disable_filtering hook like this to disable all “content”-type filters:
add_filter( 'typo_disable_filtering', function( $disable, $filter_group ) {
return 'content' !== $filter_group;
}, 10, 2 );
Thread Starter
WanDal
(@dawasi)
Hi @pputzer
No, NextGEN Gallery is not installed.
Disabling the whole content filter group is not an option, because I need the rest of the filters.
In version 5.6.1 we used before, the_content filter was added in \wp-typography\includes\wp-typography\components\class-public-interface.php using:
\add_filter( 'the_content', [ $this->plugin, 'process' ], $priority );
where $this->plugin was an object of class WP_Typography.
In version 5.7.0, the_content filter is added using:
\add_filter( 'the_content', [ $this->api, 'process' ], $priority );
where $this->api is an object of class Implementation.
Couldn’t my problem be related to this adjustment?
Plugin Author
pepe
(@pputzer)
It should not matter, because WP_Typography\Implementation is a subclass of WP_Typography and the actual object returned by WP_Typography::get_instance(). In 5.7, I just renamed the property and updated the annotation to document we are actually using WP_Typography\Implementation internally. I’ll investigate, but right now I don’t see how it could change things (it ultimately boils down to spl_object_hash()).
Plugin Author
pepe
(@pputzer)
Sorry for the delay. I found the bug (incorrect dependency injection due to the type hint change, so there where actually two instances of the supposed singleton).