image_editor_output_format

过滤钩子
apply_filters( 'image_editor_output_format', array()
参数
  • (string[]) $output_format { An array of mime type mappings. Maps a source mime type to a new destination mime type. Default empty array. @type string ...$0 The new mime type. }
    Required:
  • (string) $filename Path to the image.
    Required:
  • (string) $mime_type The source image mime type.
    Required:
定义位置
相关勾子
image_editor_default_mime_typewp_image_editor_before_changeimage_editor_save_preimage_strip_metaload_image_to_edit_path
相关方法
wp_image_editor_supportsget_post_formatwp_image_editorset_post_formatget_post_format_link_load_image_to_edit_path
引入
5.8.0
弃用
-

image_editor_output_format。这个钩子是用来设置使用WordPress图像编辑器时输出图像的格式。你可以使用这个钩子将输出格式设置为任何支持的图像格式,如PNG或JPEG。

过滤图像编辑器输出格式映射。

启用筛选用于保存图像的mime类型。默认情况下,映射数组为空,因此mime类型与源图像匹配。

$output_format = apply_filters( 'image_editor_output_format', array(), $filename, $mime_type );

常见问题

FAQs
查看更多 >
闪电侠

(工作日 10:00 - 18:30 为您服务)

2025-12-05 19:32:59

您好,无论是售前、售后、意见建议……均可通过联系工单与我们取得联系。

您也可选择聊天工具与我们即时沟通或点击查看:

您的工单我们已经收到,我们将会尽快跟您联系!
取消
选择聊天工具: