site_icon_image_sizes

site_icon_image_sizes

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter
See hook in action

See hook in core

Displaying hooks found in version: wordpress-6.7.2

apply_filters('site_icon_image_sizes') is found 2 times:

  • /wp-admin/includes/class-wp-site-icon.php line 155
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    * @since 4.3.0
     *
     * @param int[] $site_icon_sizes Array of sizes available for the Site Icon.
     */
    $this->site_icon_sizes = apply_filters( 'site_icon_image_sizes', $this->site_icon_sizes );
     
    // Use a natural sort of numbers.
    natsort( $this->site_icon_sizes );
    $this->site_icon_sizes = array_reverse( $this->site_icon_sizes );
     
    // Ensure that we only resize the image into sizes that allow cropping.
  • /wp-admin/includes/class-wp-site-icon.php line 191
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    * @return string[] Array of image size names.
     */
    public function intermediate_image_sizes( $sizes = array() ) {
        /** This filter is documented in wp-admin/includes/class-wp-site-icon.php */
        $this->site_icon_sizes = apply_filters( 'site_icon_image_sizes', $this->site_icon_sizes );
        foreach ( $this->site_icon_sizes as $size ) {
            $sizes[] = 'site_icon-' . $size;
        }
     
        return $sizes;
    }

See this hook used in plugins: