wpseek.com
A WordPress-centric search engine for devs and theme authors



wp_show_heic_upload_error › WordPress Function

Since5.5.0
Deprecatedn/a
wp_show_heic_upload_error ( $plupload_settings )
Parameters:
  • (array[]) $plupload_settings The settings for Plupload.js.
    Required: Yes
Returns:
  • (array[]) Modified settings for Plupload.js.
Defined at:
Codex:
Change Log:
  • 6.7.0

Callback to enable showing of the user error when uploading .heic images.



Source

function wp_show_heic_upload_error( $plupload_settings ) {
	// Check if HEIC images can be edited.
	if ( ! wp_image_editor_supports( array( 'mime_type' => 'image/heic' ) ) ) {
		$plupload_init['heic_upload_error'] = true;
	}
	return $plupload_settings;
}