Advertisement
Guest User

Untitled

a guest
Feb 8th, 2016
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.14 KB | None | 0 0
  1. foreach ( $meta_ids as $meta_id ) {
  2. /**
  3. * Fires immediately before updating metadata of a specific type.
  4. *
  5. * The dynamic portion of the hook, `$meta_type`, refers to the meta
  6. * object type (comment, post, or user).
  7. *
  8. * @since 2.9.0
  9. *
  10. * @param int $meta_id ID of the metadata entry to update.
  11. * @param int $object_id Object ID.
  12. * @param string $meta_key Meta key.
  13. * @param mixed $meta_value Meta value.
  14. */
  15. do_action( "update_{$meta_type}_meta", $meta_id, $object_id, $meta_key, $_meta_value );
  16. }
  17.  
  18. if ( 'post' == $meta_type ) {
  19. foreach ( $meta_ids as $meta_id ) {
  20. /**
  21. * Fires immediately before updating a post's metadata.
  22. *
  23. * @since 2.9.0
  24. *
  25. * @param int $meta_id ID of metadata entry to update.
  26. * @param int $object_id Object ID.
  27. * @param string $meta_key Meta key.
  28. * @param mixed $meta_value Meta value.
  29. */
  30. do_action( 'update_postmeta', $meta_id, $object_id, $meta_key, $meta_value );
  31. }
  32. }
  33.  
  34. $_meta_value = $meta_value;
  35. $meta_value = maybe_serialize( $meta_value );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement