Linked Questions

0
votes
0answers
195 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 ...
59
votes
8answers
41k 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 ...
13
votes
3answers
12k views

PHP error with shortcode handler from a class

Currently i am using the following generic flow for adding the shortcode for a plugin. class MyPlugin { private $myvar; function baztag_func() { print $this->myvar; ...
11
votes
2answers
13k 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 ...
20
votes
1answer
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 ...
10
votes
3answers
3k 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 ...
5
votes
3answers
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 ...
3
votes
1answer
1k 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 ...
2
votes
2answers
1k 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 ...
2
votes
1answer
981 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 ...
2
votes
2answers
256 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 ...
4
votes
5answers
779 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
1answer
1k 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 ...
0
votes
1answer
1k 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() {...
0
votes
1answer
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( '...

15 30 50 per page