Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: image_size_names_choose

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
309                <label class="setting">
310                     <span><?php _e('Size'); ?></span>
311                     <select class="size" name="size"
312                          data-setting="size"
313                          <# if ( data.userSettings ) { #>
314                               data-user-setting="imgsize"
315                          <# } #>>
316                          <?php
317
318                          $sizes = apply_filters( 'image_size_names_choose', array(
319                               'thumbnail' => __('Thumbnail'),
320                               'medium'    => __('Medium'),
321                               'large'     => __('Large'),
322                               'full'      => __('Full Size'),
323                          ) );
324
325                          foreach ( $sizes as $value => $name ) : ?>
326                               <#
327                               var size = data.sizes['<?php echo esc_js( $value ); ?>'];