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.
This hook occurs 3 times in this file.
Line | Code |
---|---|
124 | * @param unknown_type $alt |
125 | * @param unknown_type $title |
126 | * @param unknown_type $align |
127 | * @param unknown_type $url |
128 | * @param unknown_type $size |
129 | * @return unknown |
130 | */ |
131 | function image_add_caption( $html, $id, $caption, $title, $align, $url, $size, $alt = '' ) { |
132 |
|
133 | if ( empty($caption) || apply_filters( 'disable_captions', '' ) ) |
134 | return $html; |
135 |
|
136 | $id = ( 0 < (int) $id ) ? 'attachment_' . $id : ''; |
137 |
|
138 | if ( ! preg_match( '/width="([0-9]+)/', $html, $matches ) ) |
139 | return $html; |
140 |
|
141 | $width = $matches[1]; |
142 |
|
Line | Code |
1622 |
|
1623 | if ( f.title.value ) { |
1624 | title = f.title.value.replace(/'/g, ''').replace(/"/g, '"').replace(/</g, '<').replace(/>/g, '>'); |
1625 | title = ' title="'+title+'"'; |
1626 | } |
1627 |
|
1628 | if ( f.alt.value ) |
1629 | alt = f.alt.value.replace(/'/g, ''').replace(/"/g, '"').replace(/</g, '<').replace(/>/g, '>'); |
1630 |
|
1631 | <?php if ( ! apply_filters( 'disable_captions', '' ) ) { ?> |
1632 | if ( f.caption.value ) |
1633 | caption = f.caption.value.replace(/'/g, ''').replace(/"/g, '"').replace(/</g, '<').replace(/>/g, '>'); |
1634 | <?php } ?> |
1635 |
|
1636 | cls = caption ? '' : ' class="'+t.align+'"'; |
1637 |
|
1638 | html = '<img alt="'+alt+'" src="'+f.src.value+'"'+title+cls+' width="'+t.width+'" height="'+t.height+'" />'; |
1639 |
|
1640 | if ( f.url.value ) |
Line | Code |
2001 |
|
2002 | /** |
2003 | * {@internal Missing Short Description}} |
2004 | * |
2005 | * @since unknown |
2006 | * |
2007 | * @return unknown |
2008 | */ |
2009 | function type_url_form_image() { |
2010 | if ( !apply_filters( 'disable_captions', '' ) ) { |
2011 | $caption = ' |
2012 | <tr> |
2013 | <th valign="top" scope="row" class="label"> |
2014 | <span class="alignleft"><label for="caption">' . __('Image Caption') . '</label></span> |
2015 | </th> |
2016 | <td class="field"><input id="caption" name="caption" value="" type="text" /></td> |
2017 | </tr> |
2018 | '; |
2019 | } else { |