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 |
---|---|
78 | * Filter the image attachment size to use. |
79 | * |
80 | * @since Twenty Twelve 1.0 |
81 | * |
82 | * @param array $size { |
83 | * @type int The attachment height in pixels. |
84 | * @type int The attachment width in pixels. |
85 | * } |
86 | */ |
87 | $attachment_size = apply_filters( 'twentytwelve_attachment_size', array( 960, 960 ) ); |
88 | echo wp_get_attachment_image( $post->ID, $attachment_size ); |
89 | ?></a> |
90 |
|
91 | <?php if ( ! empty( $post->post_excerpt ) ) : ?> |
92 | <div class="entry-caption"> |
93 | <?php the_excerpt(); ?> |
94 | </div> |
95 | <?php endif; ?> |
96 | </div><!-- .attachment --> |