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