wpseek.com
WordPress开发者和主题制作者的搜索引擎
wp_get_media_library_upload_settings › WordPress Function
Since7.2.0
已弃用n/a
› wp_get_media_library_upload_settings ( 没有参数 )
| 返回: |
|
| 定义在: |
|
| 文档: |
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).源码
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'],
);
}