
Dokumentation | Skapa ny lathund/supportkort
Denna sida laddar data skapad med Meta Box AIO genom tillägget WP Front Admin
Meta Box datan är nedan men går att anpassa med en visuell redigerare i backend.
<?php
add_filter( 'rwmb_meta_boxes', 'your_prefix_function_name' );
function your_prefix_function_name( $meta_boxes ) {
$prefix = '';
$meta_boxes[] = [
'title' => __( 'Skapa artikel', 'your-text-domain' ),
'id' => 'acf_group_6276842e5aae1-2',
'post_types' => ['artiklar'],
'context' => 'after_title',
'style' => 'seamless',
'closed' => false,
'default_hidden' => false,
'autosave' => false,
'revision' => true,
'tab_style' => 'box',
'tabs' => [
'tab_zgcigkbfptg' => [
'label' => 'Start',
'icon' => '',
],
'allman_data' => [
'label' => 'Allmän data',
'icon' => '',
],
'beskriv_systemet' => [
'label' => 'Beskriv systemet',
'icon' => '',
],
'losenordshantering' => [
'label' => 'Lösenordshantering',
'icon' => '',
],
'systemforvaltare' => [
'label' => 'Systemförvaltare',
'icon' => '',
],
'installaton_and_vanliga_fel' => [
'label' => 'Installaton & vanliga fel',
'icon' => '',
],
'behorigheterkrav' => [
'label' => 'Behörigheter/krav',
'icon' => '',
],
'lathund' => [
'label' => 'Skriv lathund',
'icon' => '',
],
],
'fields' => [
[
'name' => __( 'Vad för typ av dokument skapar du?', 'your-text-domain' ),
'id' => $prefix . 'typ_av_dokument',
'type' => 'taxonomy',
'taxonomy' => ['typ_av_artikel'],
'field_type' => 'radio_list',
'add_new' => false,
'remove_default' => false,
'required' => true,
'admin_columns' => [
'position' => 'before title',
'searchable' => true,
'filterable' => true,
],
'hide_from_rest' => false,
'hide_from_front' => false,
'tab' => 'tab_zgcigkbfptg',
],
[
'name' => __( 'Systembild', 'your-text-domain' ),
'id' => $prefix . 'systembild',
'type' => 'image_upload',
'max_file_uploads' => 1,
'max_status' => false,
'force_delete' => false,
'required' => true,
'clone' => false,
'clone_empty_start' => false,
'hide_from_rest' => false,
'hide_from_front' => false,
'tab' => 'allman_data',
],
[
'name' => __( 'Sammanfattning', 'your-text-domain' ),
'id' => $prefix . 'sammanfattning',
'type' => 'textarea',
'label_description' => __( 'Beskriv KORT vad denna artikel beskriver:', 'your-text-domain' ),
'placeholder' => __( 'OM SUPPORTKORT: T.ex.: "Supportkort för systemet SKRIVSYSTEMNAMNHÄR". OM LATHUND: T.ex.: "Instruktioner för hur du byter certifikat på XXX"', 'your-text-domain' ),
'rows' => 2,
'required' => true,
'disabled' => false,
'readonly' => false,
'clone' => false,
'clone_empty_start' => false,
'hide_from_rest' => false,
'hide_from_front' => false,
'limit' => 80,
'limit_type' => 'character',
'tab' => 'allman_data',
],
[
'name' => __( 'Taggar', 'your-text-domain' ),
'id' => $prefix . 'taggar',
'type' => 'taxonomy',
'taxonomy' => ['taggar'],
'field_type' => 'select_advanced',
'add_new' => true,
'remove_default' => false,
'multiple' => true,
'select_all_none' => true,
'required' => false,
'columns' => 4,
'hide_from_rest' => false,
'hide_from_front' => false,
'tab' => 'allman_data',
],
[
'name' => __( 'Vilken kommun använder systemet?', 'your-text-domain' ),
'id' => $prefix . 'kommun',
'type' => 'taxonomy_advanced',
'label_description' => __( 'Du kan välja fler kommuner om systemet finns i fler än en kommun.', 'your-text-domain' ),
'taxonomy' => ['kommun'],
'field_type' => 'checkbox_list',
'add_new' => false,
'remove_default' => false,
'select_all_none' => false,
'required' => true,
'clone' => false,
'clone_empty_start' => false,
'columns' => 4,
'hide_from_rest' => false,
'hide_from_front' => false,
'tab' => 'allman_data',
],
[
'name' => __( 'Vilka ska ha access till denna artikel?', 'your-text-domain' ),
'id' => $prefix . 'vilken_grupp',
'type' => 'taxonomy_advanced',
'label_description' => __( 'Välj de grupper som ska ha access att se denna artikel.', 'your-text-domain' ),
'taxonomy' => ['grupp'],
'field_type' => 'checkbox_list',
'add_new' => false,
'remove_default' => false,
'select_all_none' => false,
'required' => true,
'clone' => false,
'clone_empty_start' => false,
'columns' => 4,
'hide_from_rest' => false,
'hide_from_front' => false,
'tab' => 'allman_data',
],
[
'name' => __( 'Beskrivning av system:', 'your-text-domain' ),
'id' => $prefix . 'vilka_anvander_systemet_till_vad',
'type' => 'wysiwyg',
'label_description' => __( 'Till vad används systemet? Vilka kommuner använder systemet? Vilka verksamheter använder systemet inom kommunen? Leverantör?', 'your-text-domain' ),
'raw' => false,
'options' => [
'quicktags' => false,
'media_buttons' => true,
'teeny' => true,
],
'required' => true,
'clone' => false,
'clone_empty_start' => false,
'hide_from_rest' => false,
'hide_from_front' => false,
'limit_type' => 'character',
'visible' => [
'when' => [['typ_av_dokument', '=', 185]],
'relation' => 'or',
],
'tab' => 'beskriv_systemet',
],
[
'name' => __( 'Lösenordshantering:', 'your-text-domain' ),
'id' => $prefix . 'losenordshantering',
'type' => 'wysiwyg',
'label_description' => __( 'Vilka sköter byte av lösenord?', 'your-text-domain' ),
'raw' => false,
'options' => [
'teeny' => true,
'quicktags' => false,
'media_buttons' => true,
],
'required' => false,
'clone' => false,
'clone_empty_start' => false,
'hide_from_rest' => false,
'hide_from_front' => false,
'limit_type' => 'character',
'visible' => [
'when' => [['typ_av_dokument', '=', 185]],
'relation' => 'or',
],
'tab' => 'losenordshantering',
],
[
'name' => __( 'Kommun:', 'your-text-domain' ),
'id' => $prefix . 'kommunheby',
'type' => 'select',
'label_description' => __( 'Välj kommun', 'your-text-domain' ),
'options' => [
'Heby' => __( 'Heby', 'your-text-domain' ),
],
'std' => __( 'Heby', 'your-text-domain' ),
'multiple' => false,
'select_all_none' => false,
'required' => true,
'disabled' => false,
'readonly' => false,
'clone' => false,
'clone_empty_start' => false,
'columns' => 4,
'hide_from_rest' => false,
'hide_from_front' => false,
'visible' => [
'when' => [['typ_av_dokument', '=', 185]],
'relation' => 'and',
],
'tab' => 'systemforvaltare',
],
[
'name' => __( 'Kontaktperson:', 'your-text-domain' ),
'id' => $prefix . 'Kontaktpersonheby',
'type' => 'text',
'label_description' => __( 'Namn på personen', 'your-text-domain' ),
'std' => __( 'Används ej', 'your-text-domain' ),
'placeholder' => __( 'Anna Andersson', 'your-text-domain' ),
'required' => true,
'disabled' => false,
'readonly' => false,
'clone' => false,
'clone_empty_start' => false,
'columns' => 4,
'hide_from_rest' => false,
'hide_from_front' => false,
'limit_type' => 'character',
'visible' => [
'when' => [['typ_av_dokument', '=', 185]],
'relation' => 'and',
],
'tab' => 'systemforvaltare',
],
[
'name' => __( 'Telefonnummer:', 'your-text-domain' ),
'id' => $prefix . 'telefonnummerheby',
'type' => 'text',
'label_description' => __( 'Telefonnummer till kontaktperson', 'your-text-domain' ),
'std' => __( 'Används ej', 'your-text-domain' ),
'placeholder' => 701234578,
'required' => true,
'disabled' => false,
'readonly' => false,
'clone' => false,
'clone_empty_start' => false,
'columns' => 4,
'hide_from_rest' => false,
'hide_from_front' => false,
'limit_type' => 'character',
'visible' => [
'when' => [['typ_av_dokument', '=', 185]],
'relation' => 'and',
],
'tab' => 'systemforvaltare',
],
[
'name' => __( 'Kommun:', 'your-text-domain' ),
'id' => $prefix . 'kommunalvkarleby',
'type' => 'select',
'label_description' => __( 'Välj kommun', 'your-text-domain' ),
'options' => [
'Älvkarleby' => __( 'Älvkarleby', 'your-text-domain' ),
],
'std' => __( 'Älvkarleby', 'your-text-domain' ),
'multiple' => false,
'select_all_none' => false,
'required' => true,
'disabled' => false,
'readonly' => false,
'clone' => false,
'clone_empty_start' => false,
'columns' => 4,
'hide_from_rest' => false,
'hide_from_front' => false,
'visible' => [
'when' => [['typ_av_dokument', '=', 185]],
'relation' => 'and',
],
'tab' => 'systemforvaltare',
],
[
'name' => __( 'Kontaktperson:', 'your-text-domain' ),
'id' => $prefix . 'Kontaktpersonalvkarleby',
'type' => 'text',
'label_description' => __( 'Namn på personen', 'your-text-domain' ),
'std' => __( 'Används ej', 'your-text-domain' ),
'placeholder' => __( 'Anna Andersson', 'your-text-domain' ),
'required' => true,
'disabled' => false,
'readonly' => false,
'clone' => false,
'clone_empty_start' => false,
'columns' => 4,
'hide_from_rest' => false,
'hide_from_front' => false,
'limit_type' => 'character',
'visible' => [
'when' => [['typ_av_dokument', '=', 185]],
'relation' => 'and',
],
'tab' => 'systemforvaltare',
],
[
'name' => __( 'Telefonnummer:', 'your-text-domain' ),
'id' => $prefix . 'telefonnummeralvkarleby',
'type' => 'text',
'label_description' => __( 'Telefonnummer till kontaktperson', 'your-text-domain' ),
'std' => __( 'Används ej', 'your-text-domain' ),
'placeholder' => 701234578,
'required' => true,
'disabled' => false,
'readonly' => false,
'clone' => false,
'clone_empty_start' => false,
'columns' => 4,
'hide_from_rest' => false,
'hide_from_front' => false,
'limit_type' => 'character',
'visible' => [
'when' => [['typ_av_dokument', '=', 185]],
'relation' => 'and',
],
'tab' => 'systemforvaltare',
],
[
'name' => __( 'Kommun:', 'your-text-domain' ),
'id' => $prefix . 'kommunknivsta',
'type' => 'select',
'label_description' => __( 'Välj kommun', 'your-text-domain' ),
'options' => [
'Knivsta' => __( 'Knivsta', 'your-text-domain' ),
],
'std' => __( 'Knivsta', 'your-text-domain' ),
'multiple' => false,
'select_all_none' => false,
'required' => true,
'disabled' => false,
'readonly' => false,
'clone' => false,
'clone_empty_start' => false,
'columns' => 4,
'hide_from_rest' => false,
'hide_from_front' => false,
'visible' => [
'when' => [['typ_av_dokument', '=', 185]],
'relation' => 'and',
],
'tab' => 'systemforvaltare',
],
[
'name' => __( 'Kontaktperson:', 'your-text-domain' ),
'id' => $prefix . 'Kontaktpersonknivsta',
'type' => 'text',
'label_description' => __( 'Namn på personen', 'your-text-domain' ),
'std' => __( 'Används ej', 'your-text-domain' ),
'placeholder' => __( 'Anna Andersson', 'your-text-domain' ),
'required' => true,
'disabled' => false,
'readonly' => false,
'clone' => false,
'clone_empty_start' => false,
'columns' => 4,
'hide_from_rest' => false,
'hide_from_front' => false,
'limit_type' => 'character',
'visible' => [
'when' => [['typ_av_dokument', '=', 185]],
'relation' => 'and',
],
'tab' => 'systemforvaltare',
],
[
'name' => __( 'Telefonnummer:', 'your-text-domain' ),
'id' => $prefix . 'telefonnummerknivsta',
'type' => 'text',
'label_description' => __( 'Telefonnummer till kontaktperson', 'your-text-domain' ),
'std' => __( 'Används ej', 'your-text-domain' ),
'placeholder' => 701234578,
'required' => true,
'disabled' => false,
'readonly' => false,
'clone' => false,
'clone_empty_start' => false,
'columns' => 4,
'hide_from_rest' => false,
'hide_from_front' => false,
'limit_type' => 'character',
'visible' => [
'when' => [['typ_av_dokument', '=', 185]],
'relation' => 'and',
],
'tab' => 'systemforvaltare',
],
[
'name' => __( 'Kommun:', 'your-text-domain' ),
'id' => $prefix . 'kommuntierp',
'type' => 'select',
'label_description' => __( 'Välj kommun', 'your-text-domain' ),
'options' => [
'Tierp' => __( 'Tierp', 'your-text-domain' ),
],
'std' => __( 'Tierp', 'your-text-domain' ),
'multiple' => false,
'select_all_none' => false,
'required' => true,
'disabled' => false,
'readonly' => false,
'clone' => false,
'clone_empty_start' => false,
'columns' => 4,
'hide_from_rest' => false,
'hide_from_front' => false,
'visible' => [
'when' => [['typ_av_dokument', '=', 185]],
'relation' => 'and',
],
'tab' => 'systemforvaltare',
],
[
'name' => __( 'Kontaktperson:', 'your-text-domain' ),
'id' => $prefix . 'Kontaktpersontierp',
'type' => 'text',
'label_description' => __( 'Namn på personen', 'your-text-domain' ),
'std' => __( 'Används ej', 'your-text-domain' ),
'placeholder' => __( 'Anna Andersson', 'your-text-domain' ),
'required' => true,
'disabled' => false,
'readonly' => false,
'clone' => false,
'clone_empty_start' => false,
'columns' => 4,
'hide_from_rest' => false,
'hide_from_front' => false,
'limit_type' => 'character',
'visible' => [
'when' => [['typ_av_dokument', '=', 185]],
'relation' => 'and',
],
'tab' => 'systemforvaltare',
],
[
'name' => __( 'Telefonnummer:', 'your-text-domain' ),
'id' => $prefix . 'telefonnummertierp',
'type' => 'text',
'label_description' => __( 'Telefonnummer till kontaktperson', 'your-text-domain' ),
'std' => __( 'Används ej', 'your-text-domain' ),
'placeholder' => 701234578,
'required' => true,
'disabled' => false,
'readonly' => false,
'clone' => false,
'clone_empty_start' => false,
'columns' => 4,
'hide_from_rest' => false,
'hide_from_front' => false,
'limit_type' => 'character',
'visible' => [
'when' => [['typ_av_dokument', '=', 185]],
'relation' => 'and',
],
'tab' => 'systemforvaltare',
],
[
'name' => __( 'Kommun:', 'your-text-domain' ),
'id' => $prefix . 'kommunosthammar',
'type' => 'select',
'label_description' => __( 'Välj kommun', 'your-text-domain' ),
'options' => [
'Östhammar' => __( 'Östhammar', 'your-text-domain' ),
],
'std' => __( 'Östhammar', 'your-text-domain' ),
'multiple' => false,
'select_all_none' => false,
'required' => true,
'disabled' => false,
'readonly' => false,
'clone' => false,
'clone_empty_start' => false,
'columns' => 4,
'hide_from_rest' => false,
'hide_from_front' => false,
'visible' => [
'when' => [['typ_av_dokument', '=', 185]],
'relation' => 'and',
],
'tab' => 'systemforvaltare',
],
[
'name' => __( 'Kontaktperson:', 'your-text-domain' ),
'id' => $prefix . 'Kontaktpersonosthammar',
'type' => 'text',
'label_description' => __( 'Namn på personen', 'your-text-domain' ),
'std' => __( 'Används ej', 'your-text-domain' ),
'placeholder' => __( 'Anna Andersson', 'your-text-domain' ),
'required' => true,
'disabled' => false,
'readonly' => false,
'clone' => false,
'clone_empty_start' => false,
'columns' => 4,
'hide_from_rest' => false,
'hide_from_front' => false,
'limit_type' => 'character',
'visible' => [
'when' => [['typ_av_dokument', '=', 185]],
'relation' => 'and',
],
'tab' => 'systemforvaltare',
],
[
'name' => __( 'Telefonnummer:', 'your-text-domain' ),
'id' => $prefix . 'telefonnummerosthammar',
'type' => 'text',
'label_description' => __( 'Telefonnummer till kontaktperson', 'your-text-domain' ),
'std' => __( 'Används ej', 'your-text-domain' ),
'placeholder' => 701234578,
'required' => true,
'disabled' => false,
'readonly' => false,
'clone' => false,
'clone_empty_start' => false,
'columns' => 4,
'hide_from_rest' => false,
'hide_from_front' => false,
'limit_type' => 'character',
'visible' => [
'when' => [['typ_av_dokument', '=', 185]],
'relation' => 'and',
],
'tab' => 'systemforvaltare',
],
[
'name' => __( 'Övrig info systemförvaltare:', 'your-text-domain' ),
'id' => $prefix . 'systemforvaltare',
'type' => 'wysiwyg',
'label_description' => __( 'Finns det övrig info?', 'your-text-domain' ),
'raw' => false,
'options' => [
'teeny' => true,
'quicktags' => false,
'media_buttons' => true,
],
'required' => false,
'clone' => false,
'clone_empty_start' => false,
'hide_from_rest' => false,
'hide_from_front' => false,
'limit_type' => 'character',
'tab' => 'systemforvaltare',
],
[
'name' => __( 'Installation:', 'your-text-domain' ),
'id' => $prefix . 'installation',
'type' => 'wysiwyg',
'label_description' => __( '(t.ex. programgrupp och sökväg till installationsfiler för manuell installation)', 'your-text-domain' ),
'raw' => false,
'options' => [
'teeny' => true,
'quicktags' => false,
'media_buttons' => true,
],
'required' => true,
'clone' => false,
'clone_empty_start' => false,
'hide_from_rest' => false,
'hide_from_front' => false,
'limit_type' => 'character',
'visible' => [
'when' => [['typ_av_dokument', '=', 185]],
'relation' => 'or',
],
'tab' => 'installaton_and_vanliga_fel',
],
[
'name' => __( 'Vanliga fel:', 'your-text-domain' ),
'id' => $prefix . 'vanliga_fel',
'type' => 'wysiwyg',
'label_description' => __( '(t.ex. programgrupp och sökväg till installationsfiler för manuell installation)', 'your-text-domain' ),
'std' => __( 'Inga vanliga fel är dokumenterade.', 'your-text-domain' ),
'raw' => false,
'options' => [
'media_buttons' => true,
'teeny' => true,
],
'required' => false,
'clone' => false,
'clone_empty_start' => false,
'hide_from_rest' => false,
'hide_from_front' => false,
'limit_type' => 'character',
'visible' => [
'when' => [['typ_av_dokument', '=', 185]],
'relation' => 'or',
],
'tab' => 'installaton_and_vanliga_fel',
],
[
'name' => __( 'Behörigheter/krav', 'your-text-domain' ),
'id' => $prefix . 'krav',
'type' => 'wysiwyg',
'label_description' => __( '(Behörighetsgrupper som krävs? Speciell placering av dator-/användarkonto i AD? Behöver man vara uppkopplad på kommunens nätverk alt. VPN?)', 'your-text-domain' ),
'raw' => false,
'options' => [
'teeny' => true,
'quicktags' => false,
'media_buttons' => true,
],
'required' => true,
'clone' => false,
'clone_empty_start' => false,
'hide_from_rest' => false,
'hide_from_front' => false,
'limit_type' => 'character',
'visible' => [
'when' => [['typ_av_dokument', '=', 185]],
'relation' => 'or',
],
'tab' => 'behorigheterkrav',
],
[
'name' => __( 'Skriv lathund:', 'your-text-domain' ),
'id' => $prefix . 'skriv_lathund',
'type' => 'wysiwyg',
'label_description' => __( 'Tänk på att göra lathunden så tydlig som möjlig. Använd radbryt och rubriker.', 'your-text-domain' ),
'raw' => false,
'options' => [
'quicktags' => false,
'media_buttons' => true,
'teeny' => false,
],
'required' => true,
'clone' => false,
'clone_empty_start' => false,
'hide_from_rest' => false,
'hide_from_front' => false,
'limit_type' => 'character',
'visible' => [
'when' => [['typ_av_dokument', '=', 208]],
'relation' => 'or',
],
'tab' => 'lathund',
],
],
];
return $meta_boxes;
}Last updated