Links

http://wordpress.stackexchange.com/questions/35931/how-can-i-edit-post-data-before-it-is-saved

Source: http://codex.wordpress.org/Plugin_API/Hooks

Plugin API/Filter Reference

This article contains an extensive (but not 100% comprehensive) list of the filter hooks available for use in plugin development in Version 2.1 and above of WordPress. For more information:

Note: If you want to add to or clarify this documentation, please follow the style of the existing entries. Describe what data the filter is applied to, and if the filter function takes additional arguments, describe the argument list.

Post, Page, and Attachment (Upload) Filters

See also #Category and Term Filters, #Author and User Filters, #Link Filters, #Date and Time Filters, and #Administrative Filters below.

Database Reads

Filters in this section are applied to information read from the database, prior to displaying on a page or editing screen.

attachment_fields_to_edit 
applied to the form fields to be displayed when editing an attachment. Called in the get_attachment_fields_to_edit function. Filter function arguments: an array of form fields, the post object.
attachment_icon 
applied to the icon for an attachment in the get_attachment_icon function. Filter function arguments: icon file as an HTML IMG tag, attachment ID.
attachment_innerHTML 
applied to the title to be used for an attachment if there is no icon, in the get_attachment_innerHTML function. Filter function arguments: inner HTML (defaults to the title), attachment ID.
author_edit_pre 
applied to post author prior to display for editing.
body_class 
applied to the classes for the HTML <body> element. Called in the get_body_class function. Filter function arguments: an array of class names and an array of additional class names that were added to the first array.
content_edit_pre 
applied to post content prior to display for editing.
content_filtered_edit_pre 
applied to post content filtered prior to display for editing.
excerpt_edit_pre 
applied to post excerpt prior to display for editing.
date_edit_pre 
applied to post date prior to display for editing.
date_gmt_edit_pre 
applied to post date prior to display for editing.
get_attached_file 
applied to the attached file information retrieved by the get_attached_file function. Filter function arguments: file information, attachment ID.
get_enclosed 
applied to the enclosures list for a post by the get_enclosed function.
get_pages 
applied to the list of pages returned by the get_pages function. Filter function arguments: list of pages (each item of which contains a page data array), get_pages function argument list (telling which pages were requested).
get_pung 
applied to the list of pinged URLs for a post by the get_pung function.
get_the_archive_title 
applied to the archive’s title in the get_the_archive_title function.
get_the_excerpt 
applied to the post’s excerpt in the get_the_excerpt function.
get_the_guid 
applied to the post’s GUID in the get_the_guid function.
get_to_ping 
applied to the list of URLs to ping for a post by the get_to_ping function.
icon_dir 
applied to the template’s image directory in several functions. Basically allows a plugin to specify that icons for MIME types should come from a different location.
icon_dir_uri 
applied to the template’s image directory URI in several functions. Basically allows a plugin to specify that icons for MIME types should come from a different location.
image_size_names_choose 
applied to the list of image sizes selectable in the Media Library. Commonly used to make custom image sizes selectable.
mime_type_edit_pre 
applied to post mime type prior to display for editing.
modified_edit_pre 
applied to post modification date prior to display for editing.
modified_gmt_edit_pre 
applied to post modification gmt date prior to display for editing.
no_texturize_shortcodes 
applied to registered shortcodes. Can be used to exempt shortcodes from the automatic texturize function.
parent_edit_pre 
applied to post parent id prior to display for editing.
password_edit_pre 
applied to post password prior to display for editing.
post_class 
applied to the classes of the outermost HTML element for a post. Called in the get_post_class function. Filter function arguments: an array of class names, an array of additional class names that were added to the first array, and the post ID.
prepend_attachment 
applied to the HTML to be prepended by the prepend_attachment function.
protected_title_format 
Used to the change or manipulate the post title when the post is password protected.
private_title_format 
Used to the change or manipulate the post title when it’s status is private.
sanitize_title 
applied to a post title by the sanitize_title function, after stripping out HTML tags.
single_post_title 
applied to the post title when used to create a blog page title by the wp_title and single_post_title functions.
status_edit_pre 
applied to post status prior to display for editing.
the_content 
applied to the post content retrieved from the database, prior to printing on the screen (also used in some other operations, such as trackbacks).
the_content_rss 
applied to the post content prior to including in an RSS feed. This filter hasn’t been functional since 2.7.
the_content_feed 
applied to the post content prior to including in an RSS feed.
the_editor_content 
applied to post content before putting it into a rich editor window.
the_excerpt 
applied to the post excerpt (or post content, if there is no excerpt) retrieved from the database, prior to printing on the screen (also used in some other operations, such as trackbacks).
the_excerpt_rss 
applied to the post excerpt prior to including in an RSS feed.
the_password_form 
applied to the password form for protected posts.
the_tags 
applied to the tags retrieved from the database, prior to printing on the screen.
the_title 
applied to the post title retrieved from the database, prior to printing on the screen (also used in some other operations, such as trackbacks).
the_title_rss 
applied to the post title before including in an RSS feed (after first filtering with the_title.
title_edit_pre 
applied to post title prior to display for editing.
type_edit_pre 
applied to post type prior to display for editing.
wp_dropdown_pages 
applied to the HTML dropdown list of WordPress pages generated by the wp_dropdown_pages function.
wp_list_pages 
applied to the HTML list generated by the wp_list_pages function.
wp_list_pages_excludes 
applied to the list of excluded pages (an array of page IDs) in the wp_list_pages function.
wp_get_attachment_metadata 
applied to the attachment metadata retrieved by the wp_get_attachment_metadata function. Filter function arguments: meta data, attachment ID.
wp_get_attachment_thumb_file 
applied to the attachment thumbnail file retrieved by the wp_get_attachment_thumb_file function. Filter function arguments: thumbnail file, attachment ID.
wp_get_attachment_thumb_url 
applied to the attachment thumbnail URL retrieved by the wp_get_attachment_thumb_URL function. Filter function arguments: thumbnail URL, attachment ID.
wp_get_attachment_url 
applied to the attachment URL retrieved by the wp_get_attachment_url function. Filter function arguments: URL, attachment ID.
wp_mime_type_icon 
applied to the MIME type icon for an attachment calculated by the wp_mime_type_icon function. Filter function arguments: icon URI calculated, MIME type, post ID.
wp_title 
applied to the blog page title before sending to the browser in the wp_title function.

Database Writes

Filters in this section are applied to information prior to saving to the database.

add_ping 
applied to the new value of the pinged field on a post when a ping is added, prior to saving the new information in the database.
attachment_fields_to_save 
applied to fields associated with an attachment prior to saving them in the database. Called in the media_upload_form_handler function. Filter function arguments: an array of post attributes, an array of attachment fields including the changes submitted from the form.
attachment_max_dims 
applied to the maximum image dimensions before reducing an image size. Filter function input (and return value) is either false (if no maximum dimensions have been specified) or a two-item list (width, height).
category_save_pre 
applied to post category comma-separated list prior to saving it in the database (also used for attachments).
comment_status_pre 
applied to post comment status prior to saving it in the database (also used for attachments).
content_filtered_save_pre 
applied to filtered post content prior to saving it in the database (also used for attachments).
content_save_pre 
applied to post content prior to saving it in the database (also used for attachments).
excerpt_save_pre 
applied to post excerpt prior to saving it in the database (also used for attachments).
image_save_pre (deprecated) 
use image_editor_save_pre instead.
jpeg_quality (deprecated) 
use wp_editor_set_quality or WP_Image_Editor::set_quality() instead.
name_save_pre 
applied to post name prior to saving it in the database (also used for attachments).
phone_content 
applied to the content of a post submitted by email, before saving.
ping_status_pre 
applied to post ping status prior to saving it in the database (also used for attachments).
post_mime_type_pre 
applied to the MIME type for an attachment prior to saving it in the database.
status_save_pre 
applied to post status prior to saving it in the database.
thumbnail_filename 
applied to the file name for the thumbnail when uploading an image.
title_save_pre 
applied to post title prior to saving it in the database (also used for attachments).
update_attached_file 
applied to the attachment information prior to saving in post metadata in the update_attached_file function. Filter function arguments: attachment information, attachment ID.
wp_create_thumbnail (deprecated)
wp_delete_file 
applied to an attachment file name just before deleting.
wp_generate_attachment_metadata 
applied to the attachment metadata array before saving in the database.
wp_save_image_file (deprecated) 
use wp_save_image_editor_file instead.
wp_thumbnail_creation_size_limit 
applied to the size of the thumbnail when uploading an image. Filter function arguments: max file size, attachment ID, attachment file name.
wp_thumbnail_max_side_length 
applied to the size of the thumbnail when uploading an image. Filter function arguments: image side max size, attachment ID, attachment file name.
wp_update_attachment_metadata 
applied to the attachment metadata just before saving in the wp_update_attachment_metadata function. Filter function arguments: meta data, attachment ID.

Comment, Trackback, and Ping Filters

See also #Author and User Filters, #Link Filters, #Date and Time Filters, and #Administrative Filters below.

Database Reads

Filters in this section are applied to information read from the database, prior to displaying on a page or editing screen.

comment_excerpt 
applied to the comment excerpt by the comment_excerpt function. See also get_comment_excerpt.
comment_flood_filter 
applied when someone appears to be flooding your blog with comments. Filter function arguments: already blocked (true/false, whether a previous filtering plugin has already blocked it; set to true and return true to block this comment in a plugin), time of previous comment, time of current comment.
comment_post_redirect 
applied to the redirect location after someone adds a comment. Filter function arguments: redirect location, comment info array.
comment_text 
applied to the comment text before displaying on the screen by the comment_text function, and in the admin menus.
comment_text_rss 
applied to the comment text prior to including in an RSS feed.
comments_array 
applied to the array of comments for a post in the comments_template function. Filter function arguments: array of comment information structures, post ID.
comments_number 
applied to the formatted text giving the number of comments generated by the comments_number function. See also get_comments_number.
get_comment_excerpt 
applied to the comment excerpt read from the database by the get_comment_excerpt function (which is also called by comment_excerpt. See also comment_excerpt.
get_comment_ID 
applied to the comment ID read from the global $comments variable by the get_comment_ID function.
get_comment_text 
applied to the comment text of the current comment in the get_comment_text function, which is also called by the comment_text function.
get_comment_type 
applied to the comment type (“comment”, “trackback”, or “pingback”) by the get_comment_type function (which is also called by comment_type).
get_comments_number 
applied to the comment count read from the $post global variable by the get_comments_number function (which is also called by the comments_number function; see also comments_number filter).
post_comments_feed_link 
applied to the feed URL generated for the comments feed by the comments_rss function.

Database Writes

Filters in this section are applied to information prior to saving to the database.

comment_save_pre 
applied to the comment data just prior to updating/editing comment data. Function arguments: comment data array, with indices “comment_post_ID”, “comment_author”, “comment_author_email”, “comment_author_url”, “comment_content”, “comment_type”, and “user_ID”.
pre_comment_approved 
applied to the current comment’s approval status (true/false) to allow a plugin to override. Return true/false and set first argument to true/false to approve/disapprove the comment, and use global variables such as $comment_ID to access information about this comment.
pre_comment_content 
applied to the content of a comment prior to saving the comment in the database.
preprocess_comment 
applied to the comment data prior to any other processing, when saving a new comment in the database. Function arguments: comment data array, with indices “comment_post_ID”, “comment_author”, “comment_author_email”, “comment_author_url”, “comment_content”, “comment_type”, and “user_ID”.
wp_insert_post_data 
applied to modified and unmodified post data in wp_insert_post() prior to update or insertion of post into database. Function arguments: modified and extended post array and sanitized post array.

Category and Term Filters

See also #Administrative Filters below.

Database Reads

Filters in this section are applied to information read from the database, prior to displaying on a page or editing screen.

category_description 
applied to the “description” field categories by the category_description and wp_list_categories functions. Filter function arguments: description, category ID when called from category_description; description, category information array (all fields from the category table for that particular category) when called from wp_list_categories.
category_feed_link 
applied to the feed URL generated for the category feed by the get_category_feed_link function.
category_link 
applied to the URL created for a category by the get_category_link function. Filter function arguments: link URL, category ID.
get_ancestors 
applied to the list of ancestor IDs returned by the get_ancestors function (which is in turn used by many other functions). Filter function arguments: ancestor IDs array, given object ID, given object type.
get_categories 
applied to the category list generated by the get_categories function (which is in turn used by many other functions). Filter function arguments: category list, get_categories options list.
get_category 
applied to the category information that the get_category function looks up, which is basically an array of all the fields in WordPress’s category table for a particular category ID.
list_cats 
called for two different purposes:
  1. the wp_dropdown_categories function uses it to filter the show_option_all and show_option_none arguments (which are used to put options “All” and “None” in category drop-down lists). No additional filter function arguments.
  2. the wp_list_categories function applies it to the category names. Filter function arguments: category name, category information list (all fields from the category table for that particular category).
list_cats_exclusions 
applied to the SQL WHERE statement giving the categories to be excluded by the get_categories function. Typically, a plugin would add to this list, in order to exclude certain categories or groups of categories from category lists. Filter function arguments: excluded category WHERE clause, get_categories options list.
single_cat_title 
applied to the category name when used to create a blog page title by the wp_title and single_cat_title functions.
the_category 
applied to the list of categories (an HTML list with links) created by the get_the_category_list function. Filter function arguments: generated HTML text, list separator being used (empty string means it is a default LI list), parents argument to get_the_category_list.
the_category_rss 
applied to the category list (a list of category XML elements) for a post by the get_the_category_rss function, before including in an RSS feed. Filter function arguments are the list text and the type (“rdf” or “rss” generally).
wp_dropdown_cats 
applied to the drop-down category list (a text string containing HTML option elements) generated by the wp_dropdown_categories function.
wp_list_categories 
applied to the category list (an HTML list) generated by the wp_list_categories function.
wp_get_object_terms 
applied to the list of terms (an array of objects) generated by the wp_get_object_terms function, which is called by a number of category/term related functions, such as get_the_terms and get_the_category.

Database Writes

Filters in this section are applied to information prior to saving to the database.

pre_category_description 
applied to the category desription prior to saving in the database.
wp_update_term_parent 
filter term parent before update to term is applied, hook to this filter to see if it will cause a hierarchy loop.
edit_terms 
(actually an action, but often used like a filter) hooked in prior to saving taxonomy/category change in the database
pre_category_name 
applied to the category name prior to saving in the database.
pre_category_nicename 
applied to the category nice name prior to saving in the database.

Link Filters

Note: This section contains filters related to links to posts, pages, archives, feeds, etc. For blogroll links, see the #Blogroll Filters section below.

attachment_link 
applied to the calculated attachment permalink by the get_attachment_link function. Filter function arguments: link URL, attachment ID.
author_feed_link 
applied to the feed URL generated for the author feed by the get_author_rss_link function.
author_link 
applied to the author’s archive permalink created by the get_author_posts_url function. Filter function arguments: link URL, author ID, author’s “nice” name. Note that get_author_posts_url is called within functions wp_list_authors and the_author_posts_link.
comment_reply_link 
applied to the link generated for replying to a specific comment by the get_comment_reply_link function which is called within function comments_template. Filter function arguments: link (string), custom options (array), current comment (object), current post (object).
day_link 
applied to the link URL for a daily archive by the get_day_link function. Filter function arguments: URL, year, month number, day number.
feed_link 
applied to the link URL for a feed by the get_feed_link function. Filter function arguments: URL, type of feed (e.g. “rss2”, “atom”, etc.).
get_comment_author_link 
applied to the HTML generated for the author’s link on a comment, in the get_comment_author_link function (which is also called by comment_author_link. Action function arguments: user name
get_comment_author_url_link 
applied to the HTML generated for the author’s link on a comment, in the get_comment_author_url_link function (which is also called by comment_author_link).
month_link 
applied to the link URL for a monthly archive by the get_month_link function. Filter function arguments: URL, year, month number.
page_link 
applied to the calculated page URL by the get_page_link function. Filter function arguments: URL, page ID. Note that there is also an internal filter called _get_page_link that can be used to filter the URLS of pages that are not designated as the blog’s home page (same arguments). Note that this only applies to WordPress pages, not posts, custom post types, or attachments.
post_link 
applied to the calculated post permalink by the get_permalink function, which is also called by the the_permalink, post_permalink, previous_post_link, and next_post_link functions. Filter function arguments: permalink URL, post data list. Note that this only applies to WordPress default posts, and not custom post types (nor pages or attachments).
post_type_link 
applied to the calculated custom post type permalink by the get_post_permalink function.
the_permalink 
applied to the permalink URL for a post prior to printing by function the_permalink.
year_link 
applied to the link URL for a yearly archive by the get_year_link function. Filter function arguments: URL, year.
tag_link 
applied to the URL created for a tag by the get_tag_link function. Filter function arguments: link URL, tag ID.
term_link 
applied to the URL created for a term by the get_term_link function. Filter function arguments: term link URL, term object and taxonomy slug.

Date and Time Filters

See also #Link Filters above.

get_comment_date 
applied to the formatted comment date generated by the get_comment_date function (which is also called by comment_date).
get_comment_time 
applied to the formatted comment time in the get_comment_time function (which is also called by comment_time).
get_the_modified_date 
applied to the formatted post modification date generated by the get_the_modified_date function (which is also called by the the_modified_date function).
get_the_modified_time 
applied to the formatted post modification time generated by the get_the_modified_time and get_post_modified_time functions (which are also called by the the_modified_time function).
get_the_time 
applied to the formatted post time generated by the get_the_time and get_post_time functions (which are also called by the the_time function).
the_date 
applied to the formatted post date generated by the the_date function.
the_modified_date 
applied to the formatted post modification date generated by the the_modified_date function.
the_modified_time 
applied to the formatted post modification time generated by the the_modified_time function.
the_time 
applied to the formatted post time generated by the the_time function.
the_weekday 
applied to the post date weekday name generated by the the_weekday function.
the_weekday_date 
applied to the post date weekday name generated by the the_weekday_date function. Function arguments are the weekday name, before text, and after text (before text and after text are added to the weekday name if the current post’s weekday is different from the previous post’s weekday).

Author and User Filters

See also #Link Filters and #Administrative Filters sections.

login_body_class 
Allows filtering of the body class applied to the login screen in login_header().
login_redirect 
applied to the redirect_to post/get variable during the user login process.
user_contactmethods 
applied to the contact methods fields on the user profile page. (old page is here: contactmethods)
update_(meta_type)_metadata 
applied before a (user) metadata gets updated.

Database Reads

Filters in this section are applied to information read from the database, prior to displaying on a page or editing screen.

author_email 
applied to the comment author’s email address retrieved from the database by the comment_author_email function. See also get_comment_author_email.
comment_author 
applied to the comment author’s name retrieved from the database by the comment_author function. See also get_comment_author.
comment_author_rss 
applied to the comment author’s name prior to including in an RSS feed.
comment_email 
applied to the comment author’s email address retrieved from the database by the comment_author_email_link function.
comment_url 
applied to the comment author’s URL retrieved from the database by the comment_author_url function (see also get_comment_author_url).
get_comment_author 
applied to the comment author’s name retrieved from the database by get_comment_author, which is also called by comment_author. See also comment_author.
get_comment_author_email 
applied to the comment author’s email address retrieved from the database by get_comment_author_email, which is also called by comment_author_email. See also author_email.
get_comment_author_IP 
applied to the comment author’s IP address retrieved from the database by the get_comment_author_IP function, which is also called by comment_author_IP.
get_comment_author_url 
applied to the comment author’s URL retrieved from the database by the get_comment_author_url function, which is also called by comment_author_url. See also comment_url.
login_errors 
applied to the login error message printed on the login screen.
login_headertitle 
applied to the title for the login header URL (Powered by WordPress by default) printed on the login screen.
login_headerurl 
applied to the login header URL (points to wordpress.org by default) printed on the login screen.
login_message 
applied to the login message printed on the login screen.
role_has_cap 
applied to a role’s capabilities list in the WP_Role->has_cap function. Filter function arguments are the capabilities list to be filtered, the capability being questioned, and the role’s name.
sanitize_user 
applied to a user name by the sanitize_user function. Filter function arguments: user name (after some cleaning up), raw user name, strict (true or false to use strict ASCII or not).
the_author 
applied to a post author’s displayed name by the get_the_author function, which is also called by the the_author function.
the_author_email 
applied to a post author’s email address by the the_author_email function.
user_search_columns 
applied to the list of columns in the wp_users table to include in the WHERE clause inside WP_User_Query.

Database Writes

Filters in this section are applied to information prior to saving to the database.

pre_comment_author_email 
applied to a comment author’s email address prior to saving the comment in the database.
pre_comment_author_name 
applied to a comment author’s user name prior to saving the comment in the database.
pre_comment_author_url 
applied to a comment author’s URL prior to saving the comment in the database.
pre_comment_user_agent 
applied to the comment author’s user agent prior to saving the comment in the database.
pre_comment_user_ip 
applied to the comment author’s IP address prior to saving the comment in the database.
pre_user_id 
applied to the comment author’s user ID prior to saving the comment in the database.
pre_user_description 
applied to the user’s description prior to saving in the database.
pre_user_display_name 
applied to the user’s displayed name prior to saving in the database.
pre_user_email 
applied to the user’s email address prior to saving in the database.
pre_user_first_name 
applied to the user’s first name prior to saving in the database.
pre_user_last_name 
applied to the user’s last name prior to saving in the database.
pre_user_login 
applied to the user’s login name prior to saving in the database.
pre_user_nicename 
applied to the user’s “nice name” prior to saving in the database.
pre_user_nickname 
applied to the user’s nickname prior to saving in the database.
pre_user_url 
applied to the user’s URL prior to saving in the database.
registration_errors 
applied to the list of registration errors generated while registering a user for a new account.
user_registration_email 
applied to the user’s email address read from the registration page, prior to trying to register the person as a new user.
validate_username 
applied to the validation result on a new user name. Filter function arguments: valid (true/false), user name being validated.

Blogroll Filters

Note: This section contains filters related to blogroll links. For filters related to links to posts, pages, categories, etc., see section #Link Filters above.

get_bookmarks 
applied to link/blogroll database query results by the get_bookmarks function. Filter function arguments: database query results list, get_bookmarks arguments list.
link_category 
applied to the link category by the get_links_list and wp_list_bookmarks functions (as of WordPress 2.2).
link_description 
applied to the link description by the get_links and wp_list_bookmarks functions (as of WordPress 2.2).
link_rating 
applied to the link rating number by the get_linkrating function.
link_title 
applied to the link title by the get_links and wp_list_bookmarks functions (as of WordPress 2.2)
pre_link_description 
applied to the link description prior to saving in the database.
pre_link_image 
applied to the link image prior to saving in the database.
pre_link_name 
applied to the link name prior to saving in the database.
pre_link_notes 
applied to the link notes prior to saving in the database.
pre_link_rel 
applied to the link relation information prior to saving in the database.
pre_link_rss 
applied to the link RSS URL prior to saving in the database.
pre_link_target 
applied to the link target information prior to saving in the database.
pre_link_url 
applied to the link URL prior to saving in the database.

Blog Information and Option Filters

all_options 
applied to the option list retrieved from the database by the get_alloptions function.
bloginfo 
applied to the blog option information retrieved from the database by the bloginfo function, after first retrieving the information with the get_bloginfo function. A second argument $show gives the name of the bloginfo option that was requested. Note that bloginfo("url"), bloginfo("directory") and bloginfo("home") do not use this filtering function (see bloginfo_url).
bloginfo_rss 
applied to the blog option information by function get_bloginfo_rss (which is also called from bloginfo_rss), after first retrieving the information with the get_bloginfo function, stripping out HTML tags, and converting characters appropriately. A second argument $show gives the name of the bloginfo option that was requested.
bloginfo_url 
applied to the the output of bloginfo("url"), bloginfo("directory") and bloginfo("home") before returning the information.
loginout 
applied to the HTML link for logging in and out (generally placed in the sidebar) generated by the wp_loginout function.
option_(option name) 
applied to the option value retrieved from the database by the get_option function, after unserializing (which decodes array-based options). To use this filter, you will need to add filters for specific options names, such as “option_foo” to filter the output of get_option("foo").
pre_get_space_used
applied to the get_space_used() function to provide an alternative way of displaying storage space used. Returning false from this filter will revert to default display behavior (used wp_upload_dir() directory space in megabytes).
pre_option_(option name) 
applied to the option value retrieved from the database by the get_alloptions function, after unserializing (which decodes array-based options). To use this filter, you will need to add filters for specific options names, such as “pre_option_foo” to filter the option “foo”.
pre_update_option_(option name) 
applied the option value before being saving to the database to allow overriding the value to be stored. To use this filter, you will need to add filters for specific options names, such as “pre_update_option_foo” to filter the option “foo”.
register 
applied to the sidebar link created for the user to register (if allowed) or visit the admin panels (if already logged in) by the wp_register function.
upload_dir 
applied to the directory to be used for uploads calculated by the wp_upload_dir function. Filter function argument is an array with components “dir” (the upload directory path), “url” (the URL of the upload directory), and “error” (which you can set to true if you want to generate an error).
upload_mimes 
allows a filter function to return a list of MIME types for uploads, if there is no MIME list input to the wp_check_filetype function. Filter function argument is an associated list of MIME types whose component names are file extensions (separated by vertical bars) and values are the corresponding MIME types.

General Text Filters

attribute_escape 
applied to post text and other content by the attribute_escape function, which is called in many places in WordPress to change certain characters into HTML attributes before sending to the browser.
js_escape 
applied to JavaScript code before sending to the browser in the js_escape function.

Administrative Filters

The filters in this section are related to the administration screens of WordPress, including content editing screens.

admin_user_info_links 
applied to the user profile and info links in the WordPress admin quick menu.
autosave_interval 
applied to the interval for auto-saving posts.
bulk_actions 
applied to an array of bulk items in admin bulk action dropdowns.
bulk_post_updated_messages 
applied to an array of bulk action updated messages.
cat_rows 
applied to the category rows HTML generated for managing categories in the admin menus.
comment_edit_pre 
applied to comment content prior to display in the editing screen.
comment_edit_redirect 
applied to the redirect location after someone edits a comment in the admin menus. Filter function arguments: redirect location, comment ID.
comment_moderation_subject 
applied to the mail subject before sending email notifying the administrator of the need to moderate a new comment. Filter function arguments: mail subject, comment ID. Note that this happens inside the default wp_notify_moderator function, which is a “pluggable” function, meaning that plugins can override it; see Plugin API).
comment_moderation_text 
applied to the body of the mail message before sending email notifying the administrator of the need to moderate a new comment. Filter function arguments: mail body text, comment ID. Note that this happens inside the default wp_notify_moderator function, which is a “pluggable” function, meaning that plugins can override it; see Plugin API).
comment_notification_headers 
applied to the mail headers before sending email notifying the post author of a new comment. Filter function arguments: mail header text, comment ID. Note that this happens inside the default wp_notify_postauthor function, which is a “pluggable” function, meaning that plugins can override it; see Plugin API).
comment_notification_subject 
applied to the mail subject before sending email notifying the post author of a new comment. Filter function arguments: mail subject, comment ID. Note that this happens inside the default wp_notify_postauthor function, which is a “pluggable” function, meaning that plugins can override it; see Plugin API).
comment_notification_text 
applied to the body of the mail message before sending email notifying the post author of a new comment. Filter function arguments: mail body text, comment ID. Note that this happens inside the default wp_notify_postauthor function, which is a “pluggable” function, meaning that plugins can override it; see Plugin API).
comment_row_actions 
applied to the list of action links under each comment row (like Reply, Quick Edit, Edit).
cron_request 
Allows filtering of the URL, key and arguments passed to wp_remote_post() in spawn_cron().
cron_schedules 
applied to an empty array to allow a plugin to generate cron schedules in the wp_get_schedules function.
custom_menu_order 
used to activate the ‘menu_order’ filter.
default_content 
applied to the default post content prior to opening the editor for a new post.
default_excerpt 
applied to the default post excerpt prior to opening the editor for a new post.
default_title 
applied to the default post title prior to opening the editor for a new post.
editable_slug 
applied to the post, page, tag or category slug by the get_sample_permalink function.
explain_nonce_(verb)-(noun) 
allows a filter function to define text to be used to explain a nonce that is otherwise not explained by the WordPress core code. You will need to define specific verb/noun filters to use this. For instance, if your plugin defines a nonce for updating a tag, you would define a filter for “explain_nonce_update-tag”. Filter function arguments: text to display (defaults to a generic “Are you sure you want to do this?” message) and extra information from the end of the action URL. In the example here, your function might simply return the string “Are you sure you want to update this tag?”.
format_to_edit 
applied to post content, excerpt, title, and password by the format_to_edit function, which is called by the admin menus to set up a post for editing. Also applied to when editing comments in the admin menus.
format_to_post 
applied to post content by the format_to_post function, which is not used in WordPress by default.
manage_edit-${post_type}_columns 
applied to the list of columns to print on the manage posts screen for a custom post type. Filter function argument/return value is an associative array where the element key is the name of the column, and the value is the header text for that column. See also action manage_${post_type}_posts_custom_column, which puts the column information into the edit screen.
manage_link-manager_columns 
was manage_link_columns until wordpress 2.7. applied to the list of columns to print on the blogroll management screen. Filter function argument/return value is an associative list where the element key is the name of the column, and the value is the header text for that column. See also action manage_link_custom_column, which puts the column information into the edit screen.
manage_posts_columns 
applied to the list of columns to print on the manage posts screen. Filter function argument/return value is an associative array where the element key is the name of the column, and the value is the header text for that column. See also action manage_posts_custom_column, which puts the column information into the edit screen. (see Scompt’s tutorial for examples and use.)
manage_pages_columns 
applied to the list of columns to print on the manage pages screen. Filter function argument/return value is an associative array where the element key is the name of the column, and the value is the header text for that column. See also action manage_pages_custom_column, which puts the column information into the edit screen.
manage_users_columns
manage_users_custom_column
manage_users_sortable_columns
media_row_actions 
applied to the list of action links under each file in the Media Library (like View, Edit).
menu_order 
applied to the array for the admin menu order. Must be activated with the ‘custom_menu_order’ filter before.
nonce_life 
applied to the lifespan of a nonce to generate or verify the nonce. Can be used to generate nonces which expire earlier. The value returned by the filter should be in seconds.
nonce_user_logged_out 
applied to the current user ID used to generate or verify a nonce when the user is logged out.
plugin_row_meta 
add additional links below each plugin on the plugins page.
postmeta_form_limit 
applied to the number of post-meta information items shown on the post edit screen.
post_row_actions 
applied to the list of action links (like Quick Edit, Edit, View, Preview) under each post in the Posts > All Posts section.
post_updated_messages 
applied to the array storing user-visible administrative messages when working with posts, pages and custom post types. This filter is used to change the text of said messages, not to trigger them. See “customizing the messages” in the register_post_type documentation.
pre_upload_error 
applied to allow a plugin to create an XMLRPC error for uploading files.
preview_page_link 
applied to the link on the page editing screen that shows the page preview at the bottom of the screen.
preview_post_link 
applied to the link on the post editing screen that shows the post preview at the bottom of the screen.
richedit_pre 
applied to post content by the wp_richedit_pre function, before displaying in the rich text editor.
schedule_event 
applied to each recurring and single event as it is added to the cron schedule.
set-screen-option 
Filter a screen option value before it is set.
show_password_fields 
applied to the true/false variable that controls whether the user is presented with the opportunity to change their password on the user profile screen (true means to show password changing fields; false means don’t).
terms_to_edit 
applied to the CSV of terms (for each taxonomy) that is used to show which terms are attached to the post.
the_editor 
applied to the HTML DIV created to house the rich text editor, prior to printing it on the screen. Filter function argument/return value is a string.
user_can_richedit 
applied to the calculation of whether the user’s browser has rich editing capabilities, and whether the user wants to use the rich editor, in the user_can_richedit function. Filter function argument and return value is true/false if the current user can/cannot use the rich editor.
user_has_cap 
applied to a user’s capabilities list in the WP_User->has_cap function (which is called by the current_user_can function). Filter function arguments are the capabilities list to be filtered, the capability being questioned, and the argument list (which has things such as the post ID if the capability is to edit posts, etc.)
wp_handle_upload_prefilter 
applied to the upload information when uploading a file. Filter function argument: array which represents a single element of $_FILES.
wp_handle_upload 
applied to the upload information when uploading a file. Filter function argument: array with elements “file” (file name), “url”, “type”.
wp_revisions_to_keep 
alters how many revisions are kept for a given post. Filter function arguments: number representing desired revisions saved (default is unlimited revisions), the post object.
wp_terms_checklist_args 
applied to arguments of the wp_terms_checklist() function. Filter function argument: array of checklist arguments, post ID.
wp_upload_tabs 
applied to the list of custom tabs to display on the upload management admin screen. Use action upload_files_(tab) to display a page for your custom tab (see Plugin API/Action Reference).
media_upload_tabs 
applied to the list of custom tabs to display on the upload management admin screen. Use action upload_files_(tab) to display a page for your custom tab (see Plugin API/Action Reference).
plugin_action_links_(plugin file name) 
applied to the list of links to display on the plugins page (beside the activate/deactivate links).
views_edit-post 
applied to the list posts eg All (30) | Published (22) | Draft (5) | Pending (2) | Trash (1)

