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 |
---|---|
56 | * Rectangular images are shown above the title while square images |
57 | * are shown next to the content. |
58 | * |
59 | * @since 4.4.0 |
60 | * @since 4.5.0 Added `$thumbnail_id` parameter. |
61 | * |
62 | * @param string $shape Thumbnail image shape. Either 'rectangular' or 'square'. |
63 | * @param int $thumbnail_id Attachment ID. |
64 | */ |
65 | $shape = apply_filters( 'embed_thumbnail_image_shape', $shape, $thumbnail_id ); |
66 |
|
67 | if ( 'rectangular' === $shape ) : ?> |
68 | <div class="wp-embed-featured-image rectangular"> |
69 | <a href="<?php the_permalink(); ?>" target="_top"> |
70 | <?php echo wp_get_attachment_image( $thumbnail_id, $image_size ); ?> |
71 | </a> |
72 | </div> |
73 | <?php endif; ?> |
74 |
|