- 
                Notifications
    You must be signed in to change notification settings 
- Fork 84
added_post_meta
        github-actions[bot] edited this page Oct 29, 2025 
        ·
        3 revisions
      
    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_idID of the metadata entry.
- 
int$object_idPost ID.
- 
string$meta_keyMetadata key.
- 
Activitypub\mixed$meta_valueMetadata value.
\do_action( 'added_post_meta', ...$meta )Follow @[email protected] for updates and news.