[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

title

Body

[close]

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

Administration API: WP_Site_Icon class

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

Defines 1 class

WP_Site_Icon:: (7 methods):
  __construct()
  create_attachment_object()
  insert_attachment()
  additional_sizes()
  intermediate_image_sizes()
  delete_attachment_data()
  get_post_metadata()


Class: WP_Site_Icon  - X-Ref

Core class used to implement site icon functionality.

__construct()   X-Ref
Registers actions and filters.


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

return: array Attachment object.
param: string $cropped              Cropped image URL.
param: int    $parent_attachment_id Attachment ID of parent image.

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

return: int           Attachment ID
param: array  $object Attachment object.
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.

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.

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.

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.

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: string|array      $single   Meta value, or an array of values.



Generated: Tue Aug 20 08:20:01 2019 Cross-referenced by PHPXref 0.7