wpseek.com
Outil de recherche WordPress pour les développeurs et auteurs de thèmes



wp_show_heic_upload_error › WordPress Function

Depuis5.5.0
Dépréciéen/a
› wp_show_heic_upload_error ( $plupload_settings )
Paramètres:
  • (array<string,mixed>) $plupload_settings The settings for Plupload.js.
    Requis: Oui
Retourne:
  • (array<string,mixed>) Modified settings for Plupload.js.
Défini(e) dans:
Codex:
Changelog:
  • 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_settings['heic_upload_error'] = true;
	}
	return $plupload_settings;
}