-
Notifications
You must be signed in to change notification settings - Fork 85
added_post_meta
github-actions[bot] edited this page Sep 30, 2025
·
1 revision
Fires when post meta is added.
/**
* Fires when post meta is added.
*
* @param int $meta_id
* @param int $object_id
* @param string $meta_key
* @param Activitypub\mixed $meta_value
* @return int The filtered value.
*/
function my_added_post_meta_callback( int $meta_id, int $object_id = null, string $meta_key = null, Activitypub\mixed $meta_value = null ) {
// Your code here.
return $meta_id;
}
add_filter( 'added_post_meta', 'my_added_post_meta_callback' );
-
int
$meta_id
ID of the metadata entry. -
int
$object_id
Post ID. -
string
$meta_key
Metadata key. -
Activitypub\mixed
$meta_value
Metadata value.
\do_action( 'added_post_meta', ...$meta )
Follow @[email protected] for updates and news.