Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: sanitize_title

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
1013      /**
1014       * Filter a sanitized title string.
1015       *
1016       * @since 1.2.0
1017       *
1018       * @param string $title     Sanitized title.
1019       * @param string $raw_title The title prior to sanitization.
1020       * @param string $context   The context for which the title is being sanitized.
1021       */
1022      $title = apply_filters( 'sanitize_title', $title, $raw_title, $context );
1023
1024      if ( '' === $title || false === $title )
1025           $title = $fallback_title;
1026
1027      return $title;
1028 }
1029
1030 /**
1031  * Sanitizes a title with the 'query' context.