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 |
---|---|
125 | * @param unknown_type $alt |
126 | * @param unknown_type $title |
127 | * @param unknown_type $align |
128 | * @param unknown_type $url |
129 | * @param unknown_type $size |
130 | * @return unknown |
131 | */ |
132 | function image_add_caption( $html, $id, $alt, $title, $align, $url, $size ) { |
133 |
|
134 | if ( empty($alt) || apply_filters( 'disable_captions', '' ) ) return $html; |
135 | $id = ( 0 < (int) $id ) ? 'attachment_' . $id : ''; |
136 |
|
137 | preg_match( '/width="([0-9]+)/', $html, $matches ); |
138 | if ( ! isset($matches[1]) ) return $html; |
139 | $width = $matches[1]; |
140 |
|
141 | $html = preg_replace( '/align[^\s\'"]+\s?/', '', $html ); |
142 | if ( empty($align) ) $align = 'none'; |
143 |
|
Line | Code |
1418 | if ( '' == f.src.value || '' == t.width ) return false; |
1419 |
|
1420 | if ( f.title.value ) { |
1421 | title = f.title.value.replace(/['"<>]+/g, ''); |
1422 | title = ' title="'+title+'"'; |
1423 | } |
1424 |
|
1425 | if ( f.alt.value ) { |
1426 | alt = f.alt.value.replace(/['"<>]+/g, ''); |
1427 | <?php if ( ! apply_filters( 'disable_captions', '' ) ) { ?> |
1428 | caption = f.alt.value.replace(/'/g, ''').replace(/"/g, '"').replace(/</g, '<').replace(/>/g, '>'); |
1429 | <?php } ?> |
1430 | } |
1431 |
|
1432 | cls = caption ? '' : ' class="'+t.align+'"'; |
1433 |
|
1434 | html = '<img alt="'+alt+'" src="'+f.src.value+'"'+title+cls+' width="'+t.width+'" height="'+t.height+'" />'; |
1435 |
|
1436 | if ( f.url.value ) |
Line | Code |
1776 | /** |
1777 | * {@internal Missing Short Description}} |
1778 | * |
1779 | * @since unknown |
1780 | * |
1781 | * @return unknown |
1782 | */ |
1783 | function type_url_form_image() { |
1784 |
|
1785 | if ( apply_filters( 'disable_captions', '' ) ) { |
1786 | $alt = __('Alternate Text'); |
1787 | $alt_help = __('Alt text for the image, e.g. "The Mona Lisa"'); |
1788 | } else { |
1789 | $alt = __('Image Caption'); |
1790 | $alt_help = __('Also used as alternate text for the image'); |
1791 | } |
1792 |
|
1793 | $default_align = get_option('image_default_align'); |
1794 | if ( empty($default_align) ) |