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 3 times in this file.

Line Code
785                <span class="setting">
786                     <label for="attachment-display-settings-size" class="name"><?php _e( 'Size' ); ?></label>
787                     <select id="attachment-display-settings-size" class="size" name="size"
788                          data-setting="size"
789                          <# if ( data.userSettings ) { #>
790                               data-user-setting="imgsize"
791                          <# } #>>
792                          <?php
793                          /** This filter is documented in wp-admin/includes/media.php */
794                          $sizes = apply_filters(
795                               'image_size_names_choose',
796                               array(
797                                    'thumbnail' => __( 'Thumbnail' ),
798                                    'medium'    => __( 'Medium' ),
799                                    'large'     => __( 'Large' ),
800                                    'full'      => __( 'Full Size' ),
801                               )
802                          );
803
 
Line Code
865                <label for="gallery-settings-size" class="name"><?php _e( 'Size' ); ?></label>
866                <select id="gallery-settings-size" class="size" name="size"
867                     data-setting="size"
868                     <# if ( data.userSettings ) { #>
869                          data-user-setting="imgsize"
870                     <# } #>
871                     >
872                     <?php
873                     /** This filter is documented in wp-admin/includes/media.php */
874                     $size_names = apply_filters(
875                          'image_size_names_choose',
876                          array(
877                               'thumbnail' => __( 'Thumbnail' ),
878                               'medium'    => __( 'Medium' ),
879                               'large'     => __( 'Large' ),
880                               'full'      => __( 'Full Size' ),
881                          )
882                     );
883
 
Line Code
1056                                    <span class="setting size">
1057                                         <label for="image-details-size" class="name"><?php _e( 'Size' ); ?></label>
1058                                         <select id="image-details-size" class="size" name="size"
1059                                              data-setting="size"
1060                                              <# if ( data.userSettings ) { #>
1061                                                   data-user-setting="imgsize"
1062                                              <# } #>>
1063                                              <?php
1064                                              /** This filter is documented in wp-admin/includes/media.php */
1065                                              $sizes = apply_filters(
1066                                                   'image_size_names_choose',
1067                                                   array(
1068                                                        'thumbnail' => __( 'Thumbnail' ),
1069                                                        'medium'    => __( 'Medium' ),
1070                                                        'large'     => __( 'Large' ),
1071                                                        'full'      => __( 'Full Size' ),
1072                                                   )
1073                                              );
1074