WP hooks navigation: Home/browse • Actions index • Filters index
To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).
The best way to understand what a hook does is to look at where it occurs in the source code.
do_action( "hook_name" )
apply_filters( "hook_name", "what_to_filter" )
.Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.
This hook occurs 2 times in this file.
Line | Code |
---|---|
140 | $only_crop_sizes = array(); |
141 |
|
142 | /** |
143 | * Filter the different dimensions that a site icon is saved in. |
144 | * |
145 | * @since 4.3.0 |
146 | * |
147 | * @param array $site_icon_sizes Sizes available for the Site Icon. |
148 | */ |
149 | $this->site_icon_sizes = apply_filters( 'site_icon_image_sizes', $this->site_icon_sizes ); |
150 |
|
151 | // Use a natural sort of numbers. |
152 | natsort( $this->site_icon_sizes ); |
153 | $this->site_icon_sizes = array_reverse( $this->site_icon_sizes ); |
154 |
|
155 | // ensure that we only resize the image into |
156 | foreach ( $sizes as $name => $size_array ) { |
157 | if ( isset( $size_array['crop'] ) ) { |
158 | $only_crop_sizes[ $name ] = $size_array; |
Line | Code |
177 | * |
178 | * @since 4.3.0 |
179 | * @access public |
180 | * |
181 | * @param array $sizes List of image sizes. |
182 | * @return array List of intermediate image sizes. |
183 | */ |
184 | public function intermediate_image_sizes( $sizes = array() ) { |
185 | /** This filter is documented in wp-admin/includes/class-wp-site-icon.php */ |
186 | $this->site_icon_sizes = apply_filters( 'site_icon_image_sizes', $this->site_icon_sizes ); |
187 | foreach ( $this->site_icon_sizes as $size ) { |
188 | $sizes[] = 'site_icon-' . $size; |
189 | } |
190 |
|
191 | return $sizes; |
192 | } |
193 |
|
194 | /** |
195 | * Deletes the Site Icon when the image file is deleted. |