Skip to content

Instantly share code, notes, and snippets.

@macariojames
Last active September 1, 2019 15:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save macariojames/50d3b4e354459ed9b0071543aeb35bef to your computer and use it in GitHub Desktop.
Save macariojames/50d3b4e354459ed9b0071543aeb35bef to your computer and use it in GitHub Desktop.
Display field_name for ACF field names back-end in development if Administrator
<?php
// Display ACF field names for development for Administrator only
function display_acf_field_names( $field ) {
echo $field['_name'];
}
if(is_admin() && !current_user_can('manage_options')) {
add_action( 'acf/render_field', 'display_acf_field_names', 10, 1 );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment