Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: embed_thumbnail_image_shape

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
75                 * Filter the thumbnail shape for use in the embed template.
76                 *
77                 * Rectangular images are shown above the title
78                 * while square images are shown next to the content.
79                 *
80                 * @since 4.4.0
81                 *
82                 * @param string $shape Thumbnail image shape. Either 'rectangular' or 'square'.
83                 */
84                $shape = apply_filters( 'embed_thumbnail_image_shape', $shape );
85           }
86           ?>
87           <div <?php post_class( 'wp-embed' ); ?>>
88                <?php if ( $thumbnail_id && 'rectangular' === $shape ) : ?>
89                     <div class="wp-embed-featured-image rectangular">
90                          <a href="<?php the_permalink(); ?>" target="_top">
91                               <?php echo wp_get_attachment_image( $thumbnail_id, $image_size ); ?>
92                          </a>
93                     </div>