Rich Text Editor Filters

These filters modify the configuration of the rich text editor, TinyMCE.

mce_spellchecker_languages 
applied to the language selection available in the spell checker.
mce_buttons, mce_buttons_2, mce_buttons_3, mce_buttons_4 
applied to the rows of buttons for the rich editor toolbar (each is an array of button names).
mce_css 
applied to the CSS file URL for the rich text editor.
mce_external_plugins 
applied to the array of external plugins to be loaded by the rich text editor.
mce_external_languages 
applied to the array of language files loaded by external plugins, allowing them to use the standard translation method (see tinymce/langs/wp-langs.php for reference).
tiny_mce_before_init 
applied to the whole init array for the editor.

Template Filters

This section contains links related to themes, templates, and style files.

locale_stylesheet_uri 
applied to the locale-specific stylesheet URI returned by the get_locale_stylesheet_uri function. Filter function arguments: URI, stylesheet directory URI.
stylesheet 
applied to the stylesheet returned by the get_stylesheet function.
stylesheet_directory 
applied to the stylesheet directory returned by the get_stylesheet_directory function. Filter function arguments: stylesheet directory, stylesheet.
stylesheet_directory_uri 
applied to the stylesheet directory URI returned by the get_stylesheet_directory_uri function. Filter function arguments: stylesheet directory URI, stylesheet.
stylesheet_uri 
applied to the stylesheet URI returned by the get_stylesheet_uri function. Filter function arguments: stylesheet URI, stylesheet.
template 
applied to the template returned by the get_template function.
template_directory 
applied to the template directory returned by the get_template_directory function. Filter function arguments: template directory, template.
template_directory_uri 
applied to the template directory URI returned by the get_template_directory_uri function. Filter function arguments: template directory URI, template.
theme_root 
applied to the theme root directory (normally wp-content/themes) returned by the get_theme_root function.
theme_root_uri 
applied to the theme root directory URI returned by the get_theme_root_uri function. Filter function arguments: URI, site URL.

