A name for an event that is executed at specific points throughout the WordPress core.

learn more… | top users | synonyms (2)

2
votes
1answer
1k views

What is the 'admin_action_' . $_REQUEST['action'] hook used for?

There's an action hook triggered in admin.php called 'admin_action_'.$_REQUEST['action']. Unfortunately, it's a bit useless for plugins as it's triggered at the very end of admin.php, after ...
1
vote
3answers
467 views

Good tools for locating hooks in a wordpress page/admin interface/blog post?

I've recently started using the Hikari Hooks plugin for Wordpress as it seems to allow you to get a good idea of what do_actions are being called on the page, so that you can easily find out where ...
1
vote
2answers
302 views

How to get all of the activate_plugin action parameters?

I am trying to hook into activate_plugin. I know that activate_plugin has 1 required param and 2 optional ones. I am trying to acquire all 3. Here's my setup: // create plugin settings menu ...
1
vote
2answers
823 views

From what hook on is it possible to conditionally add actions?

I tried to have a siderbar registered at the "init" hook based on a variable from the theme options array indicating whether the sidebar should be used in the design. Now it appears that that the ...
0
votes
1answer
661 views

Display different number of posts from one category on the different pages

according with Pagination with custom loop. I use the custom loop for display flash game. For make a pagination on the page with posts from one category (mydomain/category/categoryName) I used: ...
2
votes
1answer
772 views

Appending meta value onto post content in WordPress during save_post

The problem seems pretty straight forward: Once the save_post action is fired, I would like to append the value of a meta key onto the end of the post_content if it's not already found within the post ...
1
vote
1answer
809 views

How to get multiple Action Hooks in an Array

Hi I am writing a small plug-in which I get some content from outside of WordPress and I want a small script to trigger whenever a new post, page or comment is added. Also if any Widgets, themes and ...
0
votes
1answer
267 views

Which are the hooks run before/after when a category's deletion?

What are the actions that a plugin can hook on to for processing when the user deletes a category?
0
votes
2answers
1k views

Are there action hooks for comments?

This is for a personal-use plugin I'm trying to make. I want to submit a comment from site A to my blog (sort of like sending trackbacks/pingbacks but a full comment). For instance, on site A I have ...
1
vote
2answers
310 views

How to track post number on the_loop

I have a need to customize some posts from the loop. Here's the deal: My site is set to 10 posts per page. On post #2,#5, #7 (on every page), I want to display specific background. What's the best ...
2
votes
1answer
2k views

add_action('wp_ajax_[action name]', myfunction) problem

I'm trying to integrate ajax in wordpress using the wp codex guidelines. In the PHP I added: wp_enqueue_script ( 'my_ajax', ADMIN_URL . 'js/ajax.js','jquery','1.0.0' ); wp_localize_script( 'my_ajax', ...
2
votes
1answer
71 views

How to run scripts when a new blog is created in Buddypress?

I'd like to insert some mysql data into every new blog that's created on my buddypress system. How can I hook up to the newly created blog data? ID, for example, would allow me to insert it right from ...
2
votes
1answer
300 views

Scheduled event won't fire

I'm trying to set up individual, one-time schedule events in a plugin. No matter what I do, I can't seem to get the events to fire. I'm using the Cron View plugin to see what's in queue, and the ...
2
votes
2answers
6k views

Use latest jQuery in WordPress (admin interface)

I want to use the latest jQuery (and jQuery UI) versions on my admin interface (editing a specific post type that I created). I tried this: // jQuery 1.x wp_register_script('jquery1x', ...
11
votes
3answers
1k views

get_template_part vs action hooks in themes

It seems to me both of these afford the opportunity for the end user to modify a theme without actually editing the themes files (via child themes). My question is, is one method preferred over the ...
0
votes
1answer
293 views

Edit post image attributes on fly?

Greetings, We can edit image attributes with this get_image_tag filter when we are adding images or with regex and filter the_content,but is there any similar filter or action that can we use to edit ...
3
votes
3answers
4k views

How to set custom cookies before output

What's a surefire way to check/set cookies before the php headers are sent? Is there an action or filter that would be the best place to hook a setcookie() function?
11
votes
2answers
5k views

Difference Between Filter and Action Hooks?

I have been looking at the plugin API a bit more in depth recently and I was wondering what real differences there were between action and filter hooks. They both are events that receive data as a ...