{"id":24617,"date":"2018-09-20T12:00:37","date_gmt":"2018-09-20T12:00:37","guid":{"rendered":"https:\/\/www.designbombs.com\/?p=24617"},"modified":"2018-09-19T20:41:36","modified_gmt":"2018-09-19T20:41:36","slug":"wordpress-filters-cheat-sheet","status":"publish","type":"post","link":"https:\/\/www.designbombs.com\/wordpress-filters-cheat-sheet\/","title":{"rendered":"WordPress Filters Cheat Sheet"},"content":{"rendered":"<p>This cheat sheet explores a fundamental concept in WordPress development: <b>filters<\/b>.<\/p>\n<p>In WordPress, filters enable developers to intercept and modify data as a WordPress page is loading, before sending it to the browser or saving it to the database.<\/p>\n<p>Understanding how filters work isn\u2019t all that easy, partly because the concept is difficult to visualize, and also because filters are often confused with WordPress actions. Yet, it\u2019s an important concept to master because filters are one of the most common ways developers interact with WordPress.<\/p>\n<p>For these reasons, this filter cheat sheet is ideal for those new to working with filters. This cheat sheet provides an in-depth understanding of what filters do and how they work, and provides a quick reference guide for using filters in WordPress development.<\/p>\n<h2>WordPress Basics: Hooks &amp; Functions<\/h2>\n<p>Let\u2019s start with a basic overview of how WordPress works to help you understand the context of where filters fit in WordPress core code .<\/p>\n<p>A WordPress page is made up of a whole bunch of functions and database queries, with the WordPress core code and the theme working together to output text, images, stylesheets, and other resources. The browser interprets all of this data as it\u2019s processing and then displays it all together as one web page.<\/p>\n<h3>Hooks<\/h3>\n<p>Throughout the core code are <b>hooks<\/b>, which are basically placeholders developers can use to \u201chook\u201d into WordPress and insert their own custom code for processing as a page is loading.<\/p>\n<p>There are two types of hooks: <b>filters<\/b> and <b>actions<\/b>:<\/p>\n<p><b>Filter hooks<\/b> let you intercept and modify data as it\u2019s being processed. Basically, filters let you manipulate data coming out of the database before going to the browser, or coming from the browser before going into the database. For example, you might want to do something as simple as prepend a word to the title of all your blog posts, or filter out bad language in post comments.<\/p>\n<p><b>Action hooks<\/b>, on the other hand, lets you add extra functionality at specific points in the processing and loading of a page. For example, you might want to add a promotional pop-up message to your page or display a copyright message in the footer.<\/p>\n<p>Basically, <b>filter hooks change stuff<\/b> and <b>action hooks do stuff<\/b>.<\/p>\n<p>WordPress provides a huge stack of built-in filter hooks for use in WordPress development. However, you can also create your own filter hooks using the\u00a0<code><a href=\"https:\/\/developer.wordpress.org\/reference\/functions\/apply_filters\/\">apply_filters()<\/a><\/code> function, which I\u2019ll show you how to use shortly.<\/p>\n<h3>Functions<\/h3>\n<p>In order to use WordPress hooks, you need to write a <b>function<\/b>.<\/p>\n<p>A function is a piece of custom code that specifies how something will happen. For example, you could code a function to query data, output content, or perform many other tasks.<\/p>\n<p>In WordPress, if you want to \u201cchange stuff\u201d in your theme, you need to code a filter function that uses a filter hook.<\/p>\n<h2>Using Filters: Example<\/h2>\n<p>There are three basic steps involved in adding your own filters to WordPress:<\/p>\n<ol>\n<li>Coding a PHP function that filters the data.<\/li>\n<li>Hooking into and existing and appropriate filter hook in WordPress by calling <code><a href=\"https:\/\/developer.wordpress.org\/reference\/functions\/add_filter\/\">add_filter()<\/a><\/code>.<\/li>\n<li>Putting your PHP function in a WordPress\/plugin file and activating it.<\/li>\n<\/ol>\n<h3>1. Creating a Filter Function<\/h3>\n<p>Say you wanted to filter out bad language in blog post comments on your site.<\/p>\n<p>The first step is to code a function that filters your WordPress comments and either removes the bad language or replaces it with other words. For example, you could put together a list of bad words you don\u2019t want displayed on your site and replace them with a censor flag by creating the following PHP function:<\/p>\n<pre>function filter_bad_languge( $content ) {\r\n$badwords = array('fopdoogle', 'gobermouch', 'yaldson');\r\n$content = str_ireplace( $badwords, '{censored}', $content );\r\nreturn $content;\r\n}\r\n<\/pre>\n<p>Here\u2019s a breakdown of the code above:<\/p>\n<ol>\n<li>This is the code that hooks into the filter hook. It\u2019s easy to spot a custom function as it always starts with <code>function()<\/code>.<\/li>\n<li><code>filter_badlanguge<\/code> is the name of the filter function.<\/li>\n<li><code>$content<\/code> is the function\u2019s single argument.<\/li>\n<li><code>$badwords = array('fopdoogle','gobermouch','yaldson');<\/code> is the first work the function carries out. Specifically, it creates an array called <code>$badwords<\/code> and adds the words fopdoogle, gobermouch, and yaldson to that array.<\/li>\n<li><a href=\"http:\/\/www.php.net\/manual\/en\/function.str-ireplace.php\"><code>str_ireplace<\/code><\/a> loops through your content, searching for any of the words stored in the <code>$badwords<\/code> array, replacing them with \u201c<i>{censored}<\/i>,\u201d and then returning them to <code>$content<\/code><i>.<\/i><\/li>\n<li>return is very important here: it\u2019s how the function returns the filtered content back to WordPress core.<\/li>\n<\/ol>\n<h3>2. Using a Filter Hook<\/h3>\n<p>Once you\u2019ve coded your filter, you need to \u201chook\u201d it into WordPress core using a hook call. To do this, you use <code>add_filter()<\/code>:<\/p>\n<pre>add_filter( 'comment_text', 'filter_bad_language' );\r\n<\/pre>\n<p>Here\u2019s what the above code means:<\/p>\n<ol>\n<li><code>comment_text<\/code> is the name of the filter hook provided by WordPress, which we want our filter to apply to, i.e. we want our filter to work on blog post comments.<\/li>\n<li><code>filter_badlanguage<\/code> is the name of the function that we want to use for filtering.<\/li>\n<\/ol>\n<h3>3. Installing and Activating a Filter<\/h3>\n<p>The last step in order to get your filter hook working is to add your function and <code>add_filter()<\/code> call together in a PHP file. Continuing our bad language example, we would combine the code like so:<\/p>\n<pre>function filter_bad_languge( $content ) {\r\n$badwords = array('fopdoogle', 'gobermouch', 'yaldson');\r\n$content = str_ireplace( $badwords, '{censored}', $content );\r\nreturn $content;\r\n}\r\nadd_filter( 'comment_text', 'filter_bad_language' );\r\n<\/pre>\n<p>Typically, you would either add your function and call to your theme\u2019s functions.php file using a child theme, or create a new plugin. How to do this is beyond the scope of this article, but I highly encourage you read up <a href=\"https:\/\/developer.wordpress.org\/themes\/advanced-topics\/child-themes\/\">how to create a child theme<\/a> and <a href=\"https:\/\/developer.wordpress.org\/plugins\/the-basics\/\">how to create a plugin<\/a> in the WordPress Developer Handbook.<\/p>\n<p>If you decide to use your function in a plugin, you\u2019ll need to install and activate your newly created plugin in order for your code to work.<\/p>\n<h2>Using Custom Filter Hooks<\/h2>\n<p>A useful feature in WordPress plugin development is the ability to create custom hooks for use in your plugins so that other developers can extend and modify them.<\/p>\n<p>Custom hooks can be created and called in the same way that WordPress core hooks are created and called.<\/p>\n<p>There are two basic steps involved in creating and using your own custom filter hooks:<\/p>\n<ol>\n<li>Adding a custom filter hook to an existing function using <a href=\"https:\/\/developer.wordpress.org\/reference\/functions\/apply_filters\/\"><code>apply_filters()<\/code><\/a>.<\/li>\n<li>You (or another developer) coding a custom function that hooks into the custom filter hook.<\/li>\n<\/ol>\n<h3>Creating a Filter Hook<\/h3>\n<p>To create a custom hook, you add <code>apply_filters()<\/code> in your code where you would like to place a hook.<\/p>\n<p>For example, using the bad language example from above, let\u2019s say we wanted to allow other developers to add new words to be censored. You could do this by updating the function to include a filter:<\/p>\n<pre>function filter_bad_languge( $content ) {\r\n$badwords = array('fopdoogle', 'gobermouch', 'yaldson');\r\n$badwords = apply_filters('add_bad_language_filter', $badwords );\r\n$content = str_ireplace( $badwords, '{censored}', $content );\r\nreturn $content;\r\n}\r\n<\/pre>\n<p><code>add_badlanguage_filter<\/code> becomes a filter hook that can be used to modify the list of censored words, with <code>$content<\/code> being the default value to be returned.<\/p>\n<h3>Using a Custom Filter Hook<\/h3>\n<p>So what happens when another developer uses this custom filter? Well, they can remove bad words, change their names, add new words, etc. In this example, I simply want to add a new censored word:<\/p>\n<pre>function add_new_bad_words($profanities) {\r\n$extra_bad_words = array('sard', 'bescumber');\r\n$profanities = array_merge($extra_bad_words, $profanities);\r\nreturn $profanities;\r\n}\r\nadd_filter('add_bad_language_filter', 'add_new_bad_words');\r\n<\/pre>\n<p>When the add_new_bad_words function displays the list of bad words, we\u2019ll now see this:<\/p>\n<ul>\n<li>fopdoogle<\/li>\n<li>gobermouch<\/li>\n<li>yaldson<\/li>\n<li>sard<\/li>\n<li>bescumber<\/li>\n<\/ul>\n<p>(In case you haven\u2019t already googled these unusual sounding words, they\u2019re old English curse words.)<\/p>\n<h3>Naming Conflicts<\/h3>\n<p>Since you can give custom hooks any name you want, it\u2019s important that you prefix your hook names to avoid conflicts with other plugins.<\/p>\n<p>For example, a filter hook simply called post_body would be more likely to be used by another developer. This means if a WordPress user installs and activates your plugin and another developers plugin with hooks using similar names, it would lead to bugs.<\/p>\n<p>It\u2019s recommended you prefix your custom hooks with a shortened version of your name or company, i.e. <code>wbb_add_bad_language_filter<\/code>.<\/p>\n<h2>Unhooking Functions From Filters<\/h2>\n<p>In some cases, you may want your plugin to disable a filter built into WordPress or used by a conflicting plugin. You can do this by using <a href=\"https:\/\/developer.wordpress.org\/reference\/functions\/remove_filter\/\"><code>remove_filter()<\/code><\/a>.<\/p>\n<p>The <code>remove_filter()<\/code> function has three parameters: the name of the filter hook, the name of the function which should be removed, and the priority (which is only mandatory if a priority was set when the function was originally hooked to the filter).<\/p>\n<p>So to remove the add_new_bad_words I created earlier, I would use:<\/p>\n<pre>remove_filter( 'add_new_bad_words', 'add_bad_language_filter');\r\n<\/pre>\n<p>The code output would then revert to the value I specified in my original <code>apply_filters()<\/code> function.<\/p>\n<h2>Filter Hook Reference Guide<\/h2>\n<p>WordPress has hundreds of built-in filter hooks that developers can use to hook into the core code.<\/p>\n<p>The <a href=\"https:\/\/codex.wordpress.org\/Plugin_API\/Filter_Reference\">WordPress Codex<\/a> provides guidance on how to use filter hooks, which it lists using the following categories:<\/p>\n<ul>\n<li>Post, Page, and Attachment (Upload) Filters<\/li>\n<li>Comment, Trackback, and Ping Filters<\/li>\n<li>Category and Term Filters<\/li>\n<li>Link Filters<\/li>\n<li>Date and Time Filters<\/li>\n<li>Author and User Filters<\/li>\n<li>Blogroll Filters<\/li>\n<li>Blog Information and Option Filters<\/li>\n<li>General Text Filters<\/li>\n<li>Administrative Filters<\/li>\n<li>Rich Text Editor Filters<\/li>\n<li>Template Filters<\/li>\n<li>Registration &amp; Login Filters<\/li>\n<li>Redirect\/Rewrite Filters<\/li>\n<li>WP_Query Filters<\/li>\n<li>Media Filters<\/li>\n<li>Advanced WordPress Filters<\/li>\n<li>Widgets<\/li>\n<li>Admin Bar<\/li>\n<\/ul>\n<p>Many of these filter hooks are split into two sub-categories: <strong>database reads<\/strong> and <strong>database writes<\/strong>. This depends on whether a function is reading from the database prior to displaying content on a page, or you\u2019re writing code prior to saving data to the database.<\/p>\n<p>Using with hooks in WordPress started with working out what hook you need to \u201chook\u201d your code to and then writing a function to modify the data you need.<\/p>\n<h3>Post, Page, and Attachment (Upload) Filters<\/h3>\n<p><b>Database Reads<\/b><\/p>\n<ul>\n<li><code>attachment_fields_to_edit<\/code> \u2013 Applied to form fields to be displayed when editing an attachment.<\/li>\n<li><code>attachment_icon<\/code> \u2013 Applied to the icon for an attachment in the <code>get_attachment_icon<\/code> function.<\/li>\n<li><code>attachment_innerHTML<\/code> \u2013 applied to the title to be used for an attachment if there is no icon, in the <code>get_attachment_innerHTML<\/code> function.<\/li>\n<li><code>author_edit_pre<\/code> \u2013 Applied to post author prior to display for editing.<\/li>\n<li><code>body_class<\/code> \u2013 Applied to the classes for the HTML <code>&lt;body&gt;<\/code> element. Called in the get_body_class function.<\/li>\n<li><code>content_edit_pre<\/code> \u2013 Applied to post content prior to display for editing.<\/li>\n<li><code>content_filtered_edit_pre<\/code> \u2013 Applied to post content filtered prior to display for editing.<\/li>\n<li><code>excerpt_edit_pre<\/code> \u2013 Applied to post excerpt prior to display for editing.<\/li>\n<li><code>date_edit_pre<\/code> \u2013 Applied to post date prior to display for editing.<\/li>\n<li><code>date_gmt_edit_pre<\/code> \u2013 Applied to post date prior to display for editing.<\/li>\n<li><code>get_attached_file<\/code> \u2013 Applied to the attached file information retrieved by the <code>get_attached_file<\/code> function.<\/li>\n<li><code>get_enclosed<\/code> \u2013 Applied to the enclosures list for a post by the get_enclosed function.<\/li>\n<li><code>get_pages<\/code> \u2013 Applied to the list of pages returned by the get_pages function.<\/li>\n<li><code>get_pung<\/code> \u2013 Applied to the list of pinged URLs for a post by the <code>get_pung<\/code> function.<\/li>\n<li><code>get_the_archive_title<\/code> \u2013 Applied to the archive&#8217;s title in the get_the_archive_title function.<\/li>\n<li><code>get_the_excerpt<\/code> \u2013 Applied to the post&#8217;s excerpt in the get_the_excerpt function.<\/li>\n<li><code>get_the_guid<\/code> \u2013 Applied to the post&#8217;s GUID in the <code>get_the_guid<\/code> function.<\/li>\n<li><code>get_to_ping<\/code> \u2013 Applied to the list of URLs to ping for a post by the <code>get_to_ping<\/code> function.<\/li>\n<li><code>icon_dir<\/code> \u2013 Applied to the template&#8217;s image directory in several functions.<\/li>\n<li><code>icon_dir_uri<\/code> \u2013 Applied to the template&#8217;s image directory URI in several functions. Basically allows a plugin to specify that icons for MIME types should come from a different location.<\/li>\n<li><code>image_size_names_choose<\/code> \u2013 Applied to the list of image sizes selectable in the Media Library. Commonly used to make custom image sizes selectable.<\/li>\n<li><code>mime_type_edit_pre<\/code> \u2013 Applied to post mime type prior to display for editing.<\/li>\n<li><code>modified_edit_pre<\/code> \u2013 Applied to post modification date prior to display for editing.<\/li>\n<li><code>modified_gmt_edit_pre<\/code> \u2013 Applied to post modification gmt date prior to display for editing.<\/li>\n<li><code>no_texturize_shortcodes<\/code> \u2013 Applied to registered shortcodes. Can be used to exempt shortcodes from the automatic texturize function.<\/li>\n<li><code>parent_edit_pre<\/code> \u2013 Applied to post parent id prior to display for editing.<\/li>\n<li><code>password_edit_pre<\/code> \u2013 Applied to post password prior to display for editing.<\/li>\n<li><code>post_class<\/code> \u2013 Applied to the classes of the outermost HTML element for a post. Called in the <code>get_post_class<\/code> 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.<\/li>\n<li><code>pre_kses<\/code> \u2013 Applied to various content prior to being processed\/sanitized by KSES. This hook allows developers to customize what types of scripts\/tags should either be allowed in content or stripped.<\/li>\n<li><code>prepend_attachment<\/code> \u2013 Applied to the HTML to be prepended by the prepend_attachment function.<\/li>\n<li><code>protected_title_format<\/code> \u2013 Used to the change or manipulate the post title when the post is password protected.<\/li>\n<li><code>private_title_format<\/code> \u2013 Used to the change or manipulate the post title when its status is private.<\/li>\n<li><code>sanitize_title<\/code> \u2013 Applied to a post title by the <code>sanitize_title<\/code> function, after stripping out HTML tags.<\/li>\n<li><code>single_post_title<\/code> \u2013 Applied to the post title when used to create a blog page title by the <code>wp_title<\/code> and <code>single_post_title<\/code> functions.<\/li>\n<li><code>status_edit_pre<\/code> \u2013 Applied to post status prior to display for editing.<\/li>\n<li><code>the_content<\/code> \u2013 Applied to the post content retrieved from the database, prior to printing on the screen (also used in some other operations, such as trackbacks).<\/li>\n<li><code>the_content_rss<\/code> \u2013 Applied to the post content prior to including in an RSS feed. (Deprecated)<\/li>\n<li><code>the_content_feed<\/code> \u2013 Applied to the post content prior to including in an RSS feed.<\/li>\n<li><code>the_editor_content<\/code> \u2013 Applied to post content before putting it into a rich editor window.<\/li>\n<li><code>the_excerpt<\/code> \u2013 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).<\/li>\n<li><code>the_excerpt_rss<\/code> \u2013 Applied to the post excerpt prior to including in an RSS feed.<\/li>\n<li><code>the_password_form<\/code> \u2013 Applied to the password form for protected posts.<\/li>\n<li><code>the_tags<\/code> \u2013 Applied to the tags retrieved from the database, prior to printing on the screen.<\/li>\n<li><code>the_tags<\/code> \u2013 Applied to the post title retrieved from the database, prior to printing on the screen (also used in some other operations, such as trackbacks).<\/li>\n<li><code>the_title_rss<\/code> \u2013 Applied to the post title before including in an RSS feed (after first filtering with <code>the_title<\/code>.<\/li>\n<li><code>title_edit_pre<\/code> \u2013 Applied to post title prior to display for editing.<\/li>\n<li><code>type_edit_pre<\/code> \u2013 Applied to post type prior to display for editing.<\/li>\n<li><code>wp_dropdown_pages<\/code> \u2013 Applied to the HTML dropdown list of WordPress pages generated by the <code>wp_dropdown_pages<\/code> function.<\/li>\n<li><code>wp_list_pages<\/code> \u2013 Applied to the HTML list generated by the <code>wp_list_pages<\/code> function.<\/li>\n<li><code>wp_list_pages_excludes<\/code> \u2013 Applied to the list of excluded pages (an array of page IDs) in the <code>wp_list_pages<\/code> function.<\/li>\n<li><code>wp_get_attachment_metadata<\/code> \u2013 Applied to the attachment metadata retrieved by the <code>wp_get_attachment_metadata<\/code> function.<\/li>\n<li><code>wp_get_attachment_thumb_file<\/code> \u2013 Applied to the attachment thumbnail file retrieved by the <code>wp_get_attachment_thumb_file<\/code> function.<\/li>\n<li><code>wp_get_attachment_thumb_url<\/code> \u2013 Applied to the attachment thumbnail URL retrieved by the <code>wp_get_attachment_thumb_URL<\/code> function.<\/li>\n<li>wp_get_attachment_url \u2013 Applied to the attachment URL retrieved by the <code>wp_get_attachment_url<\/code> function.<\/li>\n<li><code>wp_mime_type_icon<\/code> \u2013 Applied to the MIME type icon for an attachment calculated by the <code>wp_mime_type_icon<\/code> function.<\/li>\n<li><code>wp_title<\/code> \u2013 Applied to the blog page title before sending to the browser in the <code>wp_title<\/code> function.<\/li>\n<\/ul>\n<p><b>Database Writes<\/b><\/p>\n<ul>\n<li><code>add_ping<\/code> \u2013 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.<\/li>\n<li><code>attachment_fields_to_save<\/code> \u2013\u00a0Applied to fields associated with an attachment prior to saving them in the database. Called in the <code>media_upload_form_handler<\/code> function. Filter function arguments: an array of post attributes, an array of attachment fields including the changes submitted from the form.<\/li>\n<li><code>attachment_max_dims<\/code> \u2013\u00a0Applied 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).<\/li>\n<li><code>category_save_pre<\/code> \u2013 Applied to post category comma-separated list prior to saving it in the database (also used for attachments).<\/li>\n<li><code>comment_status_pre<\/code> \u2013 Applied to post comment status prior to saving it in the database (also used for attachments).<\/li>\n<li><code>content_filtered_save_pre<\/code> \u2013 Applied to filtered post content prior to saving it in the database (also used for attachments).<\/li>\n<li><code>content_save_pre<\/code> \u2013 Applied to post content prior to saving it in the database (also used for attachments).<\/li>\n<li><code>excerpt_save_pre<\/code> \u2013 Applied to post excerpt prior to saving it in the database (also used for attachments).<\/li>\n<li><code>image_save_pre<\/code> (deprecated) \u2013 Use image_editor_save_pre instead.<\/li>\n<li><code>jpeg_quality<\/code> (deprecated) \u2013 Use <code>wp_editor_set_quality<\/code> or <code>WP_Image_Editor::set_quality()<\/code> instead.<\/li>\n<li><code>name_save_pre<\/code> (Deprecated) \u2013 Applied to post name prior to saving it in the database (also used for attachments).<\/li>\n<li><code>phone_content<\/code> \u2013 Applied to the content of a post submitted by email, before saving.<\/li>\n<li><code>ping_status_pre<\/code> \u2013 Applied to post ping status prior to saving it in the database (also used for attachments).<\/li>\n<li><code>post_mime_type_pre<\/code> \u2013 Applied to the MIME type for an attachment prior to saving it in the database.<\/li>\n<li><code>status_save_pre<\/code> \u2013 Applied to post status prior to saving it in the database.<\/li>\n<li><code>thumbnail_filename<\/code> \u2013 Applied to the file name for the thumbnail when uploading an image.<\/li>\n<li><code>title_save_pre<\/code> \u2013 Applied to post title prior to saving it in the database (also used for attachments).<\/li>\n<li><code>update_attached_file<\/code> \u2013 Applied to the attachment information prior to saving in post metadata in the update_attached_file function. Filter function arguments: attachment information, attachment ID.<\/li>\n<li><code>wp_create_thumbnail<\/code> (deprecated)<\/li>\n<li><code>wp_delete_file<\/code> \u2013 Applied to an attachment file name just before deleting.<\/li>\n<li><code>wp_generate_attachment_metadata<\/code> \u2013 Applied to the attachment metadata array before saving in the database.<\/li>\n<li><code>wp_save_image_file<\/code> (deprecated) \u2013 <code>Use<\/code> wp_save_image_editor_file instead.<\/li>\n<li><code>wp_thumbnail_creation_size_limit<\/code> \u2013 Applied to the size of the thumbnail when uploading an image. Filter function arguments: max file size, attachment ID, attachment file name.<\/li>\n<li><code>wp_thumbnail_max_side_length<\/code> \u2013 Applied to the size of the thumbnail when uploading an image. Filter function arguments: image side max size, attachment ID, attachment file name.<\/li>\n<li><code>wp_update_attachment_metadata<\/code> \u2013 Applied to the attachment metadata just before saving in the <code>wp_update_attachment_metadata<\/code> function. Filter function arguments: meta data, attachment ID.<\/li>\n<\/ul>\n<h3><b>Comment, Trackback, and Ping Filters<\/b><\/h3>\n<p><b>Database Reads<\/b><\/p>\n<ul>\n<li><code>comment_excerpt<\/code> applied to the comment excerpt by the comment_excerpt function. See also <code>get_comment_excerpt<\/code>.<\/li>\n<li><code>comment_flood_filter<\/code> \u2013 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.<\/li>\n<li><code>comment_post_redirect<\/code> \u2013 Applied to the redirect location after someone adds a comment. Filter function arguments: redirect location, comment info array.<\/li>\n<li><code>comment_text<\/code> \u2013 Applied to the comment text before displaying on the screen by the <code>comment_text<\/code> function, and in the admin menus.<\/li>\n<li><code>comment_text_rss<\/code> \u2013 Applied to the comment text prior to including in an RSS feed.<\/li>\n<li><code>comments_array<\/code> \u2013 Applied to the array of comments for a post in the comments_template function. Filter function arguments: array of comment information structures, post ID.<\/li>\n<li><code>comments_number<\/code> \u2013 Applied to the formatted text giving the number of comments generated by the comments_number function. See also <code>get_comments_number<\/code>.<\/li>\n<li><code>get_comment_excerpt<\/code> \u2013 Applied to the comment excerpt read from the database by the <code>get_comment_excerpt<\/code> function (which is also called by <code>comment_excerpt<\/code>. See also <code>comment_excerpt<\/code>.<\/li>\n<li><code>get_comment_ID<\/code> \u2013 Applied to the comment ID read from the global <code>$comments<\/code> variable by the <code>get_comment_ID<\/code> function.<\/li>\n<li><code>get_comment_text<\/code> \u2013 Applied to the comment text of the current comment in the <code>get_comment_text<\/code> function, which is also called by the <code>comment_text<\/code> function.<\/li>\n<li><code>get_comment_type<\/code> \u2013 Applied to the comment type (&#8220;comment&#8221;, &#8220;trackback&#8221;, or &#8220;pingback&#8221;) by the <code>get_comment_type<\/code> function (which is also called by <code>comment_type<\/code>).<\/li>\n<li><code>get_comments_number<\/code> \u2013 Applied to the comment count read from the <code>$post<\/code> global variable by the <code>get_comments_number<\/code> function (which is also called by the comments_number function; see also comments_number filter).<\/li>\n<li><code>post_comments_feed_link<\/code> \u2013 Applied to the feed URL generated for the comments feed by the <code>comments_rss<\/code> function.<\/li>\n<\/ul>\n<p><b>Database Writes<\/b><\/p>\n<ul>\n<li><code>comment_save_pre<\/code> \u2013 Applied to the comment data just prior to updating\/editing comment data. Function arguments: comment data array, with indices &#8220;<code>comment_post_ID<\/code>&#8220;, &#8220;<code>comment_author<\/code>&#8220;, &#8220;<code>comment_author_email<\/code>&#8220;, &#8220;<code>comment_author_url<\/code>&#8220;, &#8220;<code>comment_content<\/code>&#8220;, &#8220;<code>comment_type<\/code>&#8220;, and &#8220;<code>user_ID<\/code>&#8220;.<\/li>\n<li><code>pre_comment_approved<\/code> \u2013 Applied to the current comment&#8217;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 <code>$comment_ID<\/code> to access information about this comment.<\/li>\n<li><code>pre_comment_content<\/code> \u2013 Applied to the content of a comment prior to saving the comment in the database.<\/li>\n<li><code>preprocess_comment<\/code> \u2013 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 &#8220;<code>comment_post_ID<\/code>&#8220;, &#8220;comment_author&#8221;, &#8220;<code>comment_author_email<\/code>&#8220;, &#8220;<code>comment_author_url<\/code>&#8220;, &#8220;<code>comment_content<\/code>&#8220;, &#8220;<code>comment_type<\/code>&#8220;, and &#8220;<code>user_ID<\/code>&#8220;.<\/li>\n<li><code>wp_insert_post_data<\/code> \u2013 Applied to modified and unmodified post data in <code>wp_insert_post()<\/code> prior to update or insertion of post into database. Function arguments: modified and extended post array and sanitized post array.<\/li>\n<\/ul>\n<h3><b>Category and Term Filters<\/b><\/h3>\n<p><b>Database Reads<\/b><\/p>\n<ul>\n<li><code>category_description<\/code> \u2013 Applied to the &#8220;description&#8221; field categories by the <code>category_description<\/code> and <code>wp_list_categories<\/code> functions. Filter function arguments: description, category ID when called from <code>category_description<\/code>; description, category information array (all fields from the category table for that particular category) when called from <code>wp_list_categories<\/code>.<\/li>\n<li><code>category_feed_link<\/code> \u2013 Applied to the feed URL generated for the category feed by the <code>get_category_feed_link<\/code> function.<\/li>\n<li><code>category_link<\/code> \u2013 Applied to the URL created for a category by the <code>get_category_link<\/code> function. Filter function arguments: link URL, category ID.<\/li>\n<li><code>get_ancestors<\/code> \u2013 Applied to the list of ancestor IDs returned by the <code>get_ancestors<\/code> function (which is in turn used by many other functions). Filter function arguments: ancestor IDs array, given object ID, given object type.<\/li>\n<li><code>get_categories<\/code> \u2013 Applied to the category list generated by the <code>get_categories<\/code> function (which is in turn used by many other functions). Filter function arguments: category list, get_categories options list.<\/li>\n<li><code>get_category<\/code> \u2013 Applied to the category information that the get_category function looks up, which is basically an array of all the fields in WordPress&#8217;s category table for a particular category ID.<\/li>\n<li><code>list_cats<\/code> \u2013 Called for two different purposes: 1. the <code>wp_dropdown_categories<\/code> function uses it to filter the show_option_all and <code>show_option_none<\/code> arguments (which are used to put options &#8220;All&#8221; and &#8220;None&#8221; in category drop-down lists). No additional filter function arguments; and 2: the <code>wp_list_categories<\/code> 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).<\/li>\n<li><code>list_cats_exclusions<\/code> \u2013 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, <code>get_categories<\/code> options list.<\/li>\n<li><code>single_cat_title<\/code> \u2013 Applied to the category name when used to create a blog page title by the <code>wp_title<\/code> and <code>single_cat_title<\/code> functions.<\/li>\n<li>the_category \u2013 Applied to the list of categories (an HTML list with links) created by the <code>get_the_category_list<\/code> function. Filter function arguments: generated HTML text, list separator being used (empty string means it is a default LI list), parents argument to <code>get_the_category_list<\/code>.<\/li>\n<li><code>the_category_rss<\/code> \u2013 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 (&#8220;rdf&#8221; or &#8220;rss&#8221; generally).<\/li>\n<li><code>wp_dropdown_cats<\/code> \u2013 Applied to the drop-down category list (a text string containing HTML option elements) generated by the <code>wp_dropdown_categories<\/code> function.<\/li>\n<li><code>wp_list_categories<\/code> \u2013 Applied to the category list (an HTML list) generated by the <code>wp_list_categories<\/code> function.<\/li>\n<li><code>wp_get_object_terms<\/code> \u2013 Applied to the list of terms (an array of objects) generated by the <code>wp_get_object_terms<\/code> function, which is called by a number of category\/term related functions, such as <code>get_the_terms<\/code> and <code>get_the_category<\/code>.<\/li>\n<\/ul>\n<p><b>Database Writes<\/b><\/p>\n<ul>\n<li><code>pre_category_description<\/code> \u2013 Applied to the category description prior to saving in the database.<\/li>\n<li><code>wp_update_term_parent<\/code> \u2013 Filter term parent before update to term is applied, hook to this filter to see if it will cause a hierarchy loop.<\/li>\n<li><code>edit_terms<\/code> \u2013\u00a0 (actually an action, but often used like a filter) hooked in prior to saving taxonomy\/category change in the database<\/li>\n<li><code>pre_category_name<\/code> \u2013 Applied to the category name prior to saving in the database.<\/li>\n<li><code>pre_category_nicename<\/code> \u2013 Applied to the category nice name prior to saving in the database.<\/li>\n<\/ul>\n<h3><b>Link Filters<\/b><\/h3>\n<p>These hooks let you filter links related to posts, pages, archives, and feeds.<\/p>\n<ul>\n<li><code>attachment_link<\/code> \u2013 Applied to the calculated attachment permalink by the <code>get_attachment_link<\/code> function. Filter function arguments: link URL, attachment ID.<\/li>\n<li><code>author_feed_link<\/code> \u2013 Applied to the feed URL generated for the author feed by the <code>get_author_rss_link<\/code> function.<\/li>\n<li>author_link \u2013 Applied to the author&#8217;s archive permalink created by the <code>get_author_posts_url<\/code> function. Filter function arguments: link URL, author ID, author&#8217;s &#8220;nice&#8221; name. Note that <code>get_author_posts_url<\/code> is called within functions <code>wp_list_authors<\/code> and <code>the_author_posts_link<\/code>.<\/li>\n<li><code>comment_reply_link<\/code> \u2013 Applied to the link generated for replying to a specific comment by the <code>get_comment_reply_link<\/code> function which is called within function <code>comments_template<\/code>. Filter function arguments: link (string), custom options (array), current comment (object), current post (object).<\/li>\n<li><code>day_link<\/code> \u2013 Applied to the link URL for a daily archive by the <code>get_day_link<\/code> function. Filter function arguments: URL, year, month number, day number.<\/li>\n<li><code>feed_link<\/code> \u2013 Applied to the link URL for a feed by the <code>get_feed_link<\/code> function. Filter function arguments: URL, type of feed (e.g. &#8220;rss2&#8221;, &#8220;atom&#8221;, etc.).<\/li>\n<li><code>get_comment_author_link<\/code> \u2013 Applied to the HTML generated for the author&#8217;s link on a comment, in the <code>get_comment_author_link<\/code> function (which is also called by comment_author_link. Action function arguments: user name.<\/li>\n<li><code>get_comment_author_url_link<\/code> \u2013 Applied to the HTML generated for the author&#8217;s link on a comment, in the <code>get_comment_author_url_link<\/code> function (which is also called by <code>comment_author_link<\/code>).<\/li>\n<li><code>month_link<\/code> \u2013 Applied to the link URL for a monthly archive by the <code>get_month_link<\/code> function. Filter function arguments: URL, year, month number.<\/li>\n<li><code>page_link<\/code> \u2013 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 <code>_get_page_link<\/code> that can be used to filter the URLS of pages that are not designated as the blog&#8217;s home page (same arguments). Note that this only applies to WordPress pages, not posts, custom post types, or attachments.<\/li>\n<li><code>post_link<\/code> \u2013 Applied to the calculated post permalink by the get_permalink function, which is also called by the the_permalink, <code>post_permalink<\/code>, <code>previous_post_link<\/code>, and <code>next_post_link<\/code> 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).<\/li>\n<li><code>post_type_link<\/code> \u2013 Applied to the calculated custom post type permalink by the <code>get_post_permalink<\/code> function.<\/li>\n<li><code>the_permalink<\/code> \u2013 Applied to the permalink URL for a post prior to printing by function <code>the_permalink<\/code>.<\/li>\n<li><code>year_link<\/code> \u2013 Applied to the link URL for a yearly archive by the <code>get_year_link<\/code> function. Filter function arguments: URL, year.<\/li>\n<li><code>tag_link<\/code> \u2013 Applied to the URL created for a tag by the <code>get_tag_link<\/code> function. Filter function arguments: link URL, tag ID.<\/li>\n<li><code>term_link<\/code> \u2013 Applied to the URL created for a term by the <code>get_term_link<\/code> function. Filter function arguments: term link URL, term object and taxonomy slug.<\/li>\n<\/ul>\n<h3><b>Date and Time Filters<\/b><\/h3>\n<ul>\n<li><code>get_comment_date<\/code> \u2013 Applied to the formatted comment date generated by the <code>get_comment_date<\/code> function (which is also called by <code>comment_date<\/code>).<\/li>\n<li><code>get_comment_time<\/code> \u2013 Applied to the formatted comment time in the get_comment_time function (which is also called by comment_time).<\/li>\n<li><code>get_the_modified_date<\/code> \u2013 Applied to the formatted post modification date generated by the <code>get_the_modified_date<\/code> function (which is also called by the <code>the_modified_date<\/code> function).<\/li>\n<li><code>get_the_modified_time<\/code> \u2013 Applied to the formatted post modification time generated by the <code>get_the_modified_time<\/code> and <code>get_post_modified_time<\/code> functions (which are also called by the the_modified_time function).<\/li>\n<li><code>get_the_time<\/code> \u2013 Applied to the formatted post time generated by the get_the_time and <code>get_post_time<\/code> functions (which are also called by the the_time function).<\/li>\n<li><code>the_date<\/code> \u2013 Applied to the formatted post date generated by the the_date function.<\/li>\n<li><code>the_modified_date<\/code> \u2013 Applied to the formatted post modification date generated by the <code>the_modified_date<\/code> function.<\/li>\n<li><code>the_modified_time<\/code> \u2013 Applied to the formatted post modification time generated by the <code>the_modified_time<\/code> function.<\/li>\n<li><code>the_time<\/code> \u2013 Applied to the formatted post time generated by the <code>the_time<\/code> function.<\/li>\n<li><code>the_weekday<\/code> \u2013 Applied to the post date weekday name generated by the <code>the_weekday<\/code> function.<\/li>\n<li><code>the_weekday_date<\/code> \u2013 Applied to the post date weekday name generated by the <code>the_weekday_date<\/code> 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&#8217;s weekday is different from the previous post&#8217;s weekday).<\/li>\n<\/ul>\n<h3><b>Author and User Filters<\/b><\/h3>\n<ul>\n<li><code>login_body_class<\/code> \u2013 Allows filtering of the body class applied to the login screen in <code>login_header()<\/code>.<\/li>\n<li><code>login_redirect<\/code> \u2013 Applied to the <code>redirect_to<\/code> post\/get variable during the user login process.<\/li>\n<li><code>user_contactmethods<\/code> \u2013 Applied to the contact methods fields on the user profile page. (old page is here: <code>contactmethods<\/code>)<\/li>\n<li><code>update_(meta_type)_metadata<\/code> \u2013 Applied before a (user) metadata gets updated.<\/li>\n<\/ul>\n<p><b>Database Reads<\/b><\/p>\n<ul>\n<li><code>author_email<\/code> \u2013 Applied to the comment author&#8217;s email address retrieved from the database by the <code>comment_author_email<\/code> function. See also <code>get_comment_author_email<\/code>.<\/li>\n<li><code>comment_author<\/code> \u2013 Applied to the comment author&#8217;s name retrieved from the database by the <code>comment_author<\/code> function. See also <code>get_comment_author<\/code>.<\/li>\n<li><code>comment_author_rss<\/code> \u2013 Applied to the comment author&#8217;s name prior to including in an RSS feed.<\/li>\n<li><code>comment_email<\/code> \u2013 Applied to the comment author&#8217;s email address retrieved from the database by the <code>comment_author_email_link<\/code> function.<\/li>\n<li><code>comment_url<\/code> \u2013 Applied to the comment author&#8217;s URL retrieved from the database by the <code>comment_author_url<\/code> function (see also <code>get_comment_author_url<\/code>).<\/li>\n<li><code>get_comment_author<\/code> \u2013 Applied to the comment author&#8217;s name retrieved from the database by <code>get_comment_author<\/code>, which is also called by <code>comment_author<\/code>. See also <code>comment_author<\/code>.<\/li>\n<li><code>get_comment_author_email<\/code> \u2013 Applied to the comment author&#8217;s email address retrieved from the database by <code>get_comment_author_email<\/code>, which is also called by <code>comment_author_email<\/code>. See also <code>author_email<\/code>.<\/li>\n<li><code>get_comment_author_IP<\/code> \u2013 Applied to the comment author&#8217;s IP address retrieved from the database by the <code>get_comment_author_IP<\/code> function, which is also called by <code>comment_author_IP<\/code>.<\/li>\n<li><code>get_comment_author_url<\/code> \u2013 Applied to the comment author&#8217;s URL retrieved from the database by the <code>get_comment_author_url<\/code> function, which is also called by <code>comment_author_url<\/code>. See also <code>comment_url<\/code>.<\/li>\n<li><code>login_errors<\/code> \u2013 Applied to the login error message printed on the login screen.<\/li>\n<li><code>login_headertitle<\/code> \u2013 Applied to the title for the login header URL (Powered by WordPress by default) printed on the login screen.<\/li>\n<li><code>login_headerurl<\/code> \u2013 Applied to the login header URL (points to wordpress.org by default) printed on the login screen.<\/li>\n<li><code>login_message<\/code> \u2013 Applied to the login message printed on the login screen.<\/li>\n<li><code>role_has_cap<\/code> \u2013 Applied to a role&#8217;s capabilities list in the <code>WP_Role-&gt;has_cap<\/code> function. Filter function arguments are the capabilities list to be filtered, the capability being questioned, and the role&#8217;s name.<\/li>\n<li><code>sanitize_user<\/code> \u2013 Applied to a user name by the <code>sanitize_user<\/code> function. Filter function arguments: user name (after some cleaning up), raw user name, strict (true or false to use strict ASCII or not).<\/li>\n<li><code>the_author<\/code> \u2013 Applied to a post author&#8217;s displayed name by the <code>get_the_author<\/code> function, which is also called by the <code>the_author<\/code> function.<\/li>\n<li><code>the_author_email<\/code> \u2013 Applied to a post author&#8217;s email address by the <code>the_author_email<\/code> function.<\/li>\n<li><code>user_search_columns<\/code> \u2013 Applied to the list of columns in the <code>wp_users<\/code> table to include in the <code>WHERE<\/code> clause inside <code>WP_User_Query<\/code>.<\/li>\n<\/ul>\n<p><b>Database Writes<\/b><\/p>\n<ul>\n<li><code>pre_comment_author_email<\/code> \u2013 Applied to a comment author&#8217;s email address prior to saving the comment in the database.<\/li>\n<li><code>pre_comment_author_name<\/code> \u2013 Applied to a comment author&#8217;s user name prior to saving the comment in the database.<\/li>\n<li><code>pre_comment_author_url<\/code> \u2013 Applied to a comment author&#8217;s URL prior to saving the comment in the database.<\/li>\n<li><code>pre_comment_user_agent<\/code> \u2013 Applied to the comment author&#8217;s user agent prior to saving the comment in the database.<\/li>\n<li><code>pre_comment_user_ip<\/code> \u2013 Applied to the comment author&#8217;s IP address prior to saving the comment in the database.<\/li>\n<li><code>pre_user_id<\/code> \u2013 Applied to the comment author&#8217;s user ID prior to saving the comment in the database.<\/li>\n<li><code>pre_user_description<\/code> \u2013 Applied to the user&#8217;s description prior to saving in the database.<\/li>\n<li><code>pre_user_display_name<\/code> \u2013 Applied to the user&#8217;s displayed name prior to saving in the database.<\/li>\n<li><code>pre_user_email<\/code> \u2013 Applied to the user&#8217;s email address prior to saving in the database.<\/li>\n<li><code>pre_user_first_name<\/code> \u2013 Applied to the user&#8217;s first name prior to saving in the database.<\/li>\n<li><code>pre_user_last_name<\/code> \u2013 Applied to the user&#8217;s last name prior to saving in the database.<\/li>\n<li><code>pre_user_login<\/code> \u2013 Applied to the user&#8217;s login name prior to saving in the database.<\/li>\n<li><code>pre_user_nicename<\/code> \u2013 Applied to the user&#8217;s &#8220;nice name&#8221; prior to saving in the database.<\/li>\n<li><code>pre_user_nickname<\/code> \u2013 Applied to the user&#8217;s nickname prior to saving in the database.<\/li>\n<li><code>pre_user_url<\/code> \u2013 Applied to the user&#8217;s URL prior to saving in the database.<\/li>\n<li><code>registration_errors<\/code> \u2013 Applied to the list of registration errors generated while registering a user for a new account.<\/li>\n<li><code>user_registration_email<\/code> \u2013 Applied to the user&#8217;s email address read from the registration page, prior to trying to register the person as a new user.<\/li>\n<li><code>validate_username<\/code> \u2013 Applied to the validation result on a new user name. Filter function arguments: valid (true\/false), user name being validated.<\/li>\n<\/ul>\n<h3><b>Blogroll Filters<\/b><\/h3>\n<p>These hooks are for filtering content related to\u00a0blogroll links.<\/p>\n<ul>\n<li><code>get_bookmarks<\/code> \u2013 Applied to link\/blogroll database query results by the <code>get_bookmarks<\/code> function. Filter function arguments: database query results list, <code>get_bookmarks<\/code> arguments list.<\/li>\n<li><code>link_category<\/code> \u2013 Applied to the link category by the get_links_list and <code>wp_list_bookmarks<\/code> functions (as of WordPress 2.2).<\/li>\n<li><code>link_description<\/code> \u2013 Applied to the link description by the get_links and wp_list_bookmarks functions (as of WordPress 2.2).<\/li>\n<li><code>link_rating<\/code> \u2013 Applied to the link rating number by the <code>get_linkrating<\/code> function.<\/li>\n<li><code>link_title<\/code> \u2013 Applied to the link title by the get_links and <code>wp_list_bookmarks<\/code> functions (as of WordPress 2.2)<\/li>\n<li><code>pre_link_description<\/code> \u2013 Applied to the link description prior to saving in the database.<\/li>\n<li><code>pre_link_image<\/code> \u2013 Applied to the link image prior to saving in the database.<\/li>\n<li><code>pre_link_name<\/code> \u2013 Applied to the link name prior to saving in the database.<\/li>\n<li><code>pre_link_notes<\/code> \u2013 Applied to the link notes prior to saving in the database.<\/li>\n<li><code>pre_link_rel<\/code> \u2013 Applied to the link relation information prior to saving in the database.<\/li>\n<li><code>pre_link_rss<\/code> \u2013 Applied to the link RSS URL prior to saving in the database.<\/li>\n<li><code>pre_link_target<\/code> \u2013 Applied to the link target information prior to saving in the database.<\/li>\n<li><code>pre_link_url<\/code> \u2013 Applied to the link URL prior to saving in the database.<\/li>\n<\/ul>\n<h3><b>Blog Information and Option Filters<\/b><\/h3>\n<ul>\n<li><code>all_options<\/code> \u2013 Applied to the option list retrieved from the database by the <code>get_alloptions<\/code> function.<\/li>\n<li><code>all_plugins<\/code> \u2013 Applied to the list of plugins retrieved for display in the plugins list table.<\/li>\n<li><code>bloginfo<\/code> \u2013 Applied to the blog option information retrieved from the database by the <code>bloginfo<\/code> function, after first retrieving the information with the <code>get_bloginfo<\/code> function. A second argument <code>$show<\/code> gives the name of the <code>bloginfo<\/code> option that was requested. Note that <code>bloginfo(\"url\")<\/code>, <code>bloginfo(\"directory\")<\/code> and <code>bloginfo(\"home\")<\/code> do not use this filtering function (see <code>bloginfo_url<\/code>).<\/li>\n<li><code>bloginfo_rss<\/code> \u2013 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.<\/li>\n<li><code>bloginfo_url<\/code> \u2013 Applied to the the output of <code>bloginfo(\"url\")<\/code>, <code>bloginfo(\"directory\")<\/code> and <code>bloginfo(\"home\")<\/code> before returning the information.<\/li>\n<li><code>loginout<\/code> \u2013 Applied to the HTML link for logging in and out (generally placed in the sidebar) generated by the wp_loginout function.<\/li>\n<li><code>lostpassword_url<\/code> \u2013 Applied to the URL that allows users to reset their passwords.<\/li>\n<li><code>option_(option name)<\/code> \u2013 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 &#8220;option_foo&#8221; to filter the output of get_option(&#8220;foo&#8221;).<\/li>\n<li><code>pre_get_space_used<\/code> \u2013 Applied to the <code>get_space_used()<\/code> function to provide an alternative way of displaying storage space used. Returning false from this filter will revert to default display behavior (used <code>wp_upload_dir()<\/code> directory space in megabytes).<\/li>\n<li><code>pre_option_(option name)<\/code> \u2013 Applied to the option value retrieved from the database by the <code>get_alloptions<\/code> function, after unserializing (which decodes array-based options). To use this filter, you will need to add filters for specific options names, such as &#8220;<code>pre_option_foo<\/code>&#8221; to filter the option &#8220;foo&#8221;.<\/li>\n<li><code>pre_update_option_(option name)<\/code> \u2013 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 &#8220;<code>pre_update_option_foo<\/code>&#8221; to filter the option &#8220;foo&#8221;.<\/li>\n<li><code>register<\/code> \u2013 Applied to the sidebar link created for the user to register (if allowed) or visit the admin panels (if already logged in) by the <code>wp_register<\/code> function.<\/li>\n<li><code>upload_dir<\/code> \u2013 Applied to the directory to be used for uploads calculated by the <code>wp_upload_dir<\/code> function. Filter function argument is an array with components &#8220;dir&#8221; (the upload directory path), &#8220;url&#8221; (the URL of the upload directory), and &#8220;error&#8221; (which you can set to true if you want to generate an error).<\/li>\n<li><code>upload_mimes<\/code> \u2013 Allows a filter function to return a list of MIME types for uploads, if there is no MIME list input to the <code>wp_check_filetype<\/code> 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.<\/li>\n<\/ul>\n<h3><b>General Text Filters<\/b><\/h3>\n<ul>\n<li><code>attribute_escape<\/code> \u2013 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.<\/li>\n<li><code>js_escape<\/code> \u2013 Applied to JavaScript code before sending to the browser in the js_escape function.<\/li>\n<li><code>sanitize_key<\/code> \u2013 Applied to key before using it for your settings, field, or other needs, generated by <code>sanitize_key<\/code> function<\/li>\n<\/ul>\n<h3><b>Administrative Filters<\/b><\/h3>\n<p>These hooks let you filter content related to the WordPress dashboard, including content editing screens.<\/p>\n<ul>\n<li><code>admin_user_info_links<\/code> \u2013 Applied to the user profile and info links in the WordPress admin quick menu.<\/li>\n<li><code>autosave_interval<\/code> \u2013 Applied to the interval for auto-saving posts.<\/li>\n<li><code>bulk_actions<\/code> \u2013 Applied to an array of bulk items in admin bulk action drop-downs.<\/li>\n<li><code>bulk_post_updated_messages<\/code> \u2013 Applied to an array of bulk action updated messages.<\/li>\n<li><code>cat_rows<\/code> \u2013 Applied to the category rows HTML generated for managing categories in the admin menus.<\/li>\n<li><code>comment_edit_pre<\/code> \u2013 Applied to comment content prior to display in the editing screen.<\/li>\n<li>comment_edit_redirect \u2013 Applied to the redirect location after someone edits a comment in the admin <code>menus<\/code>. Filter function arguments: redirect location, comment ID.<\/li>\n<li><code>comment_moderation_subject<\/code> \u2013 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 <code>wp_notify_moderator<\/code> function, which is a &#8220;pluggable&#8221; function, meaning that plugins can override it; see Plugin API).<\/li>\n<li><code>comment_moderation_text<\/code> \u2013 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 <code>wp_notify_moderator<\/code> function, which is a &#8220;pluggable&#8221; function, meaning that plugins can override it; see Plugin API).<\/li>\n<li><code>comment_notification_headers<\/code> \u2013 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 <code>wp_notify_postauthor<\/code> function, which is a &#8220;pluggable&#8221; function, meaning that plugins can override it; see Plugin API).<\/li>\n<li><code>comment_notification_subject<\/code> \u2013 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 <code>wp_notify_postauthor<\/code> function, which is a &#8220;pluggable&#8221; function, meaning that plugins can override it; see Plugin API).<\/li>\n<li><code>comment_notification_text<\/code> \u2013 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 <code>wp_notify_postauthor<\/code> function, which is a &#8220;pluggable&#8221; function, meaning that plugins can override it; see Plugin API).<\/li>\n<li><code>comment_row_actions<\/code> \u2013 Applied to the list of action links under each comment row (like Reply, Quick Edit, Edit).<\/li>\n<li><code>cron_request<\/code> \u2013 Allows filtering of the URL, key and arguments passed to <code>wp_remote_post()<\/code> in <code>spawn_cron()<\/code>.<\/li>\n<li><code>cron_schedules<\/code> \u2013 Applied to an empty array to allow a plugin to generate cron schedules in the <code>wp_get_schedules<\/code> function.<\/li>\n<li><code>custom_menu_order<\/code> \u2013 Used to activate the &#8216;<code>menu_order<\/code>&#8216; filter.<\/li>\n<li><code>default_content<\/code> \u2013 Applied to the default post content prior to opening the editor for a new post.<\/li>\n<li><code>default_excerpt<\/code> \u2013 Applied to the default post excerpt prior to opening the editor for a new post.<\/li>\n<li><code>default_title<\/code> \u2013 Applied to the default post title prior to opening the editor for a new post.<\/li>\n<li><code>editable_slug<\/code> \u2013 Applied to the post, page, tag or category slug by the <code>get_sample_permalink<\/code> function.<\/li>\n<li><code>format_to_edit<\/code> \u2013 Applied to post content, excerpt, title, and password by the <code>format_to_edit<\/code> 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.<\/li>\n<li><code>format_to_post<\/code> \u2013 Applied to post content by the <code>format_to_post<\/code> function, which is not used in WordPress by default.<\/li>\n<li><code>manage_edit-${post_type}_columns<\/code> \u2013 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 <code>manage_${post_type}_posts_custom_column<\/code>, which puts the column information into the edit screen.<\/li>\n<li><code>manage_link-manager_columns<\/code> \u2013 Was <code>manage_link_columns<\/code> 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 <code>manage_link_custom_column<\/code>, which puts the column information into the edit screen.<\/li>\n<li>manage_posts_columns \u2013 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 <code>manage_posts_custom_column<\/code>, which puts the column information into the edit screen. (see Scompt&#8217;s tutorial for examples and use.)<\/li>\n<li><code>manage_pages_columns<\/code> \u2013 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 <code>manage_pages_custom_column<\/code>, which puts the column information into the edit screen.<\/li>\n<li><code>manage_users_columns<\/code><\/li>\n<li><code>manage_users_custom_column<\/code><\/li>\n<li><code>manage_users_sortable_columns<\/code><\/li>\n<li><code>media_row_actions<\/code> \u2013 Applied to the list of action links under each file in the Media Library (like View, Edit).<\/li>\n<li><code>menu_order<\/code> \u2013 Applied to the array for the admin menu order. Must be activated with the &#8216;<code>custom_menu_order<\/code>&#8216; filter before.<\/li>\n<li><code>nonce_life<\/code> \u2013 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.<\/li>\n<li><code>nonce_user_logged_out<\/code> \u2013 Applied to the current user ID used to generate or verify a nonce when the user is logged out.<\/li>\n<li><code>plugin_row_meta<\/code> \u2013 Add additional links below each plugin on the plugins page.<\/li>\n<li><code>postmeta_form_limit<\/code> \u2013 Applied to the number of post-meta information items shown on the post edit screen.<\/li>\n<li><code>post_row_actions<\/code> \u2013 Applied to the list of action links (like Quick Edit, Edit, View, Preview) under each post in the Posts &gt; All Posts section.<\/li>\n<li><code>post_updated_messages<\/code> \u2013 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 &#8220;customizing the messages&#8221; in the <code>register_post_type<\/code> documentation.<\/li>\n<li><code>pre_upload_error<\/code> \u2013 Applied to allow a plugin to create an XMLRPC error for uploading files.<\/li>\n<li><code>preview_page_link<\/code> \u2013 Applied to the link on the page editing screen that shows the page preview at the bottom of the screen.<\/li>\n<li><code>preview_post_link<\/code> \u2013 Applied to the link on the post editing screen that shows the post preview at the bottom of the screen.<\/li>\n<li><code>richedit_pre<\/code> \u2013 Applied to post content by the <code>wp_richedit_pre<\/code> function, before displaying in the rich text editor.<\/li>\n<li><code>schedule_event<\/code> \u2013 Applied to each recurring and single event as it is added to the cron schedule.<\/li>\n<li><code>set-screen-option<\/code> \u2013 Filter a screen option value before it is set.<\/li>\n<li><code>show_password_fields<\/code> \u2013 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&#8217;t).<\/li>\n<li><code>terms_to_edit<\/code> \u2013 Applied to the CSV of terms (for each taxonomy) that is used to show which terms are attached to the post.<\/li>\n<li><code>the_editor<\/code> \u2013 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.<\/li>\n<li><code>user_can_richedit<\/code> \u2013 Applied to the calculation of whether the user&#8217;s browser has rich editing capabilities, and whether the user wants to use the rich editor, in the <code>user_can_richedit<\/code> function. Filter function argument and return value is true\/false if the current user can\/cannot use the rich editor.<\/li>\n<li><code>user_has_cap<\/code> \u2013 Applied to a user&#8217;s capabilities list in the <code>WP_User-&gt;has_cap<\/code> function (which is called by the <code>current_user_can<\/code> 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.)<\/li>\n<li><code>wp_handle_upload_prefilter<\/code> \u2013 Applied to the upload information when uploading a file. Filter function argument: array which represents a single element of <code>$_FILES<\/code>.<\/li>\n<li><code>wp_handle_upload<\/code> \u2013 Applied to the upload information when uploading a file. Filter function argument: array with elements &#8220;file&#8221; (file name), &#8220;url&#8221;, &#8220;type&#8221;.<\/li>\n<li><code>wp_revisions_to_keep<\/code> \u2013 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.<\/li>\n<li><code>wp_terms_checklist_args<\/code> \u2013 Applied to arguments of the <code>wp_terms_checklist()<\/code> function. Filter function argument: array of checklist arguments, post ID.<\/li>\n<li><code>wp_upload_tabs<\/code> \u2013 Applied to the list of custom tabs to display on the upload management admin screen. Use action <code>upload_files_(tab)<\/code> to display a page for your custom tab (see Plugin API\/Action Reference).<\/li>\n<li><code>media_upload_tabs<\/code> \u2013 Applied to the list of custom tabs to display on the upload management admin screen. Use action <code>upload_files_(tab)<\/code> to display a page for your custom tab (see Plugin API\/Action Reference).<\/li>\n<li><code>plugin_action_links_<\/code>(plugin file name) \u2013 Applied to the list of links to display on the plugins page (beside the activate\/deactivate links).<\/li>\n<li><code>views_edit-post<\/code> \u2013 Applied to the list posts eg All (30) | Published (22) | Draft (5) | Pending (2) | Trash (1)<\/li>\n<\/ul>\n<h3><b>Rich Text Editor Filters<\/b><\/h3>\n<p>Using these hooks, you can modify the configuration of TinyMCE, the rich text editor.<\/p>\n<ul>\n<li><code>mce_spellchecker_languages<\/code> \u2013 Applied to the language selection available in the spell checker.<\/li>\n<li><code>mce_buttons<\/code>, <code>mce_buttons_2<\/code>, <code>mce_buttons_3<\/code>, <code>mce_buttons_4<\/code> \u2013 Applied to the rows of buttons for the rich editor toolbar (each is an array of button names).<\/li>\n<li><code>mce_css<\/code> \u2013 Applied to the CSS file URL for the rich text editor.<\/li>\n<li><code>mce_external_plugins<\/code> \u2013 Applied to the array of external plugins to be loaded by the rich text editor.<\/li>\n<li><code>mce_external_languages<\/code> \u2013 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).<\/li>\n<li><code>tiny_mce_before_init<\/code> \u2013 Applied to the whole init array for the editor.<\/li>\n<\/ul>\n<h3><b>Template Filters<\/b><\/h3>\n<p>The filter hooks in this section allow you to work with\u00a0themes, templates, and style files.<\/p>\n<ul>\n<li><code>locale_stylesheet_uri<\/code> \u2013 Applied to the locale-specific stylesheet URI returned by the <code>get_locale_stylesheet_uri<\/code> function. Filter function arguments: URI, stylesheet directory URI.<\/li>\n<li><code>stylesheet<\/code> \u2013 Applied to the stylesheet returned by the <code>get_stylesheet<\/code> function.<\/li>\n<li><code>stylesheet_directory<\/code> \u2013 Applied to the stylesheet directory returned by the <code>get_stylesheet_directory<\/code> function. Filter function arguments: stylesheet directory, stylesheet.<\/li>\n<li><code>stylesheet_directory_uri<\/code> \u2013 Applied to the stylesheet directory URI returned by the <code>get_stylesheet_directory_uri<\/code> function. Filter function arguments: stylesheet directory URI, stylesheet.<\/li>\n<li><code>stylesheet_uri<\/code> \u2013 Applied to the stylesheet URI returned by the <code>get_stylesheet_uri<\/code> function. Filter function arguments: stylesheet URI, stylesheet.<\/li>\n<li><code>template<\/code> \u2013 Applied to the template returned by the get_template function.<\/li>\n<li><code>template_directory<\/code> \u2013 Applied to the template directory returned by the <code>get_template_directory<\/code> function. Filter function arguments: template directory, template.<\/li>\n<li><code>template_directory_uri<\/code> \u2013 Applied to the template directory URI returned by the <code>get_template_directory_uri<\/code> function. Filter function arguments: template directory URI, template.<\/li>\n<li><code>theme_root<\/code> \u2013 Applied to the theme root directory (normally wp-content\/themes) returned by the get_theme_root function.<\/li>\n<li><code>theme_root_uri<\/code> \u2013 Applied to the theme root directory URI returned by the <code>get_theme_root_uri<\/code> 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 <code>template_redirect<\/code> 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.<\/li>\n<li><code>404_template<\/code><\/li>\n<li><code>archive_template<\/code> \u2013 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.<\/li>\n<li><code>attachment_template<\/code><\/li>\n<li><code>author_template<\/code><\/li>\n<li><code>category_template<\/code><\/li>\n<li><code>comments_popup_template<\/code><\/li>\n<li><code>comments_template<\/code> \u2013 The &#8220;<code>comments_template<\/code>&#8221; filter can be used to load a custom template form a plugin which replace the themes default comment template.<\/li>\n<li><code>date_template<\/code><\/li>\n<li><code>home_template<\/code><\/li>\n<li><code>page_template<\/code><\/li>\n<li><code>paged_template<\/code><\/li>\n<li><code>search_template<\/code><\/li>\n<li><code>single_template<\/code> &#8211; 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.<\/li>\n<li><code>shortcut_link<\/code> \u2013 Applied to the &#8220;Press This&#8221; bookmarklet link.<\/li>\n<li>template_include<\/li>\n<li><code>wp_nav_menu_args<\/code> \u2013 Applied to the arguments of the <code>wp_nav_menu<\/code> function.<\/li>\n<li><code>wp_nav_menu_items<\/code> \u2013 Filter the HTML list content for navigation menus.<\/li>\n<\/ul>\n<h3><b>Registration &amp; Login Filters<\/b><\/h3>\n<ul>\n<li><code>authenticate<\/code> \u2013 Allows basic authentication to be performed on login based on username and password.<\/li>\n<li><code>registration_errors<\/code> \u2013 Applied to the list of registration errors generated while registering a user for a new account.<\/li>\n<li><code>user_registration_email<\/code> \u2013 Applied to the user&#8217;s email address read from the registration page, prior to trying to register the person as a new user.<\/li>\n<li><code>validate_username<\/code> \u2013 Applied to the validation result on a new user name. Filter function arguments: valid (true\/false), user name being validated.<\/li>\n<li><code>wp_authenticate_user<\/code> \u2013 Applied when a user attempted to log in, after WordPress validates username and password, but before validation errors are checked.<\/li>\n<\/ul>\n<h3><b>Redirect\/Rewrite Filters \u2013 Advanced<\/b><\/h3>\n<p>These advanced filters relate to WordPress\u2019s handling of rewrite rules.<\/p>\n<ul>\n<li><code>allowed_redirect_hosts<\/code> \u2013 Applied to the list of host names deemed safe for redirection. wp-login.php uses this to defend against a dangerous &#8216;<code>redirect_to<\/code>&#8216; request parameter<\/li>\n<li><code>author_rewrite_rules<\/code> \u2013 Applied to the author-related rewrite rules after they are generated.<\/li>\n<li><code>category_rewrite_rules<\/code> \u2013 Applied to the category-related rewrite rules after they are generated.<\/li>\n<li><code>comments_rewrite_rules<\/code> \u2013 Applied to the comment-related rewrite rules after they are generated.<\/li>\n<li><code>date_rewrite_rules<\/code> \u2013 Applied to the date-related rewrite rules after they are generated.<\/li>\n<li><code>mod_rewrite_rules<\/code> \u2013 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.)<\/li>\n<li><code>page_rewrite_rules<\/code> \u2013 Applied to the page-related rewrite rules after they are generated.<\/li>\n<li><code>post_rewrite_rules<\/code> \u2013 Applied to the post-related rewrite rules after they are generated.<\/li>\n<li><code>redirect_canonical<\/code> \u2013 Can be used to cancel a &#8220;canonical&#8221; URL redirect. Accepts 2 parameters: <code>$redirect_url<\/code>, <code>$requested_url<\/code>. To cancel the redirect return <code>FALSE<\/code>, to allow the redirect return <code>$redirect_url<\/code>.<\/li>\n<li><code>rewrite_rules_array<\/code> \u2013 Applied to the entire rewrite rules array after it is generated.<\/li>\n<li><code>root_rewrite_rules<\/code> \u2013 Applied to the root-level rewrite rules after they are generated.<\/li>\n<li><code>search_rewrite_rules<\/code> \u2013 Applied to the search-related rewrite rules after they are generated.<\/li>\n<li><code>wp_redirect<\/code> \u2013 Applied to a redirect URL by the default <code>wp_redirect<\/code> function. Filter function arguments: URL, HTTP status code. Note that <code>wp_redirect<\/code> is also a &#8220;pluggable&#8221; function, meaning that plugins can override it; see Plugin API).<\/li>\n<li><code>wp_redirect_status<\/code> \u2013 Applied to the HTTP status code when redirecting by the default <code>wp_redirect<\/code> function. Filter function arguments: HTTP status code, URL. Note that <code>wp_redirect<\/code> is also a &#8220;pluggable&#8221; function, meaning that plugins can override it; see Plugin API).<\/li>\n<\/ul>\n<h3><b>WP_Query Filters<\/b><\/h3>\n<p>These are filters run\u00a0by the <code>WP_Query<\/code> object in the course of building and executing a query to retrieve posts.<\/p>\n<ul>\n<li><code>found_posts<\/code> \u2013 Applied to the list of posts, just after querying from the database.<\/li>\n<li><code>found_posts_query<\/code> \u2013 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 <code>SELECT FOUND_ROWS()<\/code> at that step.<\/li>\n<li><code>post_limits<\/code> \u2013 Applied to the LIMIT clause of the query that returns the post array.<\/li>\n<li><code>posts_clauses<\/code> \u2013 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 <code>posts_request<\/code>.<\/li>\n<li><code>posts_distinct<\/code> \u2013 Allows a plugin to add a <code>DISTINCTROW<\/code> clause to the query that returns the post array.<\/li>\n<li><code>posts_fields<\/code> \u2013 Applied to the field list for the query that returns the post array.<\/li>\n<li><code>posts_groupby<\/code> \u2013 Applied to the GROUP BY clause of the query that returns the post array (normally empty).<\/li>\n<li><code>posts_join<\/code> \u2013 Applied to the <code>JOIN<\/code> clause of the query that returns the post array. This is typically used to add a table to the <code>JOIN<\/code>, in combination with the <code>posts_where<\/code> filter.<\/li>\n<li><code>posts_join_paged<\/code> \u2013 Applied to the <code>JOIN<\/code> clause of the query that returns the post array, after the paging is calculated (though paging does not affect the <code>JOIN<\/code>, so this is actually equivalent to <code>posts_join<\/code>).<\/li>\n<li>posts_orderby \u2013 Applied to the <code>ORDER BY<\/code> clause of the query that returns the post array.<\/li>\n<li><code>posts_request<\/code> \u2013 Applied to the entire SQL query that returns the post array, just prior to running the query.<\/li>\n<li><code>posts_results<\/code> \u2013 Allows you to manipulate the resulting array returned from the query.<\/li>\n<li><code>posts_search<\/code> \u2013 Applied to the search SQL that is used in the <code>WHERE<\/code> clause of <code>WP_Query<\/code>.<\/li>\n<li><code>posts_where<\/code> \u2013 Applied to the <code>WHERE<\/code> clause of the query that returns the post array.<\/li>\n<li><code>posts_where_paged<\/code> \u2013 Applied to the <code>WHERE<\/code> clause of the query that returns the post array, after the paging is calculated (though paging does not affect the <code>WHERE<\/code>, so this is actually equivalent to <code>posts_where<\/code>).<\/li>\n<li><code>the_posts<\/code> \u2013 Applied to the list of posts queried from the database after minimal processing for permissions and draft status on single-post pages.<\/li>\n<\/ul>\n<h3><b>Media Filters<\/b><\/h3>\n<p>These media filter hooks enabled you to integrate<span style=\"font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif\">\u00a0different types of media.<\/span><\/p>\n<ul>\n<li><code>editor_max_image_size<\/code><\/li>\n<li><code>image_downsize<\/code><\/li>\n<li><code>get_image_tag_class<\/code><\/li>\n<li><code>get_image_tag<\/code><\/li>\n<li><code>image_resize_dimensions<\/code><\/li>\n<li><code>intermediate_image_sizes<\/code><\/li>\n<li><code>icon_dir<\/code><\/li>\n<li><code>wp_get_attachment_image_attributes<\/code><\/li>\n<li><code>img_caption_shortcode<\/code><\/li>\n<li><code>post_gallery<\/code><\/li>\n<li><code>use_default_gallery_style<\/code><\/li>\n<li><code>gallery_style<\/code><\/li>\n<li><code>(adjacent)_image_link<\/code><\/li>\n<li><code>embed_defaults<\/code><\/li>\n<li><code>load_default_embeds<\/code><\/li>\n<li><code>embed_googlevideo<\/code><\/li>\n<li><code>upload_size_limit<\/code><\/li>\n<li><code>wp_image_editors<\/code><\/li>\n<li><code>plupload_default_settings<\/code><\/li>\n<li><code>plupload_default_params<\/code><\/li>\n<li><code>image_size_names_choose<\/code><\/li>\n<li><code>wp_prepare_attachment_for_js<\/code><\/li>\n<li><code>media_upload_tabs<\/code><\/li>\n<li><code>disable_captions<\/code><\/li>\n<li><code>media_view_settings<\/code><\/li>\n<li><code>media_view_strings<\/code><\/li>\n<li><code>wp_handle_upload_prefilter<\/code><\/li>\n<\/ul>\n<h3><b>Advanced WordPress Filters<\/b><\/h3>\n<p>The advanced filter hooks in this section related to\u00a0internationalization, miscellaneous queries, and other fundamental WordPress functions.<\/p>\n<ul>\n<li><code>create_user_query<\/code> \u2013 Applied to the query used to save a new user&#8217;s information to the database, just prior to running the query.<\/li>\n<li><code>get_editable_authors<\/code> \u2013 Applied to the list of post authors that the current user is authorized to edit in the <code>get_editable_authors<\/code> function.<\/li>\n<li><code>get_next_post_join<\/code> \u2013 In <code>function<\/code> get_next_post (which finds the post after the currently-displayed post), applied to the <code>SQL JOIN<\/code> clause (which normally joins to the category table if user is viewing a category archive). Filter function arguments: <code>JOIN<\/code> clause, stay in same category (true\/false), list of excluded categories.<\/li>\n<li><code>get_next_post_sort<\/code> \u2013 In function get_next_post (which finds the post after the currently-displayed post), applied to the <code>SQL ORDER BY<\/code> clause (which normally orders by post date in ascending order with a limit of 1 post). Filter function arguments: <code>ORDER BY<\/code> clause.<\/li>\n<li><code>get_next_post_where<\/code> \u2013 In function <code>get_next_post<\/code> (which finds the post after the currently-displayed post), applied to the <code>SQL WHERE<\/code> clause (which normally looks for the next dated published post). Filter function arguments: <code>WHERE<\/code> clause, stay in same category (true\/false), list of excluded categories.<\/li>\n<li><code>get_previous_post_join<\/code> \u2013 In function get_previous_post (which finds the post before the currently-displayed post), applied to the <code>SQL JOIN<\/code> 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.<\/li>\n<li><code>get_previous_post_sort<\/code> \u2013 In function get_previous_post (which finds the post before the currently-displayed post), applied to the <code>SQL ORDER BY<\/code> clause (which normally orders by post date in descending order with a limit of 1 post). Filter function arguments: <code>ORDER BY<\/code> clause.<\/li>\n<li><code>get_previous_post_where<\/code> \u2013 In function <code>get_previous_post<\/code> (which finds the post before the currently-displayed post), applied to the <code>SQL WHERE<\/code> clause (which normally looks for the previous dated published post). Filter function arguments: <code>WHERE<\/code> clause, stay in same category (true\/false), list of excluded categories.<\/li>\n<li><code>gettext<\/code> \u2013 Applied to the translated text by the <code>translation()<\/code> function (which is called by functions like the <code>__()<\/code> and <code>_e()<\/code> 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.<\/li>\n<li><code>override_load_textdomain<\/code><\/li>\n<li><code>get_meta_sql<\/code> \u2013 In function <code>WP_Meta_Query::get_sql<\/code> (which generates SQL clauses to be appended to a main query for advanced meta queries.), applied to the <code>SQL JOIN<\/code> and <code>WHERE<\/code> clause generated by the advanced meta query. Filter function arguments: <code>array( compact( 'join', 'where' )<\/code>, <code>$this-&gt;queries<\/code>, <code>$type<\/code>, <code>$primary_table<\/code>, <code>$primary_id_column<\/code>, <code>$context<\/code> )<\/li>\n<li><code>get_others_drafts<\/code> \u2013 Applied to the query that selects the other users&#8217; drafts for display in the admin menus.<\/li>\n<li><code>get_users_drafts<\/code> \u2013 Applied to the query that selects the users&#8217; drafts for display in the admin menus.<\/li>\n<li><code>locale<\/code> \u2013 Applied to the locale by the <code>get_locale<\/code> function.<\/li>\n<li><code>query<\/code> \u2013 Applied to all queries (at least all queries run after plugins are loaded).<\/li>\n<li><code>query_string<\/code> \u2013 Deprecated &#8211; use <code>query_vars<\/code> or request instead.<\/li>\n<li><code>query_vars<\/code> \u2013 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.<\/li>\n<li><code>request<\/code> \u2013 Like <code>query_vars<\/code>, but applied after &#8220;extra&#8221; and private query variables have been added.<\/li>\n<li><code>excerpt_length<\/code> \u2013\u00a0Defines the length of a single-post excerpt.<\/li>\n<li><code>excerpt_more<\/code> \u2013 Defines the more string at the end of the excerpt.<\/li>\n<li><code>post_edit_form_tag<\/code> \u2013 Allows you to append code to the form tag in the default post\/page editor.<\/li>\n<li><code>update_user_query<\/code> &#8211; Applied to the update query used to update user information, prior to running the query.<\/li>\n<li><code>uploading_iframe_src<\/code> (removed since WP 2.5) \u2013 Applied to the HTML src tag for the uploading iframe on the post and page editing screens.<\/li>\n<li><code>xmlrpc_methods<\/code> \u2013 Applied to list of defined XMLRPC methods for the XMLRPC server.<\/li>\n<li><code>wp_mail_from<\/code> \u2013 Applied before any mail is sent by the <code>wp_mail<\/code> function. Supplied value is the calculated from address which is wordpress at the current hostname (set by <code>$_SERVER['SERVER_NAME']<\/code>). The filter should return an email address or name\/email combo in the form &#8220;user@example.com&#8221; or &#8220;Name &lt;user@example.com&gt;&#8221; (without the quotes!).<\/li>\n<li><code>wp_mail_from_name<\/code> \u2013 Applied before any mail is sent by the <code>wp_mail<\/code> function. The filter should return a name string to be used as the email from name.<\/li>\n<li><code>update_(meta_type)_metadata<\/code> \u2013 Applied before a metadata gets updated. For example if a user metadata gets updated the hook would be &#8216;<code>update_user_metadata<\/code>&#8216;<\/li>\n<\/ul>\n<h3><b>Widgets<\/b><\/h3>\n<p>These filter hooks let you work with\u00a0the widgets built into WordPress core.<\/p>\n<ul>\n<li><code>dynamic_sidebar_params<\/code> \u2013 Applied to the arguments passed to the <code>widgets_init<\/code> function in the WordPress widgets.<\/li>\n<li><code>widget_archives_dropdown_args<\/code> \u2013 Applied to the arguments passed to the <code>wp_get_archives()<\/code> function in the WordPress Archives widget.<\/li>\n<li><code>widget_categories_args<\/code> \u2013 Applied to the arguments passed to the <code>wp_list_categories()<\/code> function in the WordPress Categories widget.<\/li>\n<li><code>widget_links_args<\/code> \u2013 Applied to the arguments passed to the <code>wp_list_bookmarks()<\/code> function in the WordPress Links widget.<\/li>\n<li><code>widget_nav_menu_args<\/code> \u2013 Applied to the arguments passed to the <code>wp_nav_menu()<\/code> function in the WordPress Custom Menu widget.<\/li>\n<li><code>widget_pages_args<\/code> \u2013 Applied to the arguments passed to the <code>wp_list_pages()<\/code> function in the WordPress Pages widget.<\/li>\n<li><code>widget_tag_cloud_args<\/code> \u2013 Applied to the arguments passed to the <code>wp_tag_cloud()<\/code> function in the WordPress Pages widget.<\/li>\n<li><code>widget_text<\/code> \u2013 Applied to the widget text of the WordPress Text widget. May also apply to some third party widgets as well.<\/li>\n<li><code>widget_title<\/code> \u2013 Applied to the widget title of any user editable WordPress Widget. May also apply to some third party widgets as well.<\/li>\n<\/ul>\n<h2>Conclusion<\/h2>\n<p>Filters are a fundamental concept in WordPress development, so understanding how\u00a0they work and how to use them is essential if you&#8217;re interested in developing your own plugins and themes.<\/p>\n<p>The Filter cheat sheet above provides an overview of how to code filters and develop with them, as well as a handy filter reference should you need to quickly find the right filter hook while coding. Be sure to bookmark it as a reference for your future WordPress development projects!<\/p>\n<p>If you have any questions or additions for this cheat sheet, let us know in the comments below.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This cheat sheet explores a fundamental concept in WordPress development: filters. In WordPress, filters enable developers to intercept and modify&#8230;<\/p>\n","protected":false},"author":42,"featured_media":24837,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_genesis_hide_title":false,"_genesis_hide_breadcrumbs":false,"_genesis_hide_singular_image":false,"_genesis_hide_footer_widgets":false,"_genesis_custom_body_class":"","_genesis_custom_post_class":"","_genesis_layout":"","_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[232],"tags":[],"class_list":{"0":"post-24617","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-resources","8":"entry"},"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v18.1 (Yoast SEO v26.4) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>WordPress Filters Cheat Sheet<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.designbombs.com\/wordpress-filters-cheat-sheet\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"WordPress Filters Cheat Sheet\" \/>\n<meta property=\"og:description\" content=\"This cheat sheet explores a fundamental concept in WordPress development: filters. In WordPress, filters enable developers to intercept and modify data as\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.designbombs.com\/wordpress-filters-cheat-sheet\/\" \/>\n<meta property=\"og:site_name\" content=\"Design Bombs\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/designbombs\/\" \/>\n<meta property=\"article:published_time\" content=\"2018-09-20T12:00:37+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.designbombs.com\/wp-content\/uploads\/2018\/07\/wp-filters-cheatsheet.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"770\" \/>\n\t<meta property=\"og:image:height\" content=\"320\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Raelene Morey\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@designbombs\" \/>\n<meta name=\"twitter:site\" content=\"@designbombs\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Raelene Morey\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"54 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.designbombs.com\/wordpress-filters-cheat-sheet\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.designbombs.com\/wordpress-filters-cheat-sheet\/\"},\"author\":{\"name\":\"Raelene Morey\",\"@id\":\"https:\/\/www.designbombs.com\/#\/schema\/person\/a9265b06816921c5aafbc1b46077ece8\"},\"headline\":\"WordPress Filters Cheat Sheet\",\"datePublished\":\"2018-09-20T12:00:37+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.designbombs.com\/wordpress-filters-cheat-sheet\/\"},\"wordCount\":8906,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.designbombs.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.designbombs.com\/wordpress-filters-cheat-sheet\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.designbombs.com\/wp-content\/uploads\/2018\/07\/wp-filters-cheatsheet.jpg\",\"articleSection\":[\"Resources\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.designbombs.com\/wordpress-filters-cheat-sheet\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.designbombs.com\/wordpress-filters-cheat-sheet\/\",\"url\":\"https:\/\/www.designbombs.com\/wordpress-filters-cheat-sheet\/\",\"name\":\"WordPress Filters Cheat Sheet\",\"isPartOf\":{\"@id\":\"https:\/\/www.designbombs.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.designbombs.com\/wordpress-filters-cheat-sheet\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.designbombs.com\/wordpress-filters-cheat-sheet\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.designbombs.com\/wp-content\/uploads\/2018\/07\/wp-filters-cheatsheet.jpg\",\"datePublished\":\"2018-09-20T12:00:37+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.designbombs.com\/wordpress-filters-cheat-sheet\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.designbombs.com\/wordpress-filters-cheat-sheet\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.designbombs.com\/wordpress-filters-cheat-sheet\/#primaryimage\",\"url\":\"https:\/\/www.designbombs.com\/wp-content\/uploads\/2018\/07\/wp-filters-cheatsheet.jpg\",\"contentUrl\":\"https:\/\/www.designbombs.com\/wp-content\/uploads\/2018\/07\/wp-filters-cheatsheet.jpg\",\"width\":770,\"height\":320},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.designbombs.com\/wordpress-filters-cheat-sheet\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.designbombs.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Resources\",\"item\":\"https:\/\/www.designbombs.com\/category\/resources\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"WordPress Filters Cheat Sheet\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.designbombs.com\/#website\",\"url\":\"https:\/\/www.designbombs.com\/\",\"name\":\"Design Bombs\",\"description\":\"Droppin&#039; design bombs everyday!\",\"publisher\":{\"@id\":\"https:\/\/www.designbombs.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.designbombs.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.designbombs.com\/#organization\",\"name\":\"DesignBombs\",\"url\":\"https:\/\/www.designbombs.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.designbombs.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.designbombs.com\/wp-content\/uploads\/2019\/04\/db-logo.png\",\"contentUrl\":\"https:\/\/www.designbombs.com\/wp-content\/uploads\/2019\/04\/db-logo.png\",\"width\":219,\"height\":92,\"caption\":\"DesignBombs\"},\"image\":{\"@id\":\"https:\/\/www.designbombs.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/designbombs\/\",\"https:\/\/x.com\/designbombs\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.designbombs.com\/#\/schema\/person\/a9265b06816921c5aafbc1b46077ece8\",\"name\":\"Raelene Morey\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.designbombs.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/27dd7e3d488736cacab6c02b618782144f3b9b969299bc2065b2cacbc3fef0c2?s=96&d=https%3A%2F%2Fwww.designbombs.com%2Fwp-content%2Fthemes%2FDesignBombs%2Fimages%2Fgravatar.jpg&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/27dd7e3d488736cacab6c02b618782144f3b9b969299bc2065b2cacbc3fef0c2?s=96&d=https%3A%2F%2Fwww.designbombs.com%2Fwp-content%2Fthemes%2FDesignBombs%2Fimages%2Fgravatar.jpg&r=g\",\"caption\":\"Raelene Morey\"},\"description\":\"Raelene is the chief writer at DesignBombs. Formerly managing editor at WPMU DEV. Computer science grad turned newspaper journalist. When she\u2019s not taming browser tabs she likes brunching and bushwalking.\",\"sameAs\":[\"https:\/\/wordsbybirds.com\/\",\"https:\/\/x.com\/designbombs\"],\"url\":\"https:\/\/www.designbombs.com\/author\/rae\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"WordPress Filters Cheat Sheet","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.designbombs.com\/wordpress-filters-cheat-sheet\/","og_locale":"en_US","og_type":"article","og_title":"WordPress Filters Cheat Sheet","og_description":"This cheat sheet explores a fundamental concept in WordPress development: filters. In WordPress, filters enable developers to intercept and modify data as","og_url":"https:\/\/www.designbombs.com\/wordpress-filters-cheat-sheet\/","og_site_name":"Design Bombs","article_publisher":"https:\/\/www.facebook.com\/designbombs\/","article_published_time":"2018-09-20T12:00:37+00:00","og_image":[{"width":770,"height":320,"url":"https:\/\/www.designbombs.com\/wp-content\/uploads\/2018\/07\/wp-filters-cheatsheet.jpg","type":"image\/jpeg"}],"author":"Raelene Morey","twitter_card":"summary_large_image","twitter_creator":"@designbombs","twitter_site":"@designbombs","twitter_misc":{"Written by":"Raelene Morey","Est. reading time":"54 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.designbombs.com\/wordpress-filters-cheat-sheet\/#article","isPartOf":{"@id":"https:\/\/www.designbombs.com\/wordpress-filters-cheat-sheet\/"},"author":{"name":"Raelene Morey","@id":"https:\/\/www.designbombs.com\/#\/schema\/person\/a9265b06816921c5aafbc1b46077ece8"},"headline":"WordPress Filters Cheat Sheet","datePublished":"2018-09-20T12:00:37+00:00","mainEntityOfPage":{"@id":"https:\/\/www.designbombs.com\/wordpress-filters-cheat-sheet\/"},"wordCount":8906,"commentCount":0,"publisher":{"@id":"https:\/\/www.designbombs.com\/#organization"},"image":{"@id":"https:\/\/www.designbombs.com\/wordpress-filters-cheat-sheet\/#primaryimage"},"thumbnailUrl":"https:\/\/www.designbombs.com\/wp-content\/uploads\/2018\/07\/wp-filters-cheatsheet.jpg","articleSection":["Resources"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.designbombs.com\/wordpress-filters-cheat-sheet\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.designbombs.com\/wordpress-filters-cheat-sheet\/","url":"https:\/\/www.designbombs.com\/wordpress-filters-cheat-sheet\/","name":"WordPress Filters Cheat Sheet","isPartOf":{"@id":"https:\/\/www.designbombs.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.designbombs.com\/wordpress-filters-cheat-sheet\/#primaryimage"},"image":{"@id":"https:\/\/www.designbombs.com\/wordpress-filters-cheat-sheet\/#primaryimage"},"thumbnailUrl":"https:\/\/www.designbombs.com\/wp-content\/uploads\/2018\/07\/wp-filters-cheatsheet.jpg","datePublished":"2018-09-20T12:00:37+00:00","breadcrumb":{"@id":"https:\/\/www.designbombs.com\/wordpress-filters-cheat-sheet\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.designbombs.com\/wordpress-filters-cheat-sheet\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.designbombs.com\/wordpress-filters-cheat-sheet\/#primaryimage","url":"https:\/\/www.designbombs.com\/wp-content\/uploads\/2018\/07\/wp-filters-cheatsheet.jpg","contentUrl":"https:\/\/www.designbombs.com\/wp-content\/uploads\/2018\/07\/wp-filters-cheatsheet.jpg","width":770,"height":320},{"@type":"BreadcrumbList","@id":"https:\/\/www.designbombs.com\/wordpress-filters-cheat-sheet\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.designbombs.com\/"},{"@type":"ListItem","position":2,"name":"Resources","item":"https:\/\/www.designbombs.com\/category\/resources\/"},{"@type":"ListItem","position":3,"name":"WordPress Filters Cheat Sheet"}]},{"@type":"WebSite","@id":"https:\/\/www.designbombs.com\/#website","url":"https:\/\/www.designbombs.com\/","name":"Design Bombs","description":"Droppin&#039; design bombs everyday!","publisher":{"@id":"https:\/\/www.designbombs.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.designbombs.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.designbombs.com\/#organization","name":"DesignBombs","url":"https:\/\/www.designbombs.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.designbombs.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.designbombs.com\/wp-content\/uploads\/2019\/04\/db-logo.png","contentUrl":"https:\/\/www.designbombs.com\/wp-content\/uploads\/2019\/04\/db-logo.png","width":219,"height":92,"caption":"DesignBombs"},"image":{"@id":"https:\/\/www.designbombs.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/designbombs\/","https:\/\/x.com\/designbombs"]},{"@type":"Person","@id":"https:\/\/www.designbombs.com\/#\/schema\/person\/a9265b06816921c5aafbc1b46077ece8","name":"Raelene Morey","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.designbombs.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/27dd7e3d488736cacab6c02b618782144f3b9b969299bc2065b2cacbc3fef0c2?s=96&d=https%3A%2F%2Fwww.designbombs.com%2Fwp-content%2Fthemes%2FDesignBombs%2Fimages%2Fgravatar.jpg&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/27dd7e3d488736cacab6c02b618782144f3b9b969299bc2065b2cacbc3fef0c2?s=96&d=https%3A%2F%2Fwww.designbombs.com%2Fwp-content%2Fthemes%2FDesignBombs%2Fimages%2Fgravatar.jpg&r=g","caption":"Raelene Morey"},"description":"Raelene is the chief writer at DesignBombs. Formerly managing editor at WPMU DEV. Computer science grad turned newspaper journalist. When she\u2019s not taming browser tabs she likes brunching and bushwalking.","sameAs":["https:\/\/wordsbybirds.com\/","https:\/\/x.com\/designbombs"],"url":"https:\/\/www.designbombs.com\/author\/rae\/"}]}},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/www.designbombs.com\/wp-content\/uploads\/2018\/07\/wp-filters-cheatsheet.jpg","jetpack-related-posts":[],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.designbombs.com\/wp-json\/wp\/v2\/posts\/24617","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.designbombs.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.designbombs.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.designbombs.com\/wp-json\/wp\/v2\/users\/42"}],"replies":[{"embeddable":true,"href":"https:\/\/www.designbombs.com\/wp-json\/wp\/v2\/comments?post=24617"}],"version-history":[{"count":3,"href":"https:\/\/www.designbombs.com\/wp-json\/wp\/v2\/posts\/24617\/revisions"}],"predecessor-version":[{"id":24626,"href":"https:\/\/www.designbombs.com\/wp-json\/wp\/v2\/posts\/24617\/revisions\/24626"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.designbombs.com\/wp-json\/wp\/v2\/media\/24837"}],"wp:attachment":[{"href":"https:\/\/www.designbombs.com\/wp-json\/wp\/v2\/media?parent=24617"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.designbombs.com\/wp-json\/wp\/v2\/categories?post=24617"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.designbombs.com\/wp-json\/wp\/v2\/tags?post=24617"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}