You can also replace individual template files from your theme, by using the following filter hooks. See also the template_redirect action hook. Each of these filters takes as input the path to the corresponding template file in the current theme. A plugin can modify the file to be used by returning a new path to a template file.

404_template 
archive_template 
You can use this for example to enforce a specific template for a custom post type archive. This way you can keep all the code in a plugin.
attachment_template 
author_template 
category_template 
comments_popup_template 
comments_template 
The “comments_template” filter can be used to load a custom template form a plugin which replace the themes default comment template.
date_template 
home_template 
page_template 
paged_template 
search_template 
single_template 
You can use this for example to enforce a specific template for a custom post type. This way you can keep all the code in a plugin.
shortcut_link 
applied to the “Press This” bookmarklet link.
template_include 
wp_nav_menu_args 
applied to the arguments of the wp_nav_menu function.

Kubrick Filters

These filters were present in the pre-3.0 default theme kubrick.

kubrick_header_color 
applied to the color for the header of the kubrick theme.
kubrick_header_display 
applied to the display option for the header of the kubrick theme.
kubrick_header_image 
applied to the header image file for the kubrick theme.

Registration & Login Filters

authenticate 
allows basic authentication to be performed on login based on username and password.
registration_errors 
applied to the list of registration errors generated while registering a user for a new account.
user_registration_email 
applied to the user’s email address read from the registration page, prior to trying to register the person as a new user.
validate_username 
applied to the validation result on a new user name. Filter function arguments: valid (true/false), user name being validated.
wp_authenticate_user 
applied when a user attempted to log in, after WordPress validates username and password, but before validation errors are checked.

