0 ) { $materials = array(); // for ( $i=0;$i $material ) { if (strlen($_POST['p3dlite_material_name'][$i])==0) continue; $materials[$i]['id']=$i; $materials[$i]['density']=$_POST['p3dlite_material_density'][$i]; $materials[$i]['name']=sanitize_text_field( $_POST['p3dlite_material_name'][$i] ); $materials[$i]['description']=sanitize_text_field( $_POST['p3dlite_material_description'][$i] ); $materials[$i]['photo']=sanitize_text_field( $_POST['p3dlite_material_photo'][$i] ); $materials[$i]['type'] = sanitize_text_field($_POST['p3dlite_material_type'][$i] ); $materials[$i]['diameter']=(float)( $_POST['p3dlite_material_diameter'][$i] ); $materials[$i]['length']=(float)( $_POST['p3dlite_material_length'][$i] ); $materials[$i]['weight']=(float)( $_POST['p3dlite_material_weight'][$i] ); $materials[$i]['price']=(strlen(sanitize_text_field($_POST['p3dlite_material_price'][$i])) ? sanitize_text_field($_POST['p3dlite_material_price'][$i]) : 0); $materials[$i]['price_type']=sanitize_text_field($_POST['p3dlite_material_price_type'][$i]); $materials[$i]['price1']=(strlen(sanitize_text_field($_POST['p3dlite_material_price1'][$i])) ? sanitize_text_field($_POST['p3dlite_material_price1'][$i]) : 0); $materials[$i]['price_type1']=sanitize_text_field($_POST['p3dlite_material_price_type1'][$i]); $materials[$i]['price2']=(strlen(sanitize_text_field($_POST['p3dlite_material_price2'][$i])) ? sanitize_text_field($_POST['p3dlite_material_price2'][$i]) : 0); $materials[$i]['price_type2']=sanitize_text_field($_POST['p3dlite_material_price_type2'][$i]); $materials[$i]['roll_price']=(float)( $_POST['p3dlite_material_roll_price'][$i] ); $materials[$i]['color']=sanitize_text_field($_POST['p3dlite_material_color'][$i]); $materials[$i]['shininess']=sanitize_text_field($_POST['p3dlite_material_shininess'][$i]); $materials[$i]['transparency']=sanitize_text_field($_POST['p3dlite_material_transparency'][$i]); $materials[$i]['glow']=(int)$_POST['p3dlite_material_glow'][$i]; if (isset($_FILES['p3dlite_material_photo_upload']['tmp_name'][$i]) && strlen($_FILES['p3dlite_material_photo_upload']['tmp_name'][$i])>0) { $uploaded_file = p3dlite_upload_file('p3dlite_material_photo_upload', $i); $materials[$i]['photo']=str_replace('http:','',$uploaded_file['url']); } } foreach ($materials as $material) { p3dlite_update_option( 'p3dlite_materials', $material ); } # wp_redirect( admin_url( 'admin.php?page=3dprint_materials' ) ); } ?>


ID #".$material['id']."";?>
 
Premium version', '3dprint-lite'); ?>
Premium version', '3dprint-lite'); ?>