PHP Class SIS_Admin_Main, Simple-image-sizes

显示文件 Open project: Rahe/Simple-image-sizes Class Usage Examples

Public Methods

Method Description
__construct ( )
add_template ( ) : boolean Include the javascript template
get_available_crop ( ) : array Get all the available cropping
get_crop_position_label ( string $crop_position ) : string Return the crop position label from the slug
is_crop_position ( string $crop_position ) : boolean Check if the crop is available
localize_vars ( ) : array Localize the var for javascript
register_assets ( ) Register all the assets for the admin
thumbnail_rebuild ( $att_id, $thumbnails = null ) : array Rebuild the given attribute with the given thumbnails
wp_generate_attachment_metadata_custom ( integer $attachment_id, string $file, $thumbnails = null ) : mixed Generate post thumbnail attachment meta data.

Method Details

__construct() public method

public __construct ( )

add_template() public static method

Include the javascript template
public static add_template ( ) : boolean
return boolean

get_available_crop() public static method

Get all the available cropping
Author: Nicolas Juen
public static get_available_crop ( ) : array
return array

get_crop_position_label() public static method

Return the crop position label from the slug
Author: Nicolas Juen
public static get_crop_position_label ( string $crop_position ) : string
$crop_position string
return string

is_crop_position() public static method

Check if the crop is available
Author: Nicolas Juen
public static is_crop_position ( string $crop_position ) : boolean
$crop_position string
return boolean

localize_vars() public static method

Localize the var for javascript
Author: Nicolas Juen
public static localize_vars ( ) : array
return array

register_assets() public static method

Register all the assets for the admin
public static register_assets ( )

thumbnail_rebuild() public static method

Rebuild the given attribute with the given thumbnails
Author: Nicolas Juen
public static thumbnail_rebuild ( $att_id, $thumbnails = null ) : array
$att_id
$thumbnails
return array

wp_generate_attachment_metadata_custom() public static method

Generate post thumbnail attachment meta data.
Since: 2.1.0
public static wp_generate_attachment_metadata_custom ( integer $attachment_id, string $file, $thumbnails = null ) : mixed
$attachment_id integer Attachment Id to process.
$file string Filepath of the Attached image.
return mixed Metadata for attachment.