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 |
| 1565 | |
| 1566 | if ( f.title.value ) { |
| 1567 | title = f.title.value.replace(/'/g, ''').replace(/"/g, '"').replace(/</g, '<').replace(/>/g, '>'); |
| 1568 | title = ' title="'+title+'"'; |
| 1569 | } |
| 1570 | |
| 1571 | if ( f.alt.value ) |
| 1572 | alt = f.alt.value.replace(/'/g, ''').replace(/"/g, '"').replace(/</g, '<').replace(/>/g, '>'); |
| 1573 | |
| 1574 | <?php if ( ! apply_filters( 'disable_captions', '' ) ) { ?> |
| 1575 | if ( f.caption.value ) |
| 1576 | caption = f.caption.value.replace(/'/g, ''').replace(/"/g, '"').replace(/</g, '<').replace(/>/g, '>'); |
| 1577 | <?php } ?> |
| 1578 | |
| 1579 | cls = caption ? '' : ' class="'+t.align+'"'; |
| 1580 | |
| 1581 | html = '<img alt="'+alt+'" src="'+f.src.value+'"'+title+cls+' width="'+t.width+'" height="'+t.height+'" />'; |
| 1582 | |
| 1583 | if ( f.url.value ) |
| Line | Code |
| 1945 | /** |
| 1946 | * {@internal Missing Short Description}} |
| 1947 | * |
| 1948 | * @since unknown |
| 1949 | * |
| 1950 | * @return unknown |
| 1951 | */ |
| 1952 | function type_url_form_image() { |
| 1953 | |
| 1954 | if ( !apply_filters( 'disable_captions', '' ) ) { |
| 1955 | $caption = ' |
| 1956 | <tr> |
| 1957 | <th valign="top" scope="row" class="label"> |
| 1958 | <span class="alignleft"><label for="caption">' . __('Image Caption') . '</label></span> |
| 1959 | </th> |
| 1960 | <td class="field"><input id="caption" name="caption" value="" type="text" /></td> |
| 1961 | </tr> |
| 1962 | '; |
| 1963 | } else { |