0
votes
1answer
32 views

Plugin default settings hook

I am writing a plugin where I want it's default settings to change in accordance to the theme that is selected. I have it working, but would rather provide an action hook for this instead of writing ...
0
votes
1answer
176 views

Is it possible to create an action hook using do_action() within add_action()?

Is it possible to create a new action hook like do_action('my-hook-name'); inside a call to add_action();? I'm aware this code doesn't work, but I was thinking something along the lines of... ...
0
votes
2answers
229 views

Filter an array with a callback - for single & multidimensional arrays

I've a filter attached, that allows modifying an array: $data = apply_filters( 'wpse_example_filter', $data ); The problem is, that the data can be a single or multidimensional array: // single: ...
6
votes
2answers
290 views

current_shortcode() - detect currently used shortcode

In a plugin class I want to provide simple fields for public data: email, phone number, Twitter etc. The list can be extended. See the plugin Public Contact Data on GitHub for details. To keep the ...