Answers for "Save image to custom meta box"

PHP
0

Save image to custom meta box

function save_joe_details($post_id){
  global $post;
  if ( defined('DOING_AUTOSAVE') && DOING_AUTOSAVE )
  return $post_id;
  update_post_meta($post->ID, "custom_field_image", $_POST["custom_field_image"] );
}
add_action('save_post', 'save_joe_details');
Posted by: Guest on May-04-2021

Browse Popular Code Answers by Language