load_image_to_edit_attachmenturl

過濾鉤子
apply_filters( 'load_image_to_edit_attachmenturl', wp_get_attachment_url( $attachment_id )
引數
  • (string|false) $image_url Current image URL.
    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_edit_pathload_image_to_editload_image_to_edit_filesystempathwp_header_image_attachment_metadataget_edit_comment_link
相關方法
_load_image_to_edit_pathload_image_to_editwp_get_attachment_urlwp_edit_attachments_queryget_the_attachment_linkwp_get_attachment_thumb_url
引入
3.1.0
棄用
-

load_image_to_edit_attachmenturl: 這個函式根據附件的ID返回附件的URL。它用於生成在媒體庫中正在編輯的圖片的URL。

編輯影象時過濾附件URL的路徑。

僅當檔案未儲存在本地且伺服器上啟用了allow_url_fopen時,才會評估篩選器。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
$filepath = apply_filters( 'load_image_to_edit_attachmenturl', wp_get_attachment_url( $attachment_id ), $attachment_id, $size );
$filepath = apply_filters( 'load_image_to_edit_attachmenturl', wp_get_attachment_url( $attachment_id ), $attachment_id, $size );
$filepath = apply_filters( 'load_image_to_edit_attachmenturl', wp_get_attachment_url( $attachment_id ), $attachment_id, $size );

常見問題

FAQs
檢視更多 >