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
890                <span class="setting">
891                     <label for="attachment-display-settings-size" class="name"><?php _e( 'Size' ); ?></label>
892                     <select id="attachment-display-settings-size" class="size" name="size"
893                          data-setting="size"
894                          <# if ( data.userSettings ) { #>
895                               data-user-setting="imgsize"
896                          <# } #>>
897                          <?php
898                          /** This filter is documented in wp-admin/includes/media.php */
899                          $sizes = apply_filters(
900                               'image_size_names_choose',
901                               array(
902                                    'thumbnail' => __( 'Thumbnail' ),
903                                    'medium'    => __( 'Medium' ),
904                                    'large'     => __( 'Large' ),
905                                    'full'      => __( 'Full Size' ),
906                               )
907                          );
908
 
Line Code
970                <label for="gallery-settings-size" class="name"><?php _e( 'Size' ); ?></label>
971                <select id="gallery-settings-size" class="size" name="size"
972                     data-setting="size"
973                     <# if ( data.userSettings ) { #>
974                          data-user-setting="imgsize"
975                     <# } #>
976                     >
977                     <?php
978                     /** This filter is documented in wp-admin/includes/media.php */
979                     $size_names = apply_filters(
980                          'image_size_names_choose',
981                          array(
982                               'thumbnail' => __( 'Thumbnail' ),
983                               'medium'    => __( 'Medium' ),
984                               'large'     => __( 'Large' ),
985                               'full'      => __( 'Full Size' ),
986                          )
987                     );
988
 
Line Code
1161                                    <span class="setting size">
1162                                         <label for="image-details-size" class="name"><?php _e( 'Size' ); ?></label>
1163                                         <select id="image-details-size" class="size" name="size"
1164                                              data-setting="size"
1165                                              <# if ( data.userSettings ) { #>
1166                                                   data-user-setting="imgsize"
1167                                              <# } #>>
1168                                              <?php
1169                                              /** This filter is documented in wp-admin/includes/media.php */
1170                                              $sizes = apply_filters(
1171                                                   'image_size_names_choose',
1172                                                   array(
1173                                                        'thumbnail' => __( 'Thumbnail' ),
1174                                                        'medium'    => __( 'Medium' ),
1175                                                        'large'     => __( 'Large' ),
1176                                                        'full'      => __( 'Full Size' ),
1177                                                   )
1178                                              );
1179