[ Index ]

PHP Cross Reference of WordPress




/wp-admin/includes/ -> class-wp-site-icon.php (summary)

Administration API: WP_Site_Icon class

File Size: 233 lines (6 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

WP_Site_Icon:: (7 methods):

Class: WP_Site_Icon  - X-Ref

Core class used to implement site icon functionality.

__construct()   X-Ref
Registers actions and filters.

since: 4.3.0

create_attachment_object( $cropped, $parent_attachment_id )   X-Ref
Creates an attachment 'object'.

since: 4.3.0
return: array An array with attachment object data.
param: string $cropped              Cropped image URL.
param: int    $parent_attachment_id Attachment ID of parent image.

insert_attachment( $attachment, $file )   X-Ref
Inserts an attachment.

since: 4.3.0
return: int               Attachment ID.
param: array  $attachment An array with attachment object data.
param: string $file       File path of the attached image.

additional_sizes( $sizes = array()   X-Ref
Adds additional sizes to be made when creating the site icon images.

since: 4.3.0
return: array[] Array of arrays containing additional image sizes.
param: array[] $sizes Array of arrays containing information for additional sizes.

intermediate_image_sizes( $sizes = array()   X-Ref
Adds Site Icon sizes to the array of image sizes on demand.

since: 4.3.0
return: string[] Array of image size names.
param: string[] $sizes Array of image size names.

delete_attachment_data( $post_id )   X-Ref
Deletes the Site Icon when the image file is deleted.

since: 4.3.0
param: int $post_id Attachment ID.

get_post_metadata( $value, $post_id, $meta_key, $single )   X-Ref
Adds custom image sizes when meta data for an image is requested, that happens to be used as Site Icon.

since: 4.3.0
return: array|null|string The attachment metadata value, array of values, or null.
param: null|array|string $value    The value get_metadata() should return a single metadata value, or an
param: int               $post_id  Post ID.
param: string            $meta_key Meta key.
param: bool              $single   Whether to return only the first value of the specified `$meta_key`.

Generated: Wed Jun 29 01:00:03 2022 Cross-referenced by PHPXref 0.7.1