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 |
---|---|
1993 | return get_query_template('attachment'); |
1994 | } |
1995 |
|
1996 | function get_comments_popup_template() { |
1997 | if ( file_exists( TEMPLATEPATH . '/comments-popup.php') ) |
1998 | $template = TEMPLATEPATH . '/comments-popup.php'; |
1999 | else |
2000 | $template = get_theme_root() . '/default/comments-popup.php'; |
2001 |
|
2002 | return apply_filters('comments_popup_template', $template); |
2003 | } |
2004 |
|
2005 | // Borrowed from the PHP Manual user notes. Convert entities, while |
2006 | // preserving already-encoded entities: |
2007 | function htmlentities2($myHTML) { |
2008 | $translation_table=get_html_translation_table (HTML_ENTITIES,ENT_QUOTES); |
2009 | $translation_table[chr(38)] = '&'; |
2010 | return preg_replace("/&(?![A-Za-z]{0,4}\w{2,3};|#[0-9]{2,3};)/","&" , strtr($myHTML, $translation_table)); |
2011 | } |