remove product feature field
authorSteve Sutton <steve@gaslightmedia.com>
Tue, 29 Dec 2015 20:27:48 +0000 (15:27 -0500)
committerSteve Sutton <steve@gaslightmedia.com>
Tue, 29 Dec 2015 20:27:48 +0000 (15:27 -0500)
index.php

index 2bddd44..0364e2c 100644 (file)
--- a/index.php
+++ b/index.php
@@ -105,8 +105,8 @@ function michsci_custom_post_type() {
  */
 function michsci_add_metaboxes()
 {
-     add_meta_box('miproduct_features', 'Features', 'miproduct_features', MICHSCI_POST_TYPE, 'normal', 'high');
-     add_meta_box('miproduct_related_products', 'Related Products', 'miproduct_related_products', MICHSCI_POST_TYPE, 'normal', 'high');
+     //add_meta_box('miproduct_features', 'Features', 'miproduct_features', MICHSCI_POST_TYPE, 'normal', 'high');
+     add_meta_box('miproduct_related_products', 'Related Files', 'miproduct_related_products', MICHSCI_POST_TYPE, 'normal', 'high');
 }
 
 /**
@@ -121,9 +121,6 @@ function miproduct_features()
 {
     global $post;
 
-    // Noncename needed to verify where the data originated
-     $nonce = wp_create_nonce( 'miproductmeta-meta-noncename' );
-    echo '<input type="hidden" name="miproductmeta-meta-noncename" id="miproductmeta-meta-noncename" value="' . $nonce . '" />';
     // get the features for the post
     $features = get_post_meta( $post->ID, 'miproduct_features', true );
     // output field
@@ -151,8 +148,8 @@ function miproduct_related_products()
     global $post;
 
     // Noncename needed to verify where the data originated
-    echo '<input type="hidden" name="miproductmeta_related_products_noncename" id="" value="';
-    wp_create_nonce( plugin_basename(__FILE__) ) . '" />';
+     $nonce = wp_create_nonce( 'miproductmeta-meta-noncename' );
+    echo '<input type="hidden" name="miproductmeta-meta-noncename" id="miproductmeta-meta-noncename" value="' . $nonce . '" />';
     // get the features for the post
     $related_products = get_post_meta( $post->ID, 'miproduct_related_products', true );
     // output field
@@ -184,9 +181,9 @@ function miproduct_save_meta()
     if ( !current_user_can( 'edit_post', $post->ID ) ) {
         return $post->ID;
     }
-    $features         = filter_var( $_POST['miproduct_features'] );
-    $related_products = filter_var( $_POST['miproduct_related_products'] ); 
-    update_post_meta( $post->ID, 'miproduct_features', $features );
+    //$features         = filter_var( $_POST['miproduct_features'] );
+    $related_products = filter_var( $_POST['miproduct_related_products'] );
+    //update_post_meta( $post->ID, 'miproduct_features', $features );
     update_post_meta( $post->ID, 'miproduct_related_products', $related_products );
 
 }