update_postmeta

動作鉤子
do_action( 'update_postmeta', $meta_id, $object_id, $meta_key, $meta_value )
引數
  • (int) $meta_id ID of metadata entry to update.
    Required:
  • (int) $object_id Post ID.
    Required:
  • (string) $meta_key Metadata key.
    Required:
  • (mixed) $meta_value Metadata value. This will be a PHP-serialized string representation of the value if the value is an array, an object, or itself a PHP-serialized string.
    Required:
定義位置
相關勾子
updated_postmetadelete_postmetadeleted_postmetaupdate_footerwp_update_site
相關方法
update_post_metaupdate_metaupdate_site_metaupdate_postmeta_cacheupdate_usermetaupdate_term_meta
引入
2.9.0
棄用
-

update_postmeta 是 WordPress 中的一個動作鉤子,在資料庫中更新發布後設資料後觸發。 此鉤子用於在後元更新完成後執行其他處理或日誌記錄。

在更新一個文章的後設資料之前立即觸發。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
do_action( 'update_postmeta', $meta_id, $object_id, $meta_key, $meta_value );
do_action( 'update_postmeta', $meta_id, $object_id, $meta_key, $meta_value );
do_action( 'update_postmeta', $meta_id, $object_id, $meta_key, $meta_value );

常見問題

FAQs
檢視更多 >