global $post;
// Noncename needed to verify where the data originated
- $nonce = wp_create_nonce( 'miproductmeta-meta-noncename' );
+ $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 );
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__) ) . '" />';
+ echo '<input type="hidden" name="miproductmeta_related_products_noncename" id="" value="';
+ wp_create_nonce( plugin_basename(__FILE__) ) . '" />';
// get the features for the post
$related_products = get_post_meta( $post->ID, 'miproduct_related_products', true );
// output field
return $post->ID;
}
$features = filter_var( $_POST['miproduct_features'] );
- $related_products = 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 );