Redirect/Rewrite Filters

These advanced filters relate to WordPress’s handling of rewrite rules.

allowed_redirect_hosts 
applied to the list of host names deemed safe for redirection. wp-login.php uses this to defend against a dangerous ‘redirect_to’ request parameter
author_rewrite_rules 
applied to the author-related rewrite rules after they are generated.
category_rewrite_rules 
applied to the category-related rewrite rules after they are generated.
comments_rewrite_rules 
applied to the comment-related rewrite rules after they are generated.
date_rewrite_rules 
applied to the date-related rewrite rules after they are generated.
mod_rewrite_rules 
applied to the list of rewrite rules given to the user to put into their .htaccess file when they change their permalink structure. (Note: replaces deprecated filter rewrite_rules.)
page_rewrite_rules 
applied to the page-related rewrite rules after they are generated.
post_rewrite_rules 
applied to the post-related rewrite rules after they are generated.
redirect_canonical 
Can be used to cancel a “canonical” URL redirect. Accepts 2 parameters: $redirect_url, $requested_url. To cancel the redirect return FALSE, to allow the redirect return $redirect_url
rewrite_rules_array 
applied to the entire rewrite rules array after it is generated.
root_rewrite_rules 
applied to the root-level rewrite rules after they are generated.
search_rewrite_rules 
applied to the search-related rewrite rules after they are generated.
wp_redirect 
applied to a redirect URL by the default wp_redirect function. Filter function arguments: URL, HTTP status code. Note that wp_redirect is also a “pluggable” function, meaning that plugins can override it; see Plugin API).
wp_redirect_status 
applied to the HTTP status code when redirecting by the default wp_redirect function. Filter function arguments: HTTP status code, URL. Note that wp_redirect is also a “pluggable” function, meaning that plugins can override it; see Plugin API).

WP_Query Filters

These are filters run by the WP_Query object in the course of building and executing a query to retrieve posts. See also #Advanced WordPress Filters for queries relating to users, meta values, and more generic queries.

found_posts 
applied to the list of posts, just after querying from the database.
found_posts_query 
after the list of posts to display is queried from the database, WordPress selects rows in the query results. This filter allows you to do something other than SELECT FOUND_ROWS() at that step.
post_limits 
applied to the LIMIT clause of the query that returns the post array.
posts_clauses 
applied to the entire SQL query, divided into a keyed array for each clause type, that returns the post array. Can be easier to work with than posts_request.
posts_distinct 
allows a plugin to add a DISTINCTROW clause to the query that returns the post array.
posts_fields 
applied to the field list for the query that returns the post array.
posts_groupby 
applied to the GROUP BY clause of the query that returns the post array (normally empty).
posts_join 
applied to the JOIN clause of the query that returns the post array. This is typically used to add a table to the JOIN, in combination with the posts_where filter.
posts_join_paged 
applied to the JOIN clause of the query that returns the post array, after the paging is calculated (though paging does not affect the JOIN, so this is actually equivalent to posts_join).
posts_orderby 
applied to the ORDER BY clause of the query that returns the post array.
posts_request 
applied to the entire SQL query that returns the post array, just prior to running the query.
posts_results 
allows you to manipulate the resulting array returned from the query.
posts_search 
applied to the search SQL that is used in the WHERE clause of WP_Query.
posts_where 
applied to the WHERE clause of the query that returns the post array.
posts_where_paged 
applied to the WHERE clause of the query that returns the post array, after the paging is calculated (though paging does not affect the WHERE, so this is actually equivalent to posts_where).
the_posts 
applied to the list of posts queried from the database after minimal processing for permissions and draft status on single-post pages.

