
/**
* Выводит под названием группы полей ACF её ключ.
*
* @param WP_Post $post
*/
function acf_key_show_after_title( $post ) {
if ( $post->post_type === 'acf-field-group' ) {
$field_group = acf_get_field_group( $post );
if ( isset( $field_group['key'] ) ) {
?>
<div style="margin-top: 10px;padding: 15px;background: #f4ecd5;border: 1px solid #0085ba;">
Ключ поля <code><?php echo esc_html( $field_group['key'] ) ?></code>
</div>
<?php
}
}
}
add_action( 'edit_form_after_title', 'acf_key_show_after_title' );