Linked Questions

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( '...
Andrew's user avatar
  • 1,163
2 votes
2 answers
2k views

Hooking Into Widget Output Loop

When wordpress sidebar outputs any particular registered sidebar it loop through all widgets that assigned through it and outputs it (i guess). Is is possible to hook into the loop and add some ...
Sisir's user avatar
  • 7,771
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 ...
Blackbam's user avatar
  • 545
0 votes
2 answers
283 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: ...
Richard's user avatar
  • 161
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 ...
pixelngrain's user avatar
  • 1,400
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 ...
helgatheviking's user avatar
4 votes
1 answer
2k views

How to display random users with avatars

I adapted a little a function to display a number of random users with their avatars with a shortcode. It works, but something is not good. Sometimes it displays with one user less than I want (just a ...
Yuri's user avatar
  • 1,121
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 ...
Adam Michael Wood's user avatar
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 ...
Nicola Peluchetti's user avatar
2 votes
1 answer
428 views

Stop parsing shortcodes

I'd like to stop parsing shortcodes in the_content but I'm struggling to find what the correct filter would be. This didn't work: remove_filter( 'the_content', 'do_shortcode', 40 ); remove_filter( '...
Atadj's user avatar
  • 2,162
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( '...
Django's user avatar
  • 13
0 votes
1 answer
2k views

remove_action not removing add_action from constructor

I am trying to replace a message from a function that got hooked in a constructor from a class from woocommerce. This is what I tried to remove the message: What I tried. function remove_actions() {...
Adrian's user avatar
  • 113
-1 votes
1 answer
755 views

How To Remove The Filter That Adds JetPack Related Content To Dom [closed]

I am trying to remove the filter in JetPack's Related Posts module that adds the element to the DOM that the module's JavaScript populates with the related posts. Once I remove it, I can achieve my ...
JPollock's user avatar
  • 1,248
0 votes
0 answers
279 views

Remove action added from class

This has been asked before and I know how to do this but im having trouble removing a specific action added by the easy columns plugin. The action is added similar to below: class EasyColumns { ...
David's user avatar
  • 123
0 votes
0 answers
368 views

Override an advanced custom fields action callback [duplicate]

I'm in the process of writing a CDN plugin for WordPress and am trying to integrate it with the Advanced Custom Fields plugin. I need to filter the output of the "File" field type on the edit post ...
Andy's user avatar
  • 1,027

15 30 50 per page