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 |
---|---|
155 | <span class="alignright"><?php printf( __('Newer: %s'), wp_post_revision_title( $right_revision ) ); ?></span> |
156 | </th> |
157 | </tr> |
158 | <?php endif; |
159 |
|
160 | // use get_post_to_edit filters? |
161 | $identical = true; |
162 | foreach ( _wp_post_revision_fields() as $field => $field_title ) : |
163 | if ( 'diff' == $action ) { |
164 | $left_content = apply_filters( "_wp_post_revision_field_$field", $left_revision->$field, $field ); |
165 | $right_content = apply_filters( "_wp_post_revision_field_$field", $right_revision->$field, $field ); |
166 | if ( !$content = wp_text_diff( $left_content, $right_content ) ) |
167 | continue; // There is no difference between left and right |
168 | $identical = false; |
169 | } else { |
170 | add_filter( "_wp_post_revision_field_$field", 'htmlspecialchars' ); |
171 | $content = apply_filters( "_wp_post_revision_field_$field", $revision->$field, $field ); |
172 | } |
173 | ?> |
174 |
|
175 | <tr id="revision-field-<?php echo $field; ?>"> |
176 | <th scope="row"><?php echo wp_specialchars( $field_title ); ?></th> |
177 | <td><div class="pre"><?php echo $content; ?></div></td> |
178 | </tr> |
179 |
|
180 | <?php |