*/
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');
}
/**
{
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
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
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 );
}