wpseek.com
Bazujące na WordPress narzędzie wyszukiwania dla deweloperów i twórców motywów.



wp_show_heic_upload_error › WordPress Function

Od5.5.0
Przestarzałyn/a
› wp_show_heic_upload_error ( $plupload_settings )
Parametry:
  • (array<string,mixed>) $plupload_settings The settings for Plupload.js.
    Wymagane: Tak
Powrót:
  • (array<string,mixed>) Modified settings for Plupload.js.
Zdefiniowane na:
Codex:
Dziennik zmian:
  • 6.7.0

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



Źródło

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_settings['heic_upload_error'] = true;
	}
	return $plupload_settings;
}