Media Filters

This section contains media filters that are used to integrated different types of media.

editor_max_image_size 
image_downsize 
get_image_tag_class 
get_image_tag 
image_resize_dimensions 
intermediate_image_sizes 
icon_dir 
wp_get_attachment_image_attributes 
img_caption_shortcode 
post_gallery 
use_default_gallery_style 
gallery_style 
(adjacent)_image_link 
embed_defaults 
load_default_embeds 
embed_googlevideo 
upload_size_limit 
wp_image_editors 
plupload_default_settings 
plupload_default_params 
image_size_names_choose 
wp_prepare_attachment_for_js 
media_upload_tabs 
disable_captions 
media_view_settings 
media_view_strings 
wp_handle_upload_prefilter 

Advanced WordPress Filters

This section contains advanced filters related to internationalization, miscellaneous queries, and other fundamental WordPress functions.

create_user_query 
applied to the query used to save a new user’s information to the database, just prior to running the query.
get_editable_authors 
applied to the list of post authors that the current user is authorized to edit in the get_editable_authors function.
get_next_post_join 
in function get_next_post (which finds the post after the currently-displayed post), applied to the SQL JOIN clause (which normally joins to the category table if user is viewing a category archive). Filter function arguments: JOIN clause, stay in same category (true/false), list of excluded categories.
get_next_post_sort 
in function get_next_post (which finds the post after the currently-displayed post), applied to the SQL ORDER BY clause (which normally orders by post date in ascending order with a limit of 1 post). Filter function arguments: ORDER BY clause.
get_next_post_where 
in function get_next_post (which finds the post after the currently-displayed post), applied to the SQL WHERE clause (which normally looks for the next dated published post). Filter function arguments: WHERE clause, stay in same category (true/false), list of excluded categories.
get_previous_post_join 
in function get_previous_post (which finds the post before the currently-displayed post), applied to the SQL JOIN clause (which normally joins to the category table if user is viewing a category archive). Filter function arguments: join clause, stay in same category (true/false), list of excluded categories.
get_previous_post_sort 
in function get_previous_post (which finds the post before the currently-displayed post), applied to the SQL ORDER BY clause (which normally orders by post date in descending order with a limit of 1 post). Filter function arguments: ORDER BY clause.
get_previous_post_where 
in function get_previous_post (which finds the post before the currently-displayed post), applied to the SQL WHERE clause (which normally looks for the previous dated published post). Filter function arguments: WHERE clause, stay in same category (true/false), list of excluded categories.
gettext 
applied to the translated text by the translation() function (which is called by functions like the __() and _e() internationalization functions ). Filter function arguments: translated text, untranslated text and the text domain. Gets applied even if internationalization is not in effect or if the text domain has not been loaded.
override_load_textdomain
get_meta_sql 
in function WP_Meta_Query::get_sql (which generates SQL clauses to be appended to a main query for advanced meta queries.), applied to the SQL JOIN and WHERE clause generated by the advanced meta query. Filter function arguments: array( compact( ‘join’, ‘where’ ), $this->queries, $type, $primary_table, $primary_id_column, $context )
get_others_drafts 
applied to the query that selects the other users’ drafts for display in the admin menus.
get_users_drafts 
applied to the query that selects the users’ drafts for display in the admin menus.
locale 
applied to the locale by the get_locale function.
query 
applied to all queries (at least all queries run after plugins are loaded).
query_string 
deprecated – use query_vars or request instead.
query_vars 
applied to the list of public WordPress query variables before the SQL query is formed. Useful for removing extra permalink information the plugin has dealt with in some other manner.
request 
like query_vars, but applied after “extra” and private query variables have been added.
excerpt_length 
Defines the length of a single-post excerpt.
excerpt_more 
Defines the more string at the end of the excerpt.
post_edit_form_tag 
Allows you to append code to the form tag in the default post/page editor.
update_user_query 
applied to the update query used to update user information, prior to running the query.
uploading_iframe_src (removed since WP 2.5)
applied to the HTML src tag for the uploading iframe on the post and page editing screens.
xmlrpc_methods 
applied to list of defined XMLRPC methods for the XMLRPC server.
wp_mail_from 
applied before any mail is sent by the wp_mail function. Supplied value is the calculated from address which is wordpress at the current hostname (set by $_SERVER[‘SERVER_NAME’]). The filter should return an email address or name/email combo in the form “user@example.com” or “Name <user@example.com>” (without the quotes!).
wp_mail_from_name 
applied before any mail is sent by the wp_mail function. The filter should return a name string to be used as the email from name.
update_(meta_type)_metadata 
applied before a metadata gets updated. For example if a user metadata gets updated the hook would be ‘update_user_metadata’

Widgets

This section contains filters added by widgets present in WordPress core.

dynamic_sidebar_params 
applied to the arguments passed to the widgets_init function in the WordPress widgets.
widget_archives_dropdown_args 
applied to the arguments passed to the wp_get_archives() function in the WordPress Archives widget.
widget_categories_args 
applied to the arguments passed to the wp_list_categories() function in the WordPress Categories widget.
widget_links_args 
applied to the arguments passed to the wp_list_bookmarks() function in the WordPress Links widget.
widget_nav_menu_args 
applied to the arguments passed to the wp_nav_menu() function in the WordPress Custom Menu widget.
widget_pages_args 
applied to the arguments passed to the wp_list_pages() function in the WordPress Pages widget.
widget_tag_cloud_args 
applied to the arguments passed to the wp_tag_cloud() function in the WordPress Pages widget.
widget_text 
applied to the widget text of the WordPress Text widget. May also apply to some third party widgets as well.
widget_title 
applied to the widget title of any user editable WordPress Widget. May also apply to some third party widgets as well.

Admin Bar

This section contains filters added by the Admin Bar added in WordPress 3.1.0.

wp_admin_bar_class 
allows changing the default ‘WP_Admin_Bar’ class in the _wp_admin_bar_init() function in wp-includes/admin-bar.php.

Further Reading

  • Writing a Plugin – description of how to write a plugin
  • Plugin API – article on how to use filters and actions
  • Plugin API/Action Reference – reference list for Action hooks
  • Plugin Resources – comprehensive list of plugin-related resources
  • WordPress Hooks, a work in progress directory of all of WordPress’ hooks.
  • WordPress Hooks Database, a database of all WordPress’ hooks, showing which version they come from, and linking to the source code spots that use them
  • Angsuman’s list, a comprehensive listing of WordPress action hooks with documentation and source code location information. It contains all documented and undocumented action hooks in WordPress 2.0.

Plugin API/Action Reference

This is a (hopefully) comprehensive list of action hooks available in WordPress version 2.1 and above. For more information:

(If you want to add to or clarify this documentation, please follow the style of the existing entries. Describe when the action runs, and if the action function takes arguments, describe the arguments.)

Actions Run During a Typical Request

These actions are called when a logged-in user opens the home page in Version 3.3.1. This list may show only the first time each action is called, and in many cases no function is hooked to the action. Themes and plugins can cause actions to be called multiple times and at differing times during a request. As proof of this, you can see action calls specific to the Twenty Eleven theme on this list. Cron tasks may also fire when a user visits the site, adding additional action calls. This list should be viewed as a guide line or approximation of WordPress action execution order, and not a concrete specification.

Actions are called with the function do_action(), except those marked (ref array), which are called with the function do_action_ref_array().

muplugins_loaded After must-use plugins are loaded
registered_taxonomy For category, post_tag, etc.
registered_post_type For post, page, etc.
plugins_loaded After active plugins and pluggable functions are loaded
sanitize_comment_cookies
setup_theme
load_textdomain For the default domain
after_setup_theme Generally used to initialize theme settings/options. This is the first action hook available to themes, triggered immediately after the active theme’s functions.php file is loaded. add_theme_support() should be called here, since the init action hook is too late to add some features. At this stage, the current user is not yet authenticated.
auth_cookie_malformed
auth_cookie_valid
set_current_user
init Typically used by plugins to initialize. The current user is already authenticated by this time.
└─ widgets_init Used to register sidebars. Fired at ‘init’ priority 1 (and so before ‘init’ actions with priority ≥ 1!)
register_sidebar For each sidebar and footer area
wp_register_sidebar_widget For each widget
wp_default_scripts (ref array)
wp_default_styles (ref array)
admin_bar_init
add_admin_bar_menus
wp_loaded After WordPress is fully loaded
parse_request Allows manipulation of HTTP request handling (ref array)
send_headers Allows customization of HTTP headers (ref array)
parse_query After query variables are set (ref array)
pre_get_posts Exposes the query-variables object before a query is executed. (ref array)
posts_selection
wp After WP object is set up (ref array)
template_redirect
get_header
wp_enqueue_scripts
twentyeleven_enqueue_color_scheme (Specific to Twenty Eleven)
wp_head
wp_print_styles
wp_print_scripts
get_search_form
loop_start (ref array)
the_post (ref array) Allows modification of the post object immediately after query
get_template_part_content Template part for the content
loop_end (ref array)
get_sidebar
dynamic_sidebar
get_search_form
pre_get_comments (ref array)
wp_meta
get_footer
get_sidebar This ‘sidebar’ is a footer area
twentyeleven_credits (Specific to Twenty Eleven)
wp_footer
wp_print_footer_scripts
admin_bar_menu (ref array)
wp_before_admin_bar_render
wp_after_admin_bar_render
shutdown PHP execution is about to end

Actions Run During an Admin Page Request

These actions are run when a logged-in user opens the Posts page in Version 3.3.1. This list shows only the first time an action is called, and in many cases no function is hooked to the action. Each admin page has a different list of actions depending upon the purpose of the page and the plugins installed. This list should be viewed as a guide line or approximation, and not a concrete specification.

In these actions, (hookname) depends on the page. For the Posts page it is edit.php, or for a theme’s Background page it is appearance_page_custom-background.

Actions are called with the function do_action(), except those marked (ref array), which are called with the function do_action_ref_array().

