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 |
|---|---|
| 148 | $only_crop_sizes = array(); |
| 149 | |
| 150 | /** |
| 151 | * Filters the different dimensions that a site icon is saved in. |
| 152 | * |
| 153 | * @since 4.3.0 |
| 154 | * |
| 155 | * @param array $site_icon_sizes Sizes available for the Site Icon. |
| 156 | */ |
| 157 | $this->site_icon_sizes = apply_filters( 'site_icon_image_sizes', $this->site_icon_sizes ); |
| 158 | |
| 159 | // Use a natural sort of numbers. |
| 160 | natsort( $this->site_icon_sizes ); |
| 161 | $this->site_icon_sizes = array_reverse( $this->site_icon_sizes ); |
| 162 | |
| 163 | // ensure that we only resize the image into |
| 164 | foreach ( $sizes as $name => $size_array ) { |
| 165 | if ( isset( $size_array['crop'] ) ) { |
| 166 | $only_crop_sizes[ $name ] = $size_array; |
| Line | Code |
| 185 | * |
| 186 | * @since 4.3.0 |
| 187 | * @access public |
| 188 | * |
| 189 | * @param array $sizes List of image sizes. |
| 190 | * @return array List of intermediate image sizes. |
| 191 | */ |
| 192 | public function intermediate_image_sizes( $sizes = array() ) { |
| 193 | /** This filter is documented in wp-admin/includes/class-wp-site-icon.php */ |
| 194 | $this->site_icon_sizes = apply_filters( 'site_icon_image_sizes', $this->site_icon_sizes ); |
| 195 | foreach ( $this->site_icon_sizes as $size ) { |
| 196 | $sizes[] = 'site_icon-' . $size; |
| 197 | } |
| 198 | |
| 199 | return $sizes; |
| 200 | } |
| 201 | |
| 202 | /** |
| 203 | * Deletes the Site Icon when the image file is deleted. |