WP hooks navigation: Home/browse • Actions index • Filters index
To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).
The best way to understand what a hook does is to look at where it occurs in the source code.
do_action( "hook_name" )
apply_filters( "hook_name", "what_to_filter" )
.Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.
Line | Code |
---|---|
2072 | return get_query_template('attachment'); |
2073 | } |
2074 |
|
2075 | function get_comments_popup_template() { |
2076 | if ( file_exists( TEMPLATEPATH . '/comments-popup.php') ) |
2077 | $template = TEMPLATEPATH . '/comments-popup.php'; |
2078 | else |
2079 | $template = get_theme_root() . '/default/comments-popup.php'; |
2080 |
|
2081 | return apply_filters('comments_popup_template', $template); |
2082 | } |
2083 |
|
2084 | // Borrowed from the PHP Manual user notes. Convert entities, while |
2085 | // preserving already-encoded entities: |
2086 | function htmlentities2($myHTML) { |
2087 | $translation_table=get_html_translation_table (HTML_ENTITIES,ENT_QUOTES); |
2088 | $translation_table[chr(38)] = '&'; |
2089 | return preg_replace("/&(?![A-Za-z]{0,4}\w{2,3};|#[0-9]{2,3};)/","&" , strtr($myHTML, $translation_table)); |
2090 | } |