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

This hook occurs 2 times in this file.

Line Code
452                <label class="setting">
453                     <span><?php _e('Size'); ?></span>
454                     <select class="size" name="size"
455                          data-setting="size"
456                          <# if ( data.userSettings ) { #>
457                               data-user-setting="imgsize"
458                          <# } #>>
459                          <?php
460                          /** This filter is documented in wp-admin/includes/media.php */
461                          $sizes = apply_filters( 'image_size_names_choose', array(
462                               'thumbnail' => __('Thumbnail'),
463                               'medium'    => __('Medium'),
464                               'large'     => __('Large'),
465                               'full'      => __('Full Size'),
466                          ) );
467
468                          foreach ( $sizes as $value => $name ) : ?>
469                               <#
470                               var size = data.sizes['<?php echo esc_js( $value ); ?>'];
 
Line Code
698                                    <label class="setting size">
699                                         <span><?php _e('Size'); ?></span>
700                                         <select class="size" name="size"
701                                              data-setting="size"
702                                              <# if ( data.userSettings ) { #>
703                                                   data-user-setting="imgsize"
704                                              <# } #>>
705                                              <?php
706                                              /** This filter is documented in wp-admin/includes/media.php */
707                                              $sizes = apply_filters( 'image_size_names_choose', array(
708                                                   'thumbnail' => __('Thumbnail'),
709                                                   'medium'    => __('Medium'),
710                                                   'large'     => __('Large'),
711                                                   'full'      => __('Full Size'),
712                                              ) );
713
714                                              foreach ( $sizes as $value => $name ) : ?>
715                                                   <#
716                                                   var size = data.sizes['<?php echo esc_js( $value ); ?>'];