Linked Questions

77 votes
9 answers
68k views

remove_action or remove_filter with external classes?

In a situation where a plugin has encapsulated its methods within a class and then registered a filter or action against one of those methods, how do you remove the action or the filter if you no ...
1 vote
2 answers
4k views

How to change the order (priority) of registered filters (or actions) (e.g. for the_content)?

Is there any way to change the order of filters for e.g. the_content before they are applied? What I currently have is the following ideas: /** * Print all filters for some hook. */ function ...
5 votes
2 answers
226 views

Migrating Markdown (from Drupal)

I'm in the process of migrating my blog from Drupal to Wordpress. I have made liberal use of Markdown in the original posts (and Geshi syntax highlighting). In see that the WP-Markdown plugin ...
2 votes
1 answer
1k views

Using a front controller in a Wordpress plugin, any suggestions?

My idea was to use a front controller in our plugin. has anyone done that already? The responsibilities of the controller should be initiate router class; provide access to objects registry, which ...
13 votes
4 answers
6k views

Remove Actions/Filters added via Anonymous Functions

That's a freaking bad practice I must say. Spent last two hours finding a solution to remove actions and filters added via Anonymous functions. This is the code used on a Parent Theme, and I need ...
23 votes
1 answer
2k views

How to create an API for my plugin?

I have been developing plugins for WordPress, most plugins I have developed use two or three classes, hence not as huge as Buddypress or WooCommerce. I am planning to develop two open source plugins ...
2 votes
2 answers
875 views

Using has_filter with a class based plugin to check whether the plugin is active or not

Usually I use this method to test whether a plugin is active (usually my own). This would be in the plugin I'm checking for: function my_plugin_setup() { // setup code here } add_action( '...
5 votes
1 answer
361 views

Update a Plugin while maintaining back compatibility: general

How can I make updates a public plugin of mine without breaking the plugin for all existing users. Firstly, I'd like to change the main plugin's class/namespace, because I'd like it to be similar ...
4 votes
5 answers
942 views

How do I Make a Theme "plugin-ready"?

How do I revise a theme so that I can publish my event hooks and anyone can build a plugin to add new functionality easily to my theme?
2 votes
2 answers
447 views

WordPress classes explained

Are there any books, websites or lectures that explain the built-in WordPress classes? I would really like to learn how WordPress works internally. I've dug up the core files on trac and even went ...
0 votes
2 answers
281 views

Removing a Filter

I'm using 'Simply Show Hooks' plugin to spot various filters on a page. I'm trying to remove the following filter's function (method): UM_User_posts–>add_tab Here's my remove_filter code so far: ...
5 votes
3 answers
11k views

Removing an action from an external plugin class

I am using a plugin that has this line of code to add an action from the Eazyest_Frontend class: add_action( 'eazyest_gallery_thumbnails', 'ezg_thumbnails',5); I want to remove that and do something ...
0 votes
1 answer
2k views

remove_action not working, even after changing priority [duplicate]

So one of the functions in my theme is: public function job_manager_job_filters_distance() { //Show some HTML } And somewhere else in the document lies: add_action( '...
2 votes
1 answer
3k views

Dashes instead of slashes as permalink structure separator

I have a weird problem created by a bad requirement. (I say this because a lot of comments telling me this is a bad thing to want to do are not helpful. I know. I don't want to do it.) Is it possible ...
13 votes
2 answers
24k views

Use wp init hook to call other hooks?

I want to know if it is a good practice according to WordPress theme or plugin development. add_action('init','all_my_hooks'); function all_my_hooks(){ // some initialization stuff here and then ...

15 30 50 per page