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
795                <span class="setting">
796                     <label for="attachment-display-settings-size" class="name"><?php _e( 'Size' ); ?></label>
797                     <select id="attachment-display-settings-size" class="size" name="size"
798                          data-setting="size"
799                          <# if ( data.userSettings ) { #>
800                               data-user-setting="imgsize"
801                          <# } #>>
802                          <?php
803                          /** This filter is documented in wp-admin/includes/media.php */
804                          $sizes = apply_filters(
805                               'image_size_names_choose',
806                               array(
807                                    'thumbnail' => __( 'Thumbnail' ),
808                                    'medium'    => __( 'Medium' ),
809                                    'large'     => __( 'Large' ),
810                                    'full'      => __( 'Full Size' ),
811                               )
812                          );
813
 
Line Code
875                <label for="gallery-settings-size" class="name"><?php _e( 'Size' ); ?></label>
876                <select id="gallery-settings-size" class="size" name="size"
877                     data-setting="size"
878                     <# if ( data.userSettings ) { #>
879                          data-user-setting="imgsize"
880                     <# } #>
881                     >
882                     <?php
883                     /** This filter is documented in wp-admin/includes/media.php */
884                     $size_names = apply_filters(
885                          'image_size_names_choose',
886                          array(
887                               'thumbnail' => __( 'Thumbnail' ),
888                               'medium'    => __( 'Medium' ),
889                               'large'     => __( 'Large' ),
890                               'full'      => __( 'Full Size' ),
891                          )
892                     );
893
 
Line Code
1066                                    <span class="setting size">
1067                                         <label for="image-details-size" class="name"><?php _e( 'Size' ); ?></label>
1068                                         <select id="image-details-size" class="size" name="size"
1069                                              data-setting="size"
1070                                              <# if ( data.userSettings ) { #>
1071                                                   data-user-setting="imgsize"
1072                                              <# } #>>
1073                                              <?php
1074                                              /** This filter is documented in wp-admin/includes/media.php */
1075                                              $sizes = apply_filters(
1076                                                   'image_size_names_choose',
1077                                                   array(
1078                                                        'thumbnail' => __( 'Thumbnail' ),
1079                                                        'medium'    => __( 'Medium' ),
1080                                                        'large'     => __( 'Large' ),
1081                                                        'full'      => __( 'Full Size' ),
1082                                                   )
1083                                              );
1084