load_image_to_edit_path

过滤钩子
apply_filters( 'load_image_to_edit_path', $filepath, $attachment_id, $size )
参数
  • (string|false) $filepath File path or URL to current image, or false.
    Required:
  • (int) $attachment_id Attachment ID.
    Required:
  • (string|int[]) $size Requested image size. Can be any registered image size name, or an array of width and height values in pixels (in that order).
    Required:
定义位置
相关勾子
load_image_to_editload_image_to_edit_filesystempathload_image_to_edit_attachmenturlwp_read_image_metadataimage_editor_output_format
相关方法
_load_image_to_edit_pathload_image_to_editwp_image_editor_supportsget_image_send_to_editorformat_to_editwp_image_editor
引入
2.9.0
弃用
-

load_image_to_edit_path: 这个函数结合了load_image_to_edit_filesystempath和load_image_to_edit_attachmenturl函数,根据附件的ID返回附件的文件路径和URL。

过滤当前图像的返回路径或URL。

return apply_filters( 'load_image_to_edit_path', $filepath, $attachment_id, $size );

常见问题

FAQs
查看更多 >