ACF_Form_Gutenberg::modify_user_option_meta_box_order()
modify_user_option_meta_box_order
Filters the meta-box-order_{$post_type} value by prepending "acf_after_title" data to "normal". Fixes a bug where metaboxes with position "acf_after_title" do not appear in the block editor.
Метод класса: ACF_Form_Gutenberg{}
Хуков нет.
Возвращает
Массив
. Modified array with meta boxes moved around.
Использование
$ACF_Form_Gutenberg = new ACF_Form_Gutenberg(); $ACF_Form_Gutenberg->modify_user_option_meta_box_order( $locations );
- $locations (обязательный)
- -
Список изменений
С версии 5.8.2 | Введена. |
Код ACF_Form_Gutenberg::modify_user_option_meta_box_order() ACF Form Gutenberg::modify user option meta box order ACF 6.0.4
function modify_user_option_meta_box_order( $locations ) { if ( ! empty( $locations['acf_after_title'] ) ) { if ( ! empty( $locations['normal'] ) ) { $locations['normal'] = $locations['acf_after_title'] . ',' . $locations['normal']; } else { $locations['normal'] = $locations['acf_after_title']; } unset( $locations['acf_after_title'] ); } return $locations; }