ID, 'service-images', true); $arr_post = json_decode($current_meta,true); //echo "
";print_R($arr_post);
  wp_nonce_field('service_images_submit', 'service_images_nounce');
  ?>
  



$_POST['hid_image'],"image_description"=>$_POST['image_description'],"image_title"=>$_POST['image_title']))); //====================== Modified on 3rd March 2015 =================== } } add_action('save_post', 'save_service_images_meta'); function skinmd_admin_inline_js() { ?> array(), 'url' => '#'); $meta_data = get_metadata('post', $_POST['service_id'], "service-images", true); $attachment_ids = json_decode($meta_data); foreach($attachment_ids as $attachment){ array_push($images['images'], array( 'attachment_id' => $attachment, 'url' => wp_get_attachment_url($attachment), 'title' => 'Botox', 'description' => 'Treated with botox for forehead and crows feet' )); } $images['url'] = get_permalink($_POST['service_id']); echo json_encode($images); wp_die(); // this is required to terminate immediately and return a proper response } add_action( 'wp_ajax_nopriv_skinmd_service_images', 'skinmd_service_images' ); add_action( 'wp_ajax_skinmd_service_images', 'skinmd_service_images' ); function skinmd_service_image_popup() { echo '
'; echo ''; echo '
BEFOREAFTER
'; echo ''; echo ''; echo '
'; wp_die(); // this is required to terminate immediately and return a proper response } add_action( 'wp_ajax_nopriv_skinmd_service_image_popup', 'skinmd_service_image_popup' ); add_action( 'wp_ajax_skinmd_service_image_popup', 'skinmd_service_image_popup' ); add_action('wp_print_footer_scripts', function(){ echo ""; }); ?>