muplugins_loaded After must-use plugins are loaded
registered_taxonomy For category, post_tag, etc.
registered_post_type For post, page, etc.
plugins_loaded After active plugins and pluggable functions are loaded
sanitize_comment_cookies
setup_theme
load_textdomain For domain default
after_setup_theme At this stage, the current user is not yet authenticated.
load_textdomain For domain twentyeleven
auth_cookie_valid
set_current_user
init Typically used by plugins to initialize. The current user is already authenticated by this time.
└─ widgets_init Used to register sidebars. This is fired at ‘init’, with a priority of 1.
register_sidebar For each sidebar
wp_register_sidebar_widget For each widget
wp_default_scripts (ref array)
wp_default_styles (ref array)
admin_bar_init
add_admin_bar_menus
wp_loaded After WordPress is fully loaded
auth_cookie_valid
auth_redirect
_admin_menu See also: _user_admin_menu, _network_admin_menu
admin_menu See also: user_admin_menu, network_admin_menu
admin_init
current_screen
load-(page)
send_headers Where custom HTTP headers can be added
pre_get_posts Exposes the query-variables object before a query is executed. (ref array)
posts_selection
wp After WP object is set up (ref array)
admin_xml_ns
admin_xml_ns
admin_enqueue_scripts
admin_print_styles-(hookname)
admin_print_styles
admin_print_scripts-(hookname)
admin_print_scripts
wp_print_scripts
admin_head-(hookname)
admin_head
adminmenu
in_admin_header
admin_notices
all_admin_notices
(hookname)
restrict_manage_posts
the_post (ref array)
pre_user_query (ref array)
in_admin_footer
admin_footer
admin_bar_menu (ref array)
wp_before_admin_bar_render
wp_after_admin_bar_render
admin_print_footer_scripts
admin_footer-(hookname) Admin page footer
shutdown PHP execution is about to end
wp_dashboard_setup Allows customization of admin Dashboard

Post, Page, Attachment, and Category Actions (Admin)

post_submitbox_misc_actions 
Runs when an editing page gets generated to add some content (eg. fields) to the submit box (where the publish button is shown). No function arguments.
add_attachment 
Runs when an attached file is first added to the database. Action function arguments: attachment ID.
add_category 
Same as create_category.
category_add_form_fields 
Runs when category add form is cerated in admin. Useful to add a field in this form before the submit button
category_edit_form 
Runs when category edit form is created in admin. Useful to add a new field to this form
clean_post_cache 
Runs when post cache is cleaned. Action function arguments: post ID. See clean_post_cache().
create_category 
Runs when a new category is created. Action function arguments: category ID.
delete_attachment 
Runs just before an attached file is deleted from the database. Action function arguments: attachment ID. (Prior to version 2.8 this hook was triggered after attachment was deleted.)
delete_category 
Runs just after a category is deleted from the database and its corresponding links/posts are updated to remove the category. Action function arguments: category ID.
wp_trash_post 
Runs when a post or page is about to be trashed. Action function arguments: post or page ID.
trashed_post 
Runs just after a post or page is trashed. Action function arguments: post or page ID.
untrash_post 
Runs just before undeletion, when a post or page is restored. Action function arguments: post or page ID.
untrashed_post 
Runs just after undeletion, when a post or page is restored. Action function arguments: post or page ID.
before_delete_post 
Runs when a post or page is about to be deleted. Comments, attachments and metadata are still available. Action function arguments: post or page ID.
delete_post 
Runs when a post or page is about to be deleted. Comments, attachments and metadata are already deleted. Action function arguments: post or page ID.
deleted_post 
Runs just after a post or page is deleted. Action function arguments: post or page ID.
edit_attachment 
Runs when an attached file is edited/updated to the database. Action function arguments: attachment ID.
edit_category 
Runs when a category is updated/edited, including when a post or blogroll link is added/deleted or its categories are updated (which causes the count for the category to update). Action function arguments: category ID.
edit_post 
Runs when a post or page is updated/edited, including when a comment is added or updated (which causes the comment count for the post to update). Action function arguments: post or page ID.
pre_post_update 
Runs just before a post or page is updated. Action function arguments: post or page ID.
post_updated 
Runs after a post or page is updated. Action function arguments: post or page ID, WP_Post object of the post before the update and after the update.
transition_post_status  
Runs when any post status transition occurs. Action function arguments: $new_status, $old_status, $post object. (See also Post Status Transitions.)
(old status)_to_(new status) 
Runs when a post changes status from $old_status to $new_status. Action function arguments: $post object. (See also Post Status Transitions.)
(status)_(post_type) 
Runs when a post of type $post_type is transitioned to $status from any other status. Action function arguments: post ID, $post object. (See also Post Status Transitions.)
publish_post (not deprecated) 
Runs when a post is published, or if it is edited and its status is changed to “published”. This action hook conforms to the (status)_(post_type) action hook type. Action function arguments: post ID, $post object. (See also Post Status Transitions.)
publish_page 
Runs when a page is published, or if it is edited and its status is changed to “published”. This action hook conforms to the (status)_(post_type) action hook type. Action function arguments: post ID, $post object. (See also Post Status Transitions.)
publish_phone 
Runs just after a post is added via email. Action function argument: post ID.
publish_future_post 
Runs when a future post or page is published. Action function arguments: post ID.
save_post 
Runs whenever a post or page is created or updated, which could be from an import, post/page edit form, xmlrpc, or post by email. Action function arguments: post ID and post object. Runs after the data is saved to the database. Note that post ID may reference a post revision and not the last saved post. Use wp_is_post_revision() to get the ID of the real post.
updated_postmeta 
Runs when a metadata has been updated.
wp_insert_post 
Same as save_post, runs immediately afterwards.
xmlrpc_publish_post 
Runs when a post is published via XMLRPC request, or if it is edited via XMLRPC and its status is “published”. Action function arguments: post ID.

Taxonomy and Terms

edit_terms 
(actually an action, but often used like a filter) hooked in prior to saving taxonomy/category change in the database
edited_terms 
applied after saving taxonomy/category change in the database.
edited_$taxonomy 
applied after saving specific taxonomy change in the database

Comment, Ping, and Trackback Actions

comment_closed 
Runs when the post is marked as not allowing comments while trying to display comment entry form. Action function argument: post ID.
comment_id_not_found 
Runs when the post ID is not found while trying to display comments or comment entry form. Action function argument: post ID.
comment_flood_trigger 
Runs when a comment flood is detected, just before wp_die is called to stop the comment from being accepted. Action function arguments: time of previous comment, time of current comment.
comment_(old status)_to_(new status) 
Runs when a comment status transition occurs. Action function arguments: Comment object.
comment_on_draft 
Runs when the post is a draft while trying to display a comment entry form or comments. Action function argument: post ID.
comment_post 
Runs just after a comment is saved in the database. Action function arguments: comment ID, approval status (“spam”, or 0/1 for disapproved/approved).
edit_comment 
Runs after a comment is updated/edited in the database. Action function arguments: comment ID.
delete_comment 
Runs just before a comment is deleted. Action function arguments: comment ID.
deleted_comment 
Runs just after a comment is deleted. Action function arguments: comment ID.
trash_comment 
Runs just before a comment is trashed. Action function arguments: comment ID.
trashed_comment 
Runs just after a comment is trashed. Action function arguments: comment ID.
comment_closed 
Runs when the post is marked as not a spam.
pingback_post 
Runs when a ping is added to a post. Action function argument: comment ID.
pre_ping 
Runs before a ping is fully processed. Action function arguments: array of the post links to be processed, and the “pung” setting for the post.
trackback_post 
Runs when a trackback is added to a post. Action function argument: comment ID.
wp_blacklist_check 
Runs to check whether a comment should be blacklisted. Action function arguments: author name, author email, author URL, comment text, author IP address, author’s user agent (browser). Your function can execute a wp_die to reject the comment, or perhaps modify one of the input arguments so that it will contain one of the blacklist keywords set in the WordPress options.
wp_insert_comment 
Runs whenever a comment is created.
wp_set_comment_status 
Runs when the status of a comment changes. Action function arguments: comment ID, status string indicating the new status (“delete”, “approve”, “spam”, “hold”).

Blogroll Actions

add_link 
Runs when a new blogroll link is first added to the database. Action function arguments: link ID.
delete_link 
Runs when a blogroll link is deleted. Action function arguments: link ID.
edit_link 
Runs when a blogroll link is edited. Action function arguments: link ID.

Feed Actions

atom_entry 
Runs just after the entry information has been printed (but before closing the entry tag) for each blog entry in an atom feed.
atom_head 
Runs just after the blog information has been printed in an atom feed, just before the first entry.
atom_ns 
Runs inside the root XML element for an atom feed (to add namespaces).
commentrss2_item 
Runs just after a single comment’s information has been printed in a comment feed (but before closing the item tag). Action function arguments: comment ID, post ID.
do_feed_(feed) 
Runs when a feed is generated, where feed is the type of feed (rss2, atom, rdf, etc.). Use priority less than 10 to run before printing the feed. Action function argument: true (the feed is for comments) or false (it is for posts).
rdf_header 
Runs just after the blog information has been printed in an RDF feed, just before the first entry.
rdf_item 
Runs just after the entry information has been printed (but before closing the item tag) for each blog entry in an RDF feed.
rdf_ns 
Runs inside the root XML element in an RDF feed (to add namespaces).
rss_head 
Runs just after the blog information has been printed in an RSS feed, just before the first entry.
rss_item 
Runs just after the entry information has been printed (but before closing the item tag) for each blog entry in an RSS feed.
rss2_head 
Runs just after the blog information has been printed in an RSS 2 feed, just before the first entry.
rss2_item 
Runs just after the entry information has been printed (but before closing the item tag) for each blog entry in an RSS 2 feed.
rss2_ns 
Runs inside the root XML element in an RSS 2 feed (to add namespaces).

Template Actions

