wpseek.com
Un motore di ricerca WordPress per sviluppatori e autori di temi
wp_get_media_library_upload_settings › WordPress Function
Da7.2.0
Deprecaton/a
› wp_get_media_library_upload_settings ( Nessun parametro )
| Ritorna: |
|
| Definito a: |
|
| Codex: |
Returns the settings for the client-side media processing pipeline in the Media Library.
These mirror the values the block editor consumes for the same pipeline: the REST index (the image processing settings, shared through _wp_get_client_side_media_image_settings()) and get_block_editor_settings() (max upload size and allowed mime types).Sorgenti
function wp_get_media_library_upload_settings(): array {
$image_settings = _wp_get_client_side_media_image_settings();
return array(
'maxUploadFileSize' => max( 0, (int) wp_max_upload_size() ),
'allowedMimeTypes' => get_allowed_mime_types(),
'allImageSizes' => $image_settings['image_sizes'],
'bigImageSizeThreshold' => $image_settings['image_size_threshold'],
'imageStripMeta' => $image_settings['image_strip_meta'],
'imageMaxBitDepth' => $image_settings['image_max_bit_depth'],
'generateAnimatedImageSubsizes' => $image_settings['generate_animated_image_subsizes'],
);
}