New answers tagged

2 votes

WP_Query - How to get all posts of specific days of week by custom field date?

WP_Query provides no such date parameter. While you could query for/store the date of the earliest post on the site and then calculate every date for a particular day of the week in the timespan since ...
user avatar
  • 5,810
3 votes

Hook for inserting?

As you probably already noticed yourself $wpdb doesn't have any hooks that you can use. The answer @brennan gave already sounds like an interesting approach, but probably won't help if you have to ...
user avatar
  • 5,480
5 votes

Hook for inserting?

If you have access to the database, you could potentially create a trigger for that plugin-specific table. This bypasses the need for a hook. Depending on how they handle database schema updates, it ...
user avatar
  • 71
1 vote

Do WordPress' cron's clean up expired transients?

I'm answering this to provide more background information, but @Sally answer is the more direct answer here since it's too long for a comment. Although I don't consider myself nearly as talented as ...
user avatar
0 votes

How can I see all the actions attached to an "add_action" hook?

A list of callback functions: // list call back functions $hook_name = 'admin_bar_menu'; global $wp_filter; echo '<h2> Hook name: '. $hook_name . '</h2> '; if( isset( $...
user avatar
1 vote

Is it possible to add the_content filter upon login?

I've read your question and comments once again and I finally get what you are trying to achieve here. Calling the_content filter from inside wp_login callback will not work (as explained in Jacob's ...
user avatar
2 votes

Is it possible to add the_content filter upon login?

You've misunderstood how hooks, and PHP, work. Hooks are not persistent. Each time you visit a page in WordPress the PHP scripts that comprise WordPress all get run. Every time. This includes plugins ...
user avatar

Top 50 recent answers are included