after_setup_theme 
Runs during a themes initialization. Is generally used to perform basic setup, registration, and init actions for a theme.
comment_form 
Runs at the bottom of a comment form rendered by comment_form(), right before the closing </form>. Action function argument: the post ID.
do_robots 
Runs when the template file chooser determines that it is a robots.txt request.
do_robotstxt 
Runs in the do_robots() function before it prints out the Disallow lists for the robots.txt file.
get_footer 
Runs when the template calls the get_footer() function, just before the footer.php template file is loaded.
get_header 
Runs when the template calls the get_header() function, just before the header.php template file is loaded.
switch_theme 
Runs when the blog’s theme is changed. Action function argument: name of the new theme. If used in a theme, it only works if the theme that adds action is the one being disabled.
after_switch_theme 
Runs when the blog’s theme is changed. Action function argument: name of the new theme. If used in a theme, it only works if the theme that adds action is the one being enabled. Can be used to run certain code when enabling a theme.
load-themes.php 
Runs when the theme is activate or deactivate (replace by an other).
template_redirect 
Runs before the determination of the template file to be used to display the requested page.
wp_footer 
Runs when the template calls the wp_footer() function, generally near the bottom of the blog page.
wp_head 
Runs when the template calls the wp_head() function. This hook is generally placed near the top of a page template between <head> and </head>. This hook does not take any parameters.
wp_meta 
Runs when the sidebar.php template file calls the wp_meta() function, to allow the plugin to insert content into the sidebar.
wp_print_scripts 
Runs just before WordPress prints registered JavaScript scripts into the page header.

Administrative Actions

activate_(plugin file name) 
Runs when the plugin is first activated. See Function_Reference/register_activation_hook.
activity_box_end 
Runs at the end of the activity box on the admin Dashboard screen.
add_category_form_pre 
Runs before the add category form is put on the screen in the admin menus.
add_option_(option_name) 
Runs after a WordPress option has been added by the add_option() function. Action function arguments: option name, option value. You must add an action for the specific options that you want to respond to, such as ‘add_option_foo’ to respond when option “foo” has been added.
add_option 
Runs before an option gets added to the database.
added_option 
Runs after an an option has been added.
admin_head 
Runs in the HTML <head> section of the admin panel.
admin_head-(page_hook) or admin_head-(plugin_page) 
Runs in the HTML <head> section of a specific admin page or the admin panel of a plugin-generated page.
admin_init 
Runs at the beginning of every admin page before the page is rendered. See wp-admin/admin.php, wp-admin/admin-post.php, and wp-admin/admin-ajax.php.
admin_footer-(plugin_page) 
Runs at the end of the <body> section of the admin panel of a plugin-generated page.
admin_post_(action) 
also: admin_post_nopriv_(action) – Runs a handler for an unspecified GET or POST request.
admin_footer 
Runs at the end of the admin panel inside the body tag
admin_enqueue_scripts 
Runs in the HTML header so a plugin or theme can enqueue JavaScript and CSS to all admin pages.
admin_print_scripts 
Runs in the HTML header so a plugin can add JavaScript scripts to all admin pages.
admin_print_scripts-(page_hook) or admin_print_scripts-(plugin_page) 
Runs to print JavaScript scripts in the HTML head section of a specific plugin-generated admin page. The (page_hook) is returned when using any of the functions that add plugin menu items to the admin menu: add_management_page(), add_options_page(), etc. Example:
function myplugin_menu() {
  if ( function_exists('add_management_page') ) {
    $page = add_management_page( 'myplugin', 'myplugin', 'manage_options', 'myplugin_slug', 'myplugin_admin_page' );
    add_action( "admin_print_scripts-$page", 'myplugin_admin_head' );
  }
} 
admin_print_styles 
Runs in the HTML header so a plugin can add CSS/Stylesheets to all admin pages.
admin_print_styles-(page_hook) or admin_print_style-(plugin_page) 
Runs when styles should be enqueued with wp_enqueue_style() for a particular admin page. Use the return value of a function such as add_submenu_page() to determine the value of (page_hook).
check_passwords 
Runs to validate the double-entry of password when creating a new user. Action function arguments: array of login name, first password, second password.
dbx_page_advanced 
Runs at the bottom of the “advanced” section on the page editing screen in the admin menus.
dbx_page_sidebar 
Runs at the bottom of the sidebar on the page editing screen in the admin menus.
dbx_post_advanced 
Runs at the bottom of the “advanced” section on the post editing screen in the admin menus.
dbx_post_sidebar 
Runs at the bottom of the sidebar on the post editing screen in the admin menus. Use add_meta_box() in WordPress 2.5 and higher.
deactivate_(plugin file name) 
Runs when a plugin is deactivated.
delete_option_(option_name) 
Runs after a WordPress option has been deleted by the delete_option() function. Action function arguments: option name. You must add an action for the specific options that you want to respond to, such as ‘delete_option_foo’ to respond when option “foo” has been deleted.
delete_option 
Runs before an option gets deleted from the database.
deleted_option 
Runs after an an option has been deleted.
delete_user 
Runs when a user is deleted. Action function arguments: user ID.
edit_category_form 
Runs after the add/edit category form is put on the screen (but before the end of the HTML form tag).
edit_category_form_pre 
Runs before the edit category form is put on the screen in the admin menus.
edit_tag_form 
Runs after the add/edit tag form is put on the screen (but before the end of the HTML form tag).
edit_tag_form_pre 
Runs before the edit tag form is put on the screen in the admin menus.
edit_form_top 
Runs inside the form before the title on WordPress post edit screen (and Custom Post Types), but after the inital hidden fields (user_ID, action, etc.).
edit_form_after_title 
Runs after the title on WordPress post edit screen (and Custom Post Types) but before the built in WordPress content area.
edit_form_after_editor 
Runs just after the WordPress post editor but before all other meta boxes. also available in Custom Post Types.
edit_form_advanced 
Runs just before the “advanced” section of the post editing form in the admin menus.
edit_page_form 
Runs just before the “advanced” section of the page editing form in the admin menus.
edit_user_profile 
Runs near the end of the user profile editing screen in the admin menus.
load-(page) 
Runs when an administration menu page is loaded. This action is not usually added directly — see Adding Administration Menus for more details of how to add admin menus. If you do want to use it directly, the return value from add_options_page() and similar functions gives you the “(page)” part of the action name.
login_form 
Runs just before the end of the login form.
login_head 
Runs just before the end of the HTML head section of the login page.
lost_password 
Runs before the “retrieve your password by email” form is printed on the login screen.
lostpassword_form 
Runs at the end of the form used to retrieve a user’s password by email, to allow a plugin to supply extra fields.
lostpassword_post 
runs when the user has requested an email message to retrieve their password, to allow a plugin to modify the PHP $_POST variable before processing.
manage_link_custom_column 
Runs when there is an unknown column name for the blogroll managing admin screen. Action function arguments: column name, link ID. See also filter manage_link_columns in the Plugin API/Filter Reference, which adds custom columns.
manage_posts_custom_column 
Runs when there is an unknown column name for the managing posts admin screen. Action function arguments: column name, post ID. See also filter manage_posts_columns in the Plugin API/Filter Reference, which adds custom columns. (see Scompt’s tutorial for examples and use.)
manage_pages_custom_column 
Runs when there is an unknown column name for the managing pages admin screen. Action function arguments: column name, page ID. See also filter manage_pages_columns in the Plugin API/Filter Reference, which adds custom columns.
manage_media_custom_column 
Runs when there is an unknown column name for the managing media admin screen. Action function arguments: column name, page ID. See also filter manage_media_columns in the Plugin API/Filter Reference, which adds custom columns.
manage_{$post_type}_posts_custom_column 
Runs when there is an unknown column name for the managing custom post type admin screen. Action function arguments: column name, post ID. See also filter manage_${post_type}_posts_columns in the Plugin API/Filter Reference, which adds custom columns for custom post types.
password_reset 
Runs before the user’s password is reset to a random new password.
personal_options_update 
Runs when a user updates personal options from the admin screen.
plugins_loaded 
Runs after all plugins have been loaded.
profile_personal_options 
Runs at the end of the Personal Options section of the user profile editing screen.
profile_update 
Runs when a user’s profile is updated. Action function argument: user ID.
quick_edit_custom_box 
Runs when there is an unknown column name when creating the quick editor.
register_form 
Runs just before the end of the new user registration form.
register_post 
Runs before a new user registration request is processed.
restrict_manage_posts 
Runs before the list of posts to edit is put on the screen in the admin menus.
retrieve_password 
Runs when a user’s password is retrieved, to send them a reminder email. Action function argument: login name.
set_current_user 
Runs after the user has been changed by the default wp_set_current_user() function. Note that wp_set_current_user() is also a “pluggable” function, meaning that plugins can override it; see Plugin API).
show_user_profile 
Runs near the end of the user profile editing screen.
sidebar_admin_page 
Runs after the main content on the widgets admin page.
sidebar_admin_setup 
Runs early when editing the widgets displayed in sidebars.
simple_edit_form 
Runs at the end of the “simple” post editing form in the admin menus (by default the simple form is used only for bookmarklets — it doesn’t have the “advanced” sections).
update_option_(option_name) 
Runs after a WordPress option has been updated by the update_option() function. Action function arguments: old option value, new option value. You must add an action for the specific options that you want to respond to, such as ‘update_option_foo’ to respond when option “foo” has been updated.
update_option 
Runs before an option gets updated to the database.
updated_option 
Runs after an option has been updated.
upload_files_(tab) 
Runs to print a screen on the upload files admin screen; “tab” is the name of the custom action tab. Define custom tabs using the wp_upload_tabs filter (see Plugin API/Filter Reference).
user_new_form 
Runs near the end of the “Add New” user screen. Action function argument: Passes the string “add-existing-user” on multisite or “add-new-user” on single site and for network admins.
user_profile_update_errors 
Runs just before updated user details are committed to the database.
wpmu_new_user 
Runs when a user’s profile is first created in a Multisite environment. Action function argument: user ID. If not in Multisite then use user_register.
user_register 
Runs when a user’s profile is first created. Action function argument: user ID.
welcome_panel 
Allows you to hide the Welcome Panel in the Dashboard. This is also a smart filter, which hides the related Screen Option.
wp_ajax_(action) 
also: wp_ajax_nopriv_(action) – Runs to do an unknown type of AJAX request handler.
wp_authenticate 
Runs to authenticate a user when they log in. Action function arguments: array with user name and password.
wp_login 
Runs when a user logs in.
wp_logout 
Runs when a user logs out.

Dashboard “Right Now” Widget Actions

