Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- add_filter( 'rwmb_meta_boxes', 'your_prefix_register_meta_boxes' );
- function your_prefix_register_meta_boxes( $meta_boxes ) {
- $meta_boxes[] = array (
- 'title' => 'Prodotti',
- 'post_types' => array (
- 'prodotti',
- ),
- 'context' => 'after_title',
- 'priority' => 'high',
- 'status' => 'publish',
- 'autosave' => true,
- 'fields' => array (
- ` array (
- 'id' => 'codice_prodotto',
- 'type' => 'number',
- 'name' => 'Codice prodotto',
- 'clone' => 1,
- 'required' => 1,
- 'sort_clone' => true,
- ),
- array (
- 'id' => 'unita_di_misura_prodotto',
- 'name' => 'Unità di misura',
- 'type' => 'select',
- 'desc' => 'ore
- giornata
- quarti di ora
- kg
- mt
- nr
- pz',
- 'placeholder' => 'Seleziona',
- 'options' => array (
- 'ore' => 'ore',
- 'giornata' => 'giornata',
- 'quarti di ora' => 'quarti',
- 'nr' => 'nr',
- 'pz' => 'pz',
- ),
- 'required' => 1,
- ),
- array (
- 'id' => 'categoria_prodotti',
- 'type' => 'taxonomy',
- 'name' => 'Categoria',
- 'taxonomy' => 'categoria_prodotti',
- 'field_type' => 'select_tree',
- 'required' => 1,
- ),
- array (
- 'id' => 'prezzo_listino_default_prodotto',
- 'type' => 'number',
- 'name' => 'Prezzo di Listino',
- 'required' => 1,
- ),
- array (
- 'id' => 'prezzo_listino_rivenditori_prodotto',
- 'type' => 'number',
- 'name' => 'Prezzo rivenditori',
- 'required' => 1,
- 'after' => '€',
- ),
- array (
- 'id' => 'descrizione_breve_prodotto',
- 'type' => 'text',
- 'name' => 'Descrizione breve',
- ),
- ),
- 'id' => 'prodotti',
- );
- return $meta_boxes;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement