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
904                <span class="setting">
905                     <label for="attachment-display-settings-size" class="name"><?php _e( 'Size' ); ?></label>
906                     <select id="attachment-display-settings-size" class="size" name="size"
907                          data-setting="size"
908                          <# if ( data.userSettings ) { #>
909                               data-user-setting="imgsize"
910                          <# } #>>
911                          <?php
912                          /** This filter is documented in wp-admin/includes/media.php */
913                          $sizes = apply_filters(
914                               'image_size_names_choose',
915                               array(
916                                    'thumbnail' => __( 'Thumbnail' ),
917                                    'medium'    => __( 'Medium' ),
918                                    'large'     => __( 'Large' ),
919                                    'full'      => __( 'Full Size' ),
920                               )
921                          );
922
 
Line Code
984                <label for="gallery-settings-size" class="name"><?php _e( 'Size' ); ?></label>
985                <select id="gallery-settings-size" class="size" name="size"
986                     data-setting="size"
987                     <# if ( data.userSettings ) { #>
988                          data-user-setting="imgsize"
989                     <# } #>
990                     >
991                     <?php
992                     /** This filter is documented in wp-admin/includes/media.php */
993                     $size_names = apply_filters(
994                          'image_size_names_choose',
995                          array(
996                               'thumbnail' => __( 'Thumbnail' ),
997                               'medium'    => __( 'Medium' ),
998                               'large'     => __( 'Large' ),
999                               'full'      => __( 'Full Size' ),
1000                          )
1001                     );
1002
 
Line Code
1175                                    <span class="setting size">
1176                                         <label for="image-details-size" class="name"><?php _e( 'Size' ); ?></label>
1177                                         <select id="image-details-size" class="size" name="size"
1178                                              data-setting="size"
1179                                              <# if ( data.userSettings ) { #>
1180                                                   data-user-setting="imgsize"
1181                                              <# } #>>
1182                                              <?php
1183                                              /** This filter is documented in wp-admin/includes/media.php */
1184                                              $sizes = apply_filters(
1185                                                   'image_size_names_choose',
1186                                                   array(
1187                                                        'thumbnail' => __( 'Thumbnail' ),
1188                                                        'medium'    => __( 'Medium' ),
1189                                                        'large'     => __( 'Large' ),
1190                                                        'full'      => __( 'Full Size' ),
1191                                                   )
1192                                              );
1193