right_now_content_table_end 
Adds table rows at the bottom the content column of the Right Now Dashboard widget.
right_now_table_end 
Called after displaying the number of Spam comments in the Discussion column of the Right Now Dashboard widget.
right_now_discussion_table_end 
Called after displaying the number of Spam comments and after the right_now_table_end action in the Discussion column of the Right Now Dashboard widget.
right_now_end 
Called after the current version information is displayed on the Right Now Dashboardwidget. (Note: In v3.4, this is actually rightnow_end. See ticket #21046.)
activity_box_end 
Last action called on the Right Now Dashboard widget.

Advanced Actions

This section contains actions related to the queries WordPress uses to figure out what posts to display, the WordPress loop, activating plugins, and other fundamental-level WordPress code.

activated_plugin 
Runs any time any plugin is successfully activated
add_meta_boxes 
Runs when “edit post” page loads. (3.0+)
admin_menu 
Runs after the basic admin panel menu structure is in place.
network_admin_notices 
Runs after the admin menu is printed to network admin screens.
user_admin_notices 
Runs after the admin menu is printed to user admin screens.
admin_notices 
Runs after the admin menu is printed to screens that aren’t network- or user-admin screens.
all_admin_notices 
Runs after the admin menu is printed to all screens.
blog_privacy_selector 
Runs after the default blog privacy options are printed on the screen.
check_admin_referer 
Runs in the default check_admin_referrer() function after the nonce has been checked for security purposes, to allow a plugin to force WordPress to die for extra security reasons. Note that check_admin_referrer is also a “pluggable” function, meaning that plugins can override it; see Plugin API).
check_ajax_referer 
Runs in the default check_ajax_referer() function (which is called when an AJAX request goes to the wp-admin/admin-ajax.php script) after the user’s login and password have been successfully validated from cookies, to allow a plugin to force WordPress to die for extra security reasons. Note that check_ajax_referer is also a “pluggable” function, meaning that plugins can override it; see Plugin API).
customize_register 
Runs on every request, allowing developers to register new theme options and controls for use with the Theme Customization API (as of Version 3.4).
deactivated_plugin 
Runs any time any plugin is successfully de-activated
generate_rewrite_rules 
Runs after the rewrite rules are generated. Action function arguments: WP_Rewrite object ($wp_rewrite) by reference. Note that it is easier to use the rewrite_rules_array filter instead of this action, to modify the rewrite rules.
init 
Runs after WordPress has finished loading but before any headers are sent. Useful for intercepting $_GET or $_POST triggers.
loop_end 
Runs after the last post of the WordPress loop is processed.
loop_start 
Runs before the first post of the WordPress loop is processed.
network_admin_menu 
Runs when the basic menu structure is prepared for the Network administration page. (Administration Menus)
parse_query 
Runs at the end of query parsing in the main query or any instance of WP_Query, such as query_posts, get_posts, or get_children. Action function arguments: WP_Query object by reference.
parse_request 
Runs after the query request is parsed inside the main WordPress function wp. Action function argument: WP object ($wp) by reference.
pre_get_posts 
Runs before a query is executed in the main query or any instance of WP_Query, such as query_posts(), get_posts(), or get_children(). This hook is called after the query variable object is created, but before the query is actually run, and can be used to to alter the primary query before it is run. Also see is_main_query(). Action function arguments: WP_Query object by reference.
sanitize_comment_cookies 
Runs after cookies have been read from the HTTP request.
send_headers 
Runs after the basic HTTP headers are sent inside the main WordPress function wp(). Action function argument: WP object ($wp) by reference.
shutdown 
Runs when the page output is complete.
update_(meta_type)_meta 
Runs when a metadata gets saved.
updated_(meta_type)_meta 
Runs when a metadata has been updated.
upgrader_process_complete 
Runs when the plugin downloader/upgrader class finishes running
wp_loaded 
This hook is fired once WP, all plugins, and the theme are fully loaded and instantiated.
wp 
Executes after the query has been parsed and post(s) loaded, but before any template execution, inside the main WordPress function wp(). Useful if you need to have access to post data but can’t use templates for output. Action function argument: WP object ($wp) by reference.

thanks to: http://www.maheshchari.com/category/wordpress/

Word Press Plugin API/Filter Reference and cheetsheet.

Post, Page, and Attachment Filters

Database Reads

attachment_fields_to_edit
attachment_icon
attachment_innerHTML
content_edit_pre
excerpt_edit_pre
get_attached_file
get_enclosed
get_pages
get_pung
get_the_excerpt
get_the_guid
get_to_ping
icon_dir
icon_dir_uri
prepend_attachment
sanitize_title
single_post_title
the_content
the_content_rss
the_editor_content
the_excerpt
the_excerpt_rss
the_tags
the_title
the_title_rss
title_edit_pre
wp_dropdown_pages
wp_list_pages
wp_list_pages_excludes
wp_get_attachment_metadata
wp_get_attachment_thumb_file
wp_get_attachment_thumb_url
wp_get_attachment_url
wp_mime_type_icon
wp_title

Database Writes

add_ping
attachment_fields_to_save
attachment_max_dims
category_save_pre
comment_status_pre
content_filtered_save_pre
content_save_pre
excerpt_save_pre
name_save_pre
phone_content
ping_status_pre
post_mime_type_pre
status_save_pre
thumbnail_filename
wp_thumbnail_creation_size_limit
wp_thumbnail_max_side_length
title_save_pre
update_attached_file
wp_delete_file
wp_generate_attachment_metadata
wp_update_attachment_metadata

Comment, Trackback, and Ping Filters

comment_excerpt
comment_flood_filter
comment_post_redirect
comment_text
comment_text_rss
comments_array
comments_number
get_comment_excerpt
get_comment_ID
get_comment_text
get_comment_type
get_comments_number
post_comments_feed_link

Database Writes

comment_save_pre
pre_comment_approved
pre_comment_content
preprocess_comment
wp_insert_post_data

Category Filters

category_description
category_feed_link
category_link
get_categories
get_category
list_cats
list_cats_exclusions
single_cat_title
the_category
the_category_rss
wp_dropdown_cats
wp_list_categories

Database Writes

pre_category_description
pre_category_name
pre_category_nicename

Link Filters

attachment_link
author_feed_link
author_link
comment_reply_link
day_link
feed_link
get_comment_author_link
get_comment_author_url_link
month_link
page_link
post_link
the_permalink
year_link
tag_link

Date and Time Filters

get_comment_date
get_comment_time
get_the_modified_date
get_the_modified_time
get_the_time
the_date
the_modified_date
the_modified_time
the_time
the_weekday
the_weekday_date

Author and User Filters

login_redirect

Database Reads

author_email
comment_author
comment_author_rss
comment_email
comment_url
get_comment_author
get_comment_author_email
get_comment_author_IP
get_comment_author_url
login_errors
login_headertitle
login_headerurl
login_message
role_has_cap
sanitize_user
the_author
the_author_email

Database Writes

pre_comment_author_email
pre_comment_author_name
pre_comment_author_url
pre_comment_user_agent
pre_comment_user_ip
pre_user_id
pre_user_description
pre_user_display_name
pre_user_email
pre_user_first_name
pre_user_last_name
pre_user_login
pre_user_nicename
pre_user_nickname
pre_user_url
registration_errors
user_registration_email
validate_username

Blogroll Filters

get_bookmarks
link_category
link_description
link_rating
link_title
pre_link_description
pre_link_image
pre_link_name
pre_link_notes
pre_link_rel
pre_link_rss
pre_link_target
pre_link_url

Blog Information and Option Filters

all_options
bloginfo
bloginfo_rss
bloginfo_url
loginout
option_(option name)
pre_option_(option name)
register
upload_dir
upload_mimes

General Text Filters

attribute_escape
js_escape

Administrative Filters

autosave_interval
cat_rows
comment_edit_pre
comment_edit_redirect
comment_moderation_subject
comment_moderation_text
comment_notification_headers
comment_notification_subject
comment_notification_text
cron_schedules
custom_menu_order
default_content
default_excerpt
default_title
editable_slug
explain_nonce_(verb)-(noun)
format_to_edit
format_to_post
manage_link-manager_columns
manage_posts_columns
manage_pages_columns
menu_order
postmeta_form_limit
pre_upload_error
preview_page_link
preview_post_link
richedit_pre
show_password_fields
the_editor
user_can_richedit
user_has_cap
wp_handle_upload
wp_upload_tabs

Rich Text Editor Filters

mce_spellchecker_languages
mce_buttons, mce_buttons_2, mce_buttons_3, mce_buttons_4
mce_css
mce_external_plugins
mce_external_languages
tiny_mce_before_init

Template Filters

kubrick_header_color
kubrick_header_display
kubrick_header_image
locale_stylesheet_uri
stylesheet
stylesheet_directory
stylesheet_directory_uri
stylesheet_uri
template
template_directory
template_directory_uri
theme_root
theme_root_uri
archive_template 
author_template
category_template
comments_popup_template
comments_template
date_template
home_template
page_template
paged_template
search_template
single_template

Advanced WordPress Filters

author_rewrite_rules
category_rewrite_rules
comments_rewrite_rules
create_user_query
date_rewrite_rules
found_posts
found_posts_query
get_editable_authors
gettext
get_next_post_join
get_next_post_sort
get_next_post_where
get_others_drafts
get_previous_post_join
get_previous_post_sort
get_previous_post_where
get_users_drafts
locale
mod_rewrite_rules
post_limits
posts_distinct
posts_fields
posts_groupby
posts_join_paged
posts_orderby
posts_request
post_rewrite_rules
root_rewrite_rules
page_rewrite_rules
posts_where_paged
posts_join
posts_where
query
query_string
query_vars
request
rewrite_rules_array
search_rewrite_rules
the_posts
excerpt_length
excerpt_more
update_user_query
wp_redirect
xmlrpc_methods
wp_mail_from
wp_mail_from_name

liked this article?

  • only together we can create a truly free world
  • plz support dwaves to keep it up & running!
  • (yes the info on the internet is (mostly) free but beer is still not free (still have to work on that))
  • really really hate advertisement
  • contribute: whenever a solution was found, blog about it for others to find!
  • talk about, recommend & link to this blog and articles
  • thanks to all who contribute!
admin