image_editor_save_pre

過濾鉤子
apply_filters( 'image_editor_save_pre', $image, $attachment_id )
引數
  • (WP_Image_Editor) $image The image editor instance.
    Required:
  • (int) $attachment_id The attachment post ID.
    Required:
定義位置
相關勾子
image_editor_default_mime_typeexcerpt_save_prewp_image_editor_before_changeimage_editor_output_formattitle_save_pre
相關方法
wp_image_editor_supportswp_image_editorget_editable_rolesimage_edit_apply_changesget_editor_stylesheetswp_get_image_editor
引入
3.5.0
棄用
-

image_editor_save_pre。這個鉤子允許你在使用WordPress影象編輯器儲存影象資料之前對其進行過濾。這個鉤子可以用來修改圖片資料或新增自定義後設資料到圖片中。

過濾WP_Image_Editor例項,以便將影象流向瀏覽器。

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

常見問題

FAQs
檢視更多 >