Title: Remove the_content filter
Last modified: June 4, 2020

---

# Remove the_content filter

 *  Resolved [WanDal](https://wordpress.org/support/users/dawasi/)
 * (@dawasi)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/remove-the_content-filter/)
 * Hi
 * I need to remove the_content filter. Up to version 5.6 I used the following code:
 *     ```
       add_action( 'wp_loaded', function() {
         remove_filter( 'the_content', array( WP_Typography::get_instance(), 'process' ), 9999 );
       } );
       ```
   
 * However, since version 5.7 this no longer works. How can I remove the filter 
   in the latest version?
 * Many thanks
    -  This topic was modified 5 years, 10 months ago by [WanDal](https://wordpress.org/support/users/dawasi/).

Viewing 6 replies - 1 through 6 (of 6 total)

 *  Plugin Author [pepe](https://wordpress.org/support/users/pputzer/)
 * (@pputzer)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/remove-the_content-filter/#post-12944086)
 * Hi [@dawasi](https://wordpress.org/support/users/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](https://github.com/mundschenk-at/wp-typography/blob/master/includes/wp-typography/components/class-public-interface.php#L211):
 *     ```
       add_filter( 'typo_disable_filtering', function( $disable, $filter_group ) {
           return 'content' !== $filter_group;
       }, 10, 2 );
       ```
   
 *  Thread Starter [WanDal](https://wordpress.org/support/users/dawasi/)
 * (@dawasi)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/remove-the_content-filter/#post-12944624)
 * Hi [@pputzer](https://wordpress.org/support/users/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](https://wordpress.org/support/users/pputzer/)
 * (@pputzer)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/remove-the_content-filter/#post-12944793)
 * 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()`](https://developer.wordpress.org/reference/functions/_wp_filter_build_unique_id/)).
 *  Plugin Author [pepe](https://wordpress.org/support/users/pputzer/)
 * (@pputzer)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/remove-the_content-filter/#post-13031285)
 * 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).
 *  Plugin Author [pepe](https://wordpress.org/support/users/pputzer/)
 * (@pputzer)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/remove-the_content-filter/#post-13031507)
 * Fixed in 5.7.1.
 *  Thread Starter [WanDal](https://wordpress.org/support/users/dawasi/)
 * (@dawasi)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/remove-the_content-filter/#post-13032835)
 * Great! Thanks a lot.

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Remove the_content filter’ is closed to new replies.

 * ![](https://ps.w.org/wp-typography/assets/icon.svg?rev=2663995)
 * [wp-Typography](https://wordpress.org/plugins/wp-typography/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-typography/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-typography/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-typography/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-typography/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-typography/reviews/)

 * 6 replies
 * 2 participants
 * Last reply from: [WanDal](https://wordpress.org/support/users/dawasi/)
 * Last activity: [5 years, 10 months ago](https://wordpress.org/support/topic/remove-the_content-filter/#post-13032835)
 * Status: resolved