carbon-fields
carbon-fields copied to clipboard
Problem with tabs names in Cyrillic
Version
- Carbon Fields: 2.2.0
- WordPress: 4.9.4
- PHP: 7.1
Expected Behavior
After saving, the tab on which we were located should be active.
Actual Behavior
If the names of tabs in Cyrillic, after saving, the first tab is always active.
Container definition
use Carbon_Fields\Container;
use Carbon_Fields\Field;
Container::make( 'theme_options', 'Настройки темы' )
->set_page_menu_position( 60 )
->add_tab( 'Страницы', array(
// страница
Field::make( 'association',
'homepage',
'Выберите страницу, текст которой отобразится на главной'
)
->set_types(array(
array(
'type' => 'post',
'post_type' => 'page',
),
))
->set_max(1)
->help_text( '<p>Для выбора кликните на нужную страницу.</p>' )
,
)) // end tab
->add_tab( 'Рубрики', array(
// несколько рубрик
Field::make( 'association',
'homecats',
'Выберите рубрики с последними записями на главной'
)
->set_types(array(
array(
'type' => 'term',
'taxonomy' => 'category',
),
))
->help_text( '<p>Для выбора кликните на нужную рубрику. В правом столбике можно выставить рубрики в нужном порядке.</p>' )
,
)) // end tab
;
Steps to Reproduce the Problem
- Switch to 'Рубрики' tab. Save changes.
- The 'Рубрики' tab is must be active, but 'Страницы' tab is active.
Hi @Dimox ,
I've fixed the problem with Cyrillic names in the development version. This will be added in the next release.
Use composer require htmlburger/carbon-fields "2.2.*@dev" to get the development version of 2.2
Many thanks!