Skip to content

Instantly share code, notes, and snippets.

View aliaghdam's full-sized avatar
💪
Don't be the same, Be Better

Ali Aghdam aliaghdam

💪
Don't be the same, Be Better
View GitHub Profile
@aliaghdam
aliaghdam / functions.php
Created April 18, 2017 11:56 — forked from tripflex/functions.php
WordPress Remove Filter (remove_filter converted to remove_class_filter) to remove Filter/Action without Class Object access. Works with WordPress 1.2+ (4.7+ support added 9-19-2016)
<?php
/**
* Remove Class Filter Without Access to Class Object
*
* In order to use the core WordPress remove_filter() on a filter added with the callback
* to a class, you either have to have access to that class object, or it has to be a call
* to a static method. This method allows you to remove filters with a callback to a class
* you don't have access to.
*
* Works with WordPress 1.2+ (4.7+ support added 9-19-2016)