wp_create_file_in_uploads

動作鉤子
do_action( 'wp_create_file_in_uploads', $file, $attachment_id )

wp_create_file_in_uploads 函式是一個 WordPress 自定義函式,它不是 WordPress 核心函式: 這個函式用於在 WordPress 上傳資料夾中建立檔案。它接受檔名和檔案內容作為引數,並在上傳資料夾中建立一個名為指定檔名的檔案,並將檔案內容寫入該檔案。

在頭像設定完畢或返回錯誤後觸發。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
do_action( 'wp_create_file_in_uploads', $file, $attachment_id ); // For replication.
do_action( 'wp_create_file_in_uploads', $file, $attachment_id ); // For replication.
do_action( 'wp_create_file_in_uploads', $file, $attachment_id ); // For replication.

常見問題

FAQs
檢視更多 >