Shortcode_Button
Shortcode_Button copied to clipboard
Utf-8 problem in group repeatable field
`function shortcode_button_cmb_config( $button_data ) {
return array(
'id' => 'shortcode_' . $button_data[ 'slug' ],
'fields' => array(
array(
'name' => 'Başlık',
'id' => 'baslik',
'type' => 'text',
),
array(
'name' => 'Simge',
'id' => 'simge',
'type' => 'fontawesome_icon',
),
array(
'title' => 'Listeler',
'id' => 'listeler',
'type' => 'group',
// 'repeatable' => false, // use false if you want non-repeatable group
'options' => array(
'group_title' => 'Liste {#}', // since version 1.1.4, {#} gets replaced by row number
'add_button' => 'Liste Ekle',
'remove_button' => 'Sil',
'sortable' => true, // beta
'closed' => true, // true to have the groups closed by default
),
'fields' => array(
array(
'name' => 'Liste Başlığı',
'id' => 'liste_basligi',
'type' => 'text',
),
array(
'name' => 'Liste Alt Başlığı',
'id' => 'liste_alt_basligi',
'type' => 'text',
),
array(
'name' => 'Liste Açıklaması',
'id' => 'liste_aciklamasi',
'type' => 'textarea',
)
)
)
),
// keep this w/ a key of 'options-page' and use the button slug as the value
'show_on' => array( 'key' => 'options-page', 'value' => $button_data[ 'slug' ] ),
);
}`
It is my function. When i put utf-8 characters it shows different letters. This happens in only group fields.
For example baslik field prints çğıöş => çğıöş
But group fileds prints çğıöş => \u00e7\u011f\u0131\u00f6\u015f'