load_image_to_edit

過濾鉤子
apply_filters( 'load_image_to_edit', $image, $attachment_id, $size )
引數
  • (resource|GdImage) $image Current image.
    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_edit_attachmenturlload_image_to_edit_filesystempathterms_to_editwp_save_image_editor_file
相關方法
load_image_to_edit_load_image_to_edit_pathformat_to_editget_image_send_to_editorwp_image_editorwp_load_image
引入
2.9.0
棄用
-

load_image_to_edit: 這個函式用來載入一個要在媒體庫中編輯的圖片。它將圖片的附件ID作為引數,並返回一個關於圖片的資訊陣列,例如它的路徑、URL和後設資料。

過濾正在載入的當前影象進行編輯。

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

常見問題

FAQs
